-rw-r--r-- | libkdepim/kdatepicker.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libkdepim/kdatepicker.h b/libkdepim/kdatepicker.h index 3db9a89..4d904da 100644 --- a/libkdepim/kdatepicker.h +++ b/libkdepim/kdatepicker.h | |||
@@ -1,99 +1,102 @@ | |||
1 | /* -*- C++ -*- | 1 | /* -*- C++ -*- |
2 | This file is part of the KDE libraries | 2 | This file is part of the KDE libraries |
3 | Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org) | 3 | Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org) |
4 | (C) 1998-2001 Mirko Boehm (mirko@kde.org) | 4 | (C) 1998-2001 Mirko Boehm (mirko@kde.org) |
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 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 | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | #ifndef MICROKDE_KDATEPICKER_H | 20 | #ifndef MICROKDE_KDATEPICKER_H |
21 | #define MICROKDE_KDATEPICKER_H | 21 | #define MICROKDE_KDATEPICKER_H |
22 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
23 | #include <qframe.h> | 23 | #include <q3frame.h> |
24 | #include <qevent.h> | 24 | #include <qevent.h> |
25 | //Added by qt3to4: | ||
26 | #include <QResizeEvent> | ||
27 | #include <QKeyEvent> | ||
25 | 28 | ||
26 | class QLineEdit; | 29 | class QLineEdit; |
27 | class QToolButton; | 30 | class QToolButton; |
28 | class KDateValidator; | 31 | class KDateValidator; |
29 | class KDateTable; | 32 | class KDateTable; |
30 | class KDateEdit; | 33 | class KDateEdit; |
31 | 34 | ||
32 | /** | 35 | /** |
33 | * Provides a widget for calendar date input. | 36 | * Provides a widget for calendar date input. |
34 | * | 37 | * |
35 | * Different from the | 38 | * Different from the |
36 | * previous versions, it now emits two types of signals, either | 39 | * previous versions, it now emits two types of signals, either |
37 | * @ref dateSelected() or @ref dateEntered() (see documentation for both | 40 | * @ref dateSelected() or @ref dateEntered() (see documentation for both |
38 | * signals). | 41 | * signals). |
39 | * | 42 | * |
40 | * A line edit has been added in the newer versions to allow the user | 43 | * A line edit has been added in the newer versions to allow the user |
41 | * to select a date directly by entering numbers like 19990101 | 44 | * to select a date directly by entering numbers like 19990101 |
42 | * or 990101. | 45 | * or 990101. |
43 | * | 46 | * |
44 | * @image kdatepicker.png KDatePicker | 47 | * @image kdatepicker.png KDatePicker |
45 | * | 48 | * |
46 | * @version $Id$ | 49 | * @version $Id$ |
47 | * @author Tim Gilman, Mirko Boehm | 50 | * @author Tim Gilman, Mirko Boehm |
48 | * | 51 | * |
49 | * @short A date selection widget. | 52 | * @short A date selection widget. |
50 | **/ | 53 | **/ |
51 | class KDatePicker: public QFrame | 54 | class KDatePicker: public Q3Frame |
52 | { | 55 | { |
53 | Q_OBJECT | 56 | Q_OBJECT |
54 | public: | 57 | public: |
55 | /** The usual constructor. The given date will be displayed | 58 | /** The usual constructor. The given date will be displayed |
56 | * initially. | 59 | * initially. |
57 | **/ | 60 | **/ |
58 | KDatePicker(QWidget *parent=0, | 61 | KDatePicker(QWidget *parent=0, |
59 | QDate=QDate::currentDate(), | 62 | QDate=QDate::currentDate(), |
60 | const char *name=0); | 63 | const char *name=0); |
61 | /** | 64 | /** |
62 | * The destructor. | 65 | * The destructor. |
63 | **/ | 66 | **/ |
64 | virtual ~KDatePicker(); | 67 | virtual ~KDatePicker(); |
65 | 68 | ||
66 | /** The size hint for date pickers. The size hint recommends the | 69 | /** The size hint for date pickers. The size hint recommends the |
67 | * minimum size of the widget so that all elements may be placed | 70 | * minimum size of the widget so that all elements may be placed |
68 | * without clipping. This sometimes looks ugly, so when using the | 71 | * without clipping. This sometimes looks ugly, so when using the |
69 | * size hint, try adding 28 to each of the reported numbers of | 72 | * size hint, try adding 28 to each of the reported numbers of |
70 | * pixels. | 73 | * pixels. |
71 | **/ | 74 | **/ |
72 | QSize sizeHint() const; | 75 | QSize sizeHint() const; |
73 | 76 | ||
74 | /** | 77 | /** |
75 | * Sets the date. | 78 | * Sets the date. |
76 | * | 79 | * |
77 | * @returns @p false and does not change anything | 80 | * @returns @p false and does not change anything |
78 | * if the date given is invalid. | 81 | * if the date given is invalid. |
79 | **/ | 82 | **/ |
80 | bool setDate(const QDate&); | 83 | bool setDate(const QDate&); |
81 | 84 | ||
82 | /** | 85 | /** |
83 | * Returns the selected date. | 86 | * Returns the selected date. |
84 | * @deprecated | 87 | * @deprecated |
85 | **/ | 88 | **/ |
86 | const QDate& getDate() const; | 89 | const QDate& getDate() const; |
87 | 90 | ||
88 | /** | 91 | /** |
89 | * @returns the selected date. | 92 | * @returns the selected date. |
90 | */ | 93 | */ |
91 | const QDate &date() const; | 94 | const QDate &date() const; |
92 | 95 | ||
93 | /** | 96 | /** |
94 | * Enables or disables the widget. | 97 | * Enables or disables the widget. |
95 | **/ | 98 | **/ |
96 | void setEnabled(bool); | 99 | void setEnabled(bool); |
97 | 100 | ||
98 | /** | 101 | /** |
99 | * Sets the font size of the widgets elements. | 102 | * Sets the font size of the widgets elements. |