1 /* -*- C++ -*- 2 This file is part of the KDE libraries 3 SPDX-FileCopyrightText: 1997 Tim D . Gilman <tdgilman@best.org> 4 SPDX-FileCopyrightText: 1998-2001 Mirko Boehm <mirko@kde.org> 5 SPDX-FileCopyrightText: 2007 John Layt <john@layt.net> 6 7 SPDX-License-Identifier: LGPL-2.0-or-later 8 */ 9 10 #ifndef KDATEPICKER_P_H 11 #define KDATEPICKER_P_H 12 13 #include <QDate> 14 #include <QIntValidator> 15 #include <QLineEdit> 16 17 /** 18 * @internal 19 * Year selection widget. 20 * @author Tim Gilman, Mirko Boehm, John Layt 21 */ 22 class KDatePickerPrivateYearSelector : public QLineEdit 23 { 24 Q_OBJECT 25 26 public: 27 explicit KDatePickerPrivateYearSelector(const QDate ¤tDate, QWidget *parent = nullptr); 28 int year(); 29 void setYear(int year); 30 31 public Q_SLOTS: 32 void yearEnteredSlot(); 33 34 Q_SIGNALS: 35 void closeMe(int); 36 37 protected: 38 QIntValidator *val; 39 int result; 40 41 private: 42 QDate oldDate; 43 44 Q_DISABLE_COPY(KDatePickerPrivateYearSelector) 45 }; 46 47 #endif // KDATEPICKER_P_H 48