Diffstat (limited to 'core/pim/datebook/datebookweekheaderimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweekheaderimpl.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/core/pim/datebook/datebookweekheaderimpl.h b/core/pim/datebook/datebookweekheaderimpl.h index 2e5a6ca..1ab1d52 100644 --- a/core/pim/datebook/datebookweekheaderimpl.h +++ b/core/pim/datebook/datebookweekheaderimpl.h | |||
@@ -11,56 +11,49 @@ | |||
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 DATEBOOKDAYHEADER_H | 20 | #ifndef DATEBOOKDAYHEADER_H |
21 | #define DATEBOOKDAYHEADER_H | 21 | #define DATEBOOKDAYHEADER_H |
22 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
23 | #include "datebookweekheader.h" | 23 | #include "datebookweekheader.h" |
24 | 24 | ||
25 | 25 | ||
26 | class DateBookWeekHeader : public DateBookWeekHeaderBase | 26 | class DateBookWeekHeader : public DateBookWeekHeaderBase |
27 | { | 27 | { |
28 | Q_OBJECT | 28 | Q_OBJECT |
29 | 29 | ||
30 | public: | 30 | public: |
31 | DateBookWeekHeader( bool startOnMonday, QWidget* parent = 0, | 31 | DateBookWeekHeader( bool startOnMonday, QWidget* parent = 0, |
32 | const char* name = 0, WFlags fl = 0 ); | 32 | const char* name = 0, WFlags fl = 0 ); |
33 | ~DateBookWeekHeader(); | 33 | ~DateBookWeekHeader(); |
34 | 34 | ||
35 | void setDate( int y, int w ); | 35 | void setDate(const QDate &d); |
36 | void setStartOfWeek( bool onMonday ); | 36 | void setStartOfWeek( bool onMonday ); |
37 | 37 | ||
38 | signals: | 38 | signals: |
39 | void dateChanged( int y, int w ); | 39 | void dateChanged( int y, int w ); |
40 | 40 | ||
41 | public slots: | 41 | public slots: |
42 | void pickDate(); | 42 | void pickDate(); |
43 | void yearChanged( int ); | ||
44 | void nextMonth(); | 43 | void nextMonth(); |
45 | void prevMonth(); | 44 | void prevMonth(); |
46 | void nextWeek(); | 45 | void nextWeek(); |
47 | void prevWeek(); | 46 | void prevWeek(); |
48 | void weekChanged( int ); | ||
49 | void setDate( int y, int m, int d); | 47 | void setDate( int y, int m, int d); |
50 | 48 | ||
51 | protected slots: | 49 | protected slots: |
52 | void keyPressEvent(QKeyEvent *e) | 50 | void keyPressEvent(QKeyEvent *e) { e->ignore(); } |
53 | { | ||
54 | e->ignore(); | ||
55 | } | ||
56 | 51 | ||
57 | private: | 52 | private: |
58 | int year, | 53 | QDate date; |
59 | week; | 54 | bool bStartOnMonday; |
60 | bool bStartOnMonday; | ||
61 | |||
62 | }; | 55 | }; |
63 | 56 | ||
64 | QDate dateFromWeek( int week, int year, bool startOnMonday ); | 57 | QDate dateFromWeek( int week, int year, bool startOnMonday ); |
65 | 58 | ||
66 | #endif // DATEBOOKDAYHEADER_H | 59 | #endif // DATEBOOKDAYHEADER_H |