author | zecke <zecke> | 2002-09-10 12:09:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 12:09:49 (UTC) |
commit | 6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4 (patch) (unidiff) | |
tree | 6ebc93c6432f4ed9d00ef1448b6a047ef522a79a /library/datebookmonth.h | |
parent | d10cddb3c9ce75bc90b14add14bc133737fe35aa (diff) | |
download | opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.zip opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.gz opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.bz2 |
Qtopia1-6 merge
still to test
bic changes to be resolved
more changes to be made?
-rw-r--r-- | library/datebookmonth.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/datebookmonth.h b/library/datebookmonth.h index a7647ae..3c57c19 100644 --- a/library/datebookmonth.h +++ b/library/datebookmonth.h | |||
@@ -1,71 +1,71 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef DATEBOOKMONTH | 20 | #ifndef DATEBOOKMONTH |
21 | #define DATEBOOKMONTH | 21 | #define DATEBOOKMONTH |
22 | 22 | ||
23 | #include <qpe/event.h> | 23 | #include <qtopia/private/event.h> |
24 | 24 | ||
25 | #include <qvbox.h> | 25 | #include <qvbox.h> |
26 | #include <qhbox.h> | 26 | #include <qhbox.h> |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qvaluelist.h> | 28 | #include <qvaluelist.h> |
29 | #include <qtable.h> | 29 | #include <qtable.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | 31 | ||
32 | #include "calendar.h" | 32 | #include "calendar.h" |
33 | #include "timestring.h" | 33 | #include "timestring.h" |
34 | 34 | ||
35 | class QToolButton; | 35 | class QToolButton; |
36 | class QComboBox; | 36 | class QComboBox; |
37 | class QSpinBox; | 37 | class QSpinBox; |
38 | class Event; | 38 | class Event; |
39 | class DateBookDB; | 39 | class DateBookDB; |
40 | 40 | ||
41 | class DateBookMonthHeaderPrivate; | 41 | class DateBookMonthHeaderPrivate; |
42 | class DateBookMonthHeader : public QHBox | 42 | class DateBookMonthHeader : public QHBox |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | 45 | ||
46 | public: | 46 | public: |
47 | DateBookMonthHeader( QWidget *parent = 0, const char *name = 0 ); | 47 | DateBookMonthHeader( QWidget *parent = 0, const char *name = 0 ); |
48 | ~DateBookMonthHeader(); | 48 | ~DateBookMonthHeader(); |
49 | void setDate( int year, int month ); | 49 | void setDate( int year, int month ); |
50 | 50 | ||
51 | signals: | 51 | signals: |
52 | void dateChanged( int year, int month ); | 52 | void dateChanged( int year, int month ); |
53 | 53 | ||
54 | protected slots: | 54 | protected slots: |
55 | void keyPressEvent(QKeyEvent *e ) { | 55 | void keyPressEvent(QKeyEvent *e ) { |
56 | e->ignore(); | 56 | e->ignore(); |
57 | } | 57 | } |
58 | 58 | ||
59 | private slots: | 59 | private slots: |
60 | void updateDate(); | 60 | void updateDate(); |
61 | void firstMonth(); | 61 | void firstMonth(); |
62 | void lastMonth(); | 62 | void lastMonth(); |
63 | void monthBack(); | 63 | void monthBack(); |
64 | void monthForward(); | 64 | void monthForward(); |
65 | 65 | ||
66 | private: | 66 | private: |
67 | QToolButton *begin, *back, *next, *end; | 67 | QToolButton *begin, *back, *next, *end; |
68 | QComboBox *month; | 68 | QComboBox *month; |
69 | QSpinBox *year; | 69 | QSpinBox *year; |
70 | DateBookMonthHeaderPrivate *d; | 70 | DateBookMonthHeaderPrivate *d; |
71 | int focus; | 71 | int focus; |
@@ -142,70 +142,72 @@ private: | |||
142 | DateBookDB *db; | 142 | DateBookDB *db; |
143 | DateBookMonthTablePrivate *d; | 143 | DateBookMonthTablePrivate *d; |
144 | }; | 144 | }; |
145 | 145 | ||
146 | class DateBookMonthPrivate; | 146 | class DateBookMonthPrivate; |
147 | class DateBookMonth : public QVBox | 147 | class DateBookMonth : public QVBox |
148 | { | 148 | { |
149 | Q_OBJECT | 149 | Q_OBJECT |
150 | 150 | ||
151 | public: | 151 | public: |
152 | DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE, | 152 | DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE, |
153 | DateBookDB *data = 0 ); | 153 | DateBookDB *data = 0 ); |
154 | ~DateBookMonth(); | 154 | ~DateBookMonth(); |
155 | QDate selectedDate() const; | 155 | QDate selectedDate() const; |
156 | 156 | ||
157 | signals: | 157 | signals: |
158 | void dateClicked( int year, int month, int day ); | 158 | void dateClicked( int year, int month, int day ); |
159 | 159 | ||
160 | public slots: | 160 | public slots: |
161 | void setDate( int y, int m ); | 161 | void setDate( int y, int m ); |
162 | void setDate( int y, int m, int d ); | 162 | void setDate( int y, int m, int d ); |
163 | void setDate( QDate ); | 163 | void setDate( QDate ); |
164 | void redraw(); | 164 | void redraw(); |
165 | void slotWeekChange( bool ); | 165 | void slotWeekChange( bool ); |
166 | 166 | ||
167 | protected slots: | 167 | protected slots: |
168 | virtual void keyPressEvent(QKeyEvent *e); | 168 | virtual void keyPressEvent(QKeyEvent *e); |
169 | 169 | ||
170 | private slots: | 170 | private slots: |
171 | void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); } | 171 | void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); } |
172 | void finalDate(int, int, int); | 172 | void finalDate(int, int, int); |
173 | 173 | ||
174 | private: | 174 | private: |
175 | DateBookMonthHeader *header; | 175 | DateBookMonthHeader *header; |
176 | DateBookMonthTable *table; | 176 | DateBookMonthTable *table; |
177 | int year, month, day; | 177 | int year, month, day; |
178 | bool autoClose; | 178 | bool autoClose; |
179 | class DateBookMonthPrivate *d; | 179 | class DateBookMonthPrivate *d; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | class DateButton : public QPushButton | 182 | class DateButton : public QPushButton |
183 | { | 183 | { |
184 | Q_OBJECT | 184 | Q_OBJECT |
185 | 185 | ||
186 | public: | 186 | public: |
187 | DateButton( bool longDate, QWidget *parent, const char * name = 0 ); | 187 | DateButton( bool longDate, QWidget *parent, const char * name = 0 ); |
188 | QDate date() const { return currDate; } | 188 | QDate date() const { return currDate; } |
189 | 189 | ||
190 | bool customWhatsThis() const; | ||
191 | |||
190 | signals: | 192 | signals: |
191 | void dateSelected( int year, int month, int day ); | 193 | void dateSelected( int year, int month, int day ); |
192 | 194 | ||
193 | public slots: | 195 | public slots: |
194 | void setDate( int y, int m, int d ); | 196 | void setDate( int y, int m, int d ); |
195 | void setDate( QDate ); | 197 | void setDate( QDate ); |
196 | void setWeekStartsMonday( int ); | 198 | void setWeekStartsMonday( int ); |
197 | void setDateFormat( DateFormat ); | 199 | void setDateFormat( DateFormat ); |
198 | 200 | ||
199 | private slots: | 201 | private slots: |
200 | void pickDate(); | 202 | void pickDate(); |
201 | void gotHide(); | 203 | void gotHide(); |
202 | 204 | ||
203 | private: | 205 | private: |
204 | bool longFormat; | 206 | bool longFormat; |
205 | bool weekStartsMonday; | 207 | bool weekStartsMonday; |
206 | QDate currDate; | 208 | QDate currDate; |
207 | DateFormat df; | 209 | DateFormat df; |
208 | }; | 210 | }; |
209 | 211 | ||
210 | 212 | ||
211 | #endif | 213 | #endif |