1 | /* -*- C++ -*- |
2 | This file is part of the KDE libraries |
3 | Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org) |
4 | (C) 1998-2001 Mirko Boehm (mirko@kde.org) |
5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. |
9 | |
10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301, USA. |
19 | */ |
20 | #ifndef KPTDATETABLE_P_H |
21 | #define KPTDATETABLE_P_H |
22 | |
23 | #include <QLineEdit> |
24 | |
25 | namespace KPlato |
26 | { |
27 | |
28 | /** Year selection widget. |
29 | * @internal |
30 | * @author Tim Gilman, Mirko Boehm |
31 | */ |
32 | class KDateInternalYearSelector : public QLineEdit |
33 | { |
34 | Q_OBJECT |
35 | protected: |
36 | QIntValidator *val; |
37 | int result; |
38 | |
39 | virtual void focusOutEvent(QFocusEvent*); |
40 | |
41 | public Q_SLOTS: |
42 | void yearEnteredSlot(); |
43 | Q_SIGNALS: |
44 | void closeMe(int); |
45 | public: |
46 | KDateInternalYearSelector( QWidget* parent=0); |
47 | int getYear(); |
48 | void setYear(int year); |
49 | |
50 | private: |
51 | Q_DISABLE_COPY(KDateInternalYearSelector) |
52 | }; |
53 | |
54 | |
55 | } //namespace KPlato |
56 | |
57 | #endif // KDATETABLE_P_H |
58 | |