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 | class KDatePickerPrivateYearSelector : public QLineEdit |
18 | { |
19 | Q_OBJECT |
20 | |
21 | public: |
22 | explicit KDatePickerPrivateYearSelector(const QDate ¤tDate, QWidget *parent = nullptr); |
23 | int year(); |
24 | void setYear(const QDate &year); |
25 | |
26 | public Q_SLOTS: |
27 | void yearEnteredSlot(); |
28 | |
29 | Q_SIGNALS: |
30 | void closeMe(int); |
31 | |
32 | protected: |
33 | QIntValidator *val; |
34 | int result; |
35 | |
36 | private: |
37 | QDate oldDate; |
38 | |
39 | Q_DISABLE_COPY(KDatePickerPrivateYearSelector) |
40 | }; |
41 | |
42 | #endif // KDATEPICKER_P_H |
43 | |