Diffstat (limited to 'core/pim/datebook/datebookweeklst.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index 17dc01f..f858c4f 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h | |||
@@ -16,34 +16,37 @@ class QDateTime; | |||
16 | class DateBookDB; | 16 | class DateBookDB; |
17 | 17 | ||
18 | class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase | 18 | class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase |
19 | { | 19 | { |
20 | Q_OBJECT | 20 | Q_OBJECT |
21 | public: | 21 | public: |
22 | DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, | 22 | DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, |
23 | WFlags fl = 0 ); | 23 | WFlags fl = 0 ); |
24 | ~DateBookWeekLstHeader(); | 24 | ~DateBookWeekLstHeader(); |
25 | void setDate(const QDate &d); | 25 | void setDate(const QDate &d); |
26 | 26 | ||
27 | public slots: | 27 | public slots: |
28 | void nextWeek(); | 28 | void nextWeek(); |
29 | void prevWeek(); | 29 | void prevWeek(); |
30 | void pickDate(); | 30 | void nextMonth(); |
31 | void setDate(int y, int m, int d); | 31 | void prevMonth(); |
32 | void pickDate(); | ||
33 | void setDate(int y, int m, int d); | ||
32 | signals: | 34 | signals: |
33 | void dateChanged(int y, int w); | 35 | void dateChanged(int y, int w); |
34 | void setDbl(bool on); | 36 | void setDbl(bool on); |
35 | private: | 37 | private: |
36 | QDate date; | 38 | QDate date; |
37 | bool onMonday; | 39 | //bool onMonday; |
40 | bool bStartOnMonday; | ||
38 | }; | 41 | }; |
39 | 42 | ||
40 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase | 43 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase |
41 | { | 44 | { |
42 | Q_OBJECT | 45 | Q_OBJECT |
43 | public: | 46 | public: |
44 | DateBookWeekLstDayHdr(const QDate &d, bool onM, | 47 | DateBookWeekLstDayHdr(const QDate &d, bool onM, |
45 | QWidget* parent = 0, const char* name = 0, | 48 | QWidget* parent = 0, const char* name = 0, |
46 | WFlags fl = 0 ); | 49 | WFlags fl = 0 ); |
47 | public slots: | 50 | public slots: |
48 | void showDay(); | 51 | void showDay(); |
49 | void newEvent(); | 52 | void newEvent(); |
@@ -70,32 +73,32 @@ private: | |||
70 | const EffectiveEvent event; | 73 | const EffectiveEvent event; |
71 | }; | 74 | }; |
72 | 75 | ||
73 | class DateBookWeekLstView: public QWidget | 76 | class DateBookWeekLstView: public QWidget |
74 | { | 77 | { |
75 | Q_OBJECT | 78 | Q_OBJECT |
76 | public: | 79 | public: |
77 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, | 80 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, |
78 | QWidget* parent = 0, const char* name = 0, | 81 | QWidget* parent = 0, const char* name = 0, |
79 | WFlags fl = 0 ); | 82 | WFlags fl = 0 ); |
80 | ~DateBookWeekLstView(); | 83 | ~DateBookWeekLstView(); |
81 | signals: | 84 | signals: |
82 | void editEvent(const Event &e); | 85 | void editEvent(const Event &e); |
83 | void showDate(int y, int m, int d); | 86 | void showDate(int y, int m, int d); |
84 | void addEvent(const QDateTime &start, const QDateTime &stop, | 87 | void addEvent(const QDateTime &start, const QDateTime &stop, |
85 | const QString &str, const QString &location); | 88 | const QString &str, const QString &location); |
86 | private: | 89 | private: |
87 | bool onMonday; | 90 | bool bStartOnMonday; |
88 | protected slots: | 91 | protected slots: |
89 | void keyPressEvent(QKeyEvent *); | 92 | void keyPressEvent(QKeyEvent *); |
90 | }; | 93 | }; |
91 | 94 | ||
92 | class DateBookWeekLstDblView: public QWidget { | 95 | class DateBookWeekLstDblView: public QWidget { |
93 | Q_OBJECT | 96 | Q_OBJECT |
94 | public: | 97 | public: |
95 | DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, | 98 | DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, |
96 | QValueList<EffectiveEvent> &ev2, | 99 | QValueList<EffectiveEvent> &ev2, |
97 | QDate &d, bool onM, | 100 | QDate &d, bool onM, |
98 | QWidget* parent = 0, const char* name = 0, | 101 | QWidget* parent = 0, const char* name = 0, |
99 | WFlags fl = 0 ); | 102 | WFlags fl = 0 ); |
100 | signals: | 103 | signals: |
101 | void editEvent(const Event &e); | 104 | void editEvent(const Event &e); |
@@ -118,34 +121,34 @@ public: | |||
118 | int week() const { return _week; }; | 121 | int week() const { return _week; }; |
119 | QDate date() const; | 122 | QDate date() const; |
120 | 123 | ||
121 | public slots: | 124 | public slots: |
122 | void redraw(); | 125 | void redraw(); |
123 | void dateChanged(int y, int w); | 126 | void dateChanged(int y, int w); |
124 | 127 | ||
125 | protected slots: | 128 | protected slots: |
126 | void keyPressEvent(QKeyEvent *); | 129 | void keyPressEvent(QKeyEvent *); |
127 | void setDbl(bool on); | 130 | void setDbl(bool on); |
128 | 131 | ||
129 | signals: | 132 | signals: |
130 | void showDate(int y, int m, int d); | 133 | void showDate(int y, int m, int d); |
131 | void addEvent(const QDateTime &start, const QDateTime &stop, | 134 | void addEvent(const QDateTime &start, const QDateTime &stop, |
132 | const QString &str, const QString &location); | 135 | const QString &str, const QString &location); |
133 | void editEvent(const Event &e); | 136 | void editEvent(const Event &e); |
134 | 137 | ||
135 | private: | 138 | private: |
136 | DateBookDB *db; | 139 | DateBookDB *db; |
137 | int startTime; | 140 | int startTime; |
138 | bool ampm; | 141 | bool ampm; |
139 | bool onMonday; | 142 | bool bStartOnMonday; |
140 | bool dbl; | 143 | bool dbl; |
141 | int year, _week; | 144 | int year, _week; |
142 | DateBookWeekLstHeader *header; | 145 | DateBookWeekLstHeader *header; |
143 | QWidget *view; | 146 | QWidget *view; |
144 | QVBoxLayout *layout; | 147 | QVBoxLayout *layout; |
145 | QScrollView *scroll; | 148 | QScrollView *scroll; |
146 | 149 | ||
147 | void getEvents(); | 150 | void getEvents(); |
148 | }; | 151 | }; |
149 | 152 | ||
150 | #endif | 153 | #endif |
151 | 154 | ||