summaryrefslogtreecommitdiffabout
path: root/libkdepim/kdateedit.h
Unidiff
Diffstat (limited to 'libkdepim/kdateedit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdateedit.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 2d8c452..38eacde 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -15,50 +15,53 @@
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef KDATEEDIT_H 24#ifndef KDATEEDIT_H
25#define KDATEEDIT_H 25#define KDATEEDIT_H
26 26
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qmap.h> 30#include <qmap.h>
31//Added by qt3to4:
32#include <QKeyEvent>
33#include <QEvent>
31 34
32class QLineEdit; 35class QLineEdit;
33class QPushButton; 36class QPushButton;
34class QObject; 37class QObject;
35class QEvent; 38class QEvent;
36class KDatePicker; 39class KDatePicker;
37class KDateValidator; 40class KDateValidator;
38 41
39/** 42/**
40* A date editing widget that consists of a line edit followed by 43* A date editing widget that consists of a line edit followed by
41* a small push button. The line edit contains the date in text form, 44* a small push button. The line edit contains the date in text form,
42* and the push button will display a 'popup' style date picker. 45* and the push button will display a 'popup' style date picker.
43* 46*
44* This widget also supports advanced features like allowing the user 47* This widget also supports advanced features like allowing the user
45* to type in the day name to get the date. The following keywords 48* to type in the day name to get the date. The following keywords
46* are supported (in the native language): tomorrow, yesturday, today, 49* are supported (in the native language): tomorrow, yesturday, today,
47* monday, tuesday, wednesday, thursday, friday, saturday, sunday. 50* monday, tuesday, wednesday, thursday, friday, saturday, sunday.
48* 51*
49* @author Cornelius Schumacher <schumacher@kde.org> 52* @author Cornelius Schumacher <schumacher@kde.org>
50* @author Mike Pilone <mpilone@slac.com> 53* @author Mike Pilone <mpilone@slac.com>
51*/ 54*/
52class KDateEdit : public QHBox 55class KDateEdit : public Q3HBox
53{ 56{
54 Q_OBJECT 57 Q_OBJECT
55 public: 58 public:
56 KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false ); 59 KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false );
57 virtual ~KDateEdit(); 60 virtual ~KDateEdit();
58 61
59 /** @return True if the date in the text edit is valid, 62 /** @return True if the date in the text edit is valid,
60 * false otherwise. This will not modify the display of the date, 63 * false otherwise. This will not modify the display of the date,
61 * but only check for validity. 64 * but only check for validity.
62 */ 65 */
63 bool inputIsValid(); 66 bool inputIsValid();
64 67
@@ -119,25 +122,25 @@ class KDateEdit : public QHBox
119 QDate readDate() const; 122 QDate readDate() const;
120 123
121 /** Maps the text that the user can enter to the offset in days from 124 /** Maps the text that the user can enter to the offset in days from
122 * today. For example, the text 'tomorrow' is mapped to +1. 125 * today. For example, the text 'tomorrow' is mapped to +1.
123 */ 126 */
124 QMap<QString, int> mKeywordMap; 127 QMap<QString, int> mKeywordMap;
125 bool mTextChanged; 128 bool mTextChanged;
126 bool mHandleInvalid; 129 bool mHandleInvalid;
127 130
128 QPushButton *mDateButton; 131 QPushButton *mDateButton;
129 QLineEdit *mDateEdit; 132 QLineEdit *mDateEdit;
130 KDatePicker *mDatePicker; 133 KDatePicker *mDatePicker;
131 QVBox *mDateFrame; 134 Q3VBox *mDateFrame;
132 int maxDay; 135 int maxDay;
133 bool withoutDp; 136 bool withoutDp;
134 137
135 protected: 138 protected:
136 virtual void keyPressEvent(QKeyEvent *qke); 139 virtual void keyPressEvent(QKeyEvent *qke);
137 void setSelect ( int, int ); 140 void setSelect ( int, int );
138 bool dateFormShort; 141 bool dateFormShort;
139 char lengthMonthName; 142 char lengthMonthName;
140 143
141}; 144};
142 145
143#endif 146#endif