author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/ktimeedit.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/ktimeedit.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h index b3d842d..1c7d18d 100644 --- a/korganizer/ktimeedit.h +++ b/korganizer/ktimeedit.h | |||
@@ -1,89 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1999 Preston Brown, Ian Dawes | 3 | Copyright (c) 1999 Preston Brown, Ian Dawes |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program 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 | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef _KTIMEEDIT_H | 23 | #ifndef _KTIMEEDIT_H |
24 | #define _KTIMEEDIT_H | 24 | #define _KTIMEEDIT_H |
25 | 25 | ||
26 | #include <qevent.h> | 26 | #include <qevent.h> |
27 | #include <qkeycode.h> | 27 | #include <qnamespace.h> |
28 | #include <qstring.h> | 28 | #include <qstring.h> |
29 | #include <qdatetime.h> | 29 | #include <qdatetime.h> |
30 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
31 | #include <Q3ComboBox> | ||
32 | //Added by qt3to4: | ||
33 | #include <QKeyEvent> | ||
31 | 34 | ||
32 | #include <kapplication.h> | 35 | #include <kapplication.h> |
33 | 36 | ||
34 | /** | 37 | /** |
35 | This is a class that provides an easy, user friendly way to edit times. | 38 | This is a class that provides an easy, user friendly way to edit times. |
36 | up/down/ increase or decrease time, respectively. | 39 | up/down/ increase or decrease time, respectively. |
37 | 40 | ||
38 | @short Provides a way to edit times in a user-friendly manner. | 41 | @short Provides a way to edit times in a user-friendly manner. |
39 | @author Preston Brown, Ian Dawes | 42 | @author Preston Brown, Ian Dawes |
40 | */ | 43 | */ |
41 | class KOTimeEdit : public QComboBox | 44 | class KOTimeEdit : public Q3ComboBox |
42 | { | 45 | { |
43 | Q_OBJECT | 46 | Q_OBJECT |
44 | public: | 47 | public: |
45 | /** constructs a new time edit. */ | 48 | /** constructs a new time edit. */ |
46 | KOTimeEdit(QWidget *parent=0, QTime qt=QTime(12,0), const char *name=0); | 49 | KOTimeEdit(QWidget *parent=0, QTime qt=QTime(12,0), const char *name=0); |
47 | 50 | ||
48 | virtual ~KOTimeEdit(); | 51 | virtual ~KOTimeEdit(); |
49 | 52 | ||
50 | /** | 53 | /** |
51 | Returns, if a time is selected. Can not return false anymore.... | 54 | Returns, if a time is selected. Can not return false anymore.... |
52 | */ | 55 | */ |
53 | bool hasTime() const; | 56 | bool hasTime() const; |
54 | 57 | ||
55 | /** returns the time that is currently set in the timeLineEdit. */ | 58 | /** returns the time that is currently set in the timeLineEdit. */ |
56 | QTime getTime() const; | 59 | QTime getTime() const; |
57 | 60 | ||
58 | /** returns the prefered size policy of the KOTimeEdit */ | 61 | /** returns the prefered size policy of the KOTimeEdit */ |
59 | //QSizePolicy sizePolicy() const; | 62 | //QSizePolicy sizePolicy() const; |
60 | 63 | ||
61 | signals: | 64 | signals: |
62 | /** | 65 | /** |
63 | Emitted every time the time displayed changes. "newt" is the new | 66 | Emitted every time the time displayed changes. "newt" is the new |
64 | time. | 67 | time. |
65 | */ | 68 | */ |
66 | void timeChanged(QTime newt); | 69 | void timeChanged(QTime newt); |
67 | 70 | ||
68 | public slots: | 71 | public slots: |
69 | /** used to set the time which is displayed to a specific value. */ | 72 | /** used to set the time which is displayed to a specific value. */ |
70 | void setTime(QTime qt); | 73 | void setTime(QTime qt); |
71 | 74 | ||
72 | protected slots: | 75 | protected slots: |
73 | void activ(int); | 76 | void activ(int); |
74 | void hilit(int); | 77 | void hilit(int); |
75 | void changedText(); | 78 | void changedText(); |
76 | 79 | ||
77 | protected: | 80 | protected: |
78 | void keyPressEvent(QKeyEvent *qke); | 81 | void keyPressEvent(QKeyEvent *qke); |
79 | void keyReleaseEvent(QKeyEvent *qke); | 82 | void keyReleaseEvent(QKeyEvent *qke); |
80 | void setSelect ( int, int ); | 83 | void setSelect ( int, int ); |
81 | bool mFlagKeyPressed; | 84 | bool mFlagKeyPressed; |
82 | void addTime(QTime qt, bool update = true ); | 85 | void addTime(QTime qt, bool update = true ); |
83 | void subTime(QTime qt, bool update = true ); | 86 | void subTime(QTime qt, bool update = true ); |
84 | // Update the lineedit text from mTime | 87 | // Update the lineedit text from mTime |
85 | void updateText(); | 88 | void updateText(); |
86 | // void mouseReleaseEvent ( QMouseEvent * ) ; | 89 | // void mouseReleaseEvent ( QMouseEvent * ) ; |
87 | //void focusInEvent ( QFocusEvent * ) ; | 90 | //void focusInEvent ( QFocusEvent * ) ; |
88 | 91 | ||
89 | private: | 92 | private: |