Diffstat (limited to 'core/pim/datebook/datebookweeklst.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 93 |
1 files changed, 47 insertions, 46 deletions
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index 3bc7f2f..38d7777 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h | |||
@@ -11,63 +11,64 @@ | |||
11 | #include "datebookweeklstdayhdr.h" | 11 | #include "datebookweeklstdayhdr.h" |
12 | 12 | ||
13 | #include <opie2/oclickablelabel.h> | 13 | #include <opie2/oclickablelabel.h> |
14 | 14 | ||
15 | class QDateTime; | 15 | class QDateTime; |
16 | class DateBookDB; | 16 | class DateBookDB; |
17 | class DateBookDBHoliday; | ||
17 | 18 | ||
18 | class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase | 19 | class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase |
19 | { | 20 | { |
20 | Q_OBJECT | 21 | Q_OBJECT |
21 | public: | 22 | public: |
22 | DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, | 23 | DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, |
23 | WFlags fl = 0 ); | 24 | WFlags fl = 0 ); |
24 | ~DateBookWeekLstHeader(); | 25 | ~DateBookWeekLstHeader(); |
25 | void setDate(const QDate &d); | 26 | void setDate(const QDate &d); |
26 | 27 | ||
27 | public slots: | 28 | public slots: |
28 | void nextWeek(); | 29 | void nextWeek(); |
29 | void prevWeek(); | 30 | void prevWeek(); |
30 | void nextMonth(); | 31 | void nextMonth(); |
31 | void prevMonth(); | 32 | void prevMonth(); |
32 | void pickDate(); | 33 | void pickDate(); |
33 | void setDate(int y, int m, int d); | 34 | void setDate(int y, int m, int d); |
34 | signals: | 35 | signals: |
35 | void dateChanged(QDate &newdate); | 36 | void dateChanged(QDate &newdate); |
36 | void setDbl(bool on); | 37 | void setDbl(bool on); |
37 | private: | 38 | private: |
38 | QDate date; | 39 | QDate date; |
39 | //bool onMonday; | 40 | // bool onMonday; |
40 | bool bStartOnMonday; | 41 | bool bStartOnMonday; |
41 | }; | 42 | }; |
42 | 43 | ||
43 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase | 44 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase |
44 | { | 45 | { |
45 | Q_OBJECT | 46 | Q_OBJECT |
46 | public: | 47 | public: |
47 | DateBookWeekLstDayHdr(const QDate &d, bool onM, | 48 | DateBookWeekLstDayHdr(const QDate &d, bool onM, |
48 | QWidget* parent = 0, const char* name = 0, | 49 | QWidget* parent = 0, const char* name = 0, |
49 | WFlags fl = 0 ); | 50 | WFlags fl = 0 ); |
50 | public slots: | 51 | public slots: |
51 | void showDay(); | 52 | void showDay(); |
52 | void newEvent(); | 53 | void newEvent(); |
53 | signals: | 54 | signals: |
54 | void showDate(int y, int m, int d); | 55 | void showDate(int y, int m, int d); |
55 | void addEvent(const QDateTime &start, const QDateTime &stop, | 56 | void addEvent(const QDateTime &start, const QDateTime &stop, |
56 | const QString &str, const QString &location); | 57 | const QString &str, const QString &location); |
57 | private: | 58 | private: |
58 | QDate date; | 59 | QDate date; |
59 | }; | 60 | }; |
60 | 61 | ||
61 | class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel | 62 | class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel |
62 | { | 63 | { |
63 | Q_OBJECT | 64 | Q_OBJECT |
64 | public: | 65 | public: |
65 | DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1, | 66 | DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1, |
66 | QWidget* parent = 0, const char* name = 0, | 67 | QWidget* parent = 0, const char* name = 0, |
67 | WFlags fl = 0); | 68 | WFlags fl = 0); |
68 | signals: | 69 | signals: |
69 | void editEvent(const Event &e); | 70 | void editEvent(const Event &e); |
70 | void duplicateEvent(const Event &e); | 71 | void duplicateEvent(const Event &e); |
71 | void removeEvent(const Event &e); | 72 | void removeEvent(const Event &e); |
72 | void beamEvent(const Event &e); | 73 | void beamEvent(const Event &e); |
73 | void redraw(); | 74 | void redraw(); |
@@ -85,57 +86,57 @@ protected: | |||
85 | 86 | ||
86 | class DateBookWeekLstView: public QWidget | 87 | class DateBookWeekLstView: public QWidget |
87 | { | 88 | { |
88 | Q_OBJECT | 89 | Q_OBJECT |
89 | public: | 90 | public: |
90 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, | 91 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, |
91 | QWidget* parent = 0, const char* name = 0, | 92 | QWidget* parent = 0, const char* name = 0, |
92 | WFlags fl = 0 ); | 93 | WFlags fl = 0 ); |
93 | ~DateBookWeekLstView(); | 94 | ~DateBookWeekLstView(); |
94 | signals: | 95 | signals: |
95 | void editEvent(const Event &e); | 96 | void editEvent(const Event &e); |
96 | void duplicateEvent(const Event &e); | 97 | void duplicateEvent(const Event &e); |
97 | void removeEvent(const Event &e); | 98 | void removeEvent(const Event &e); |
98 | void beamEvent(const Event &e); | 99 | void beamEvent(const Event &e); |
99 | void redraw(); | 100 | void redraw(); |
100 | void showDate(int y, int m, int d); | 101 | void showDate(int y, int m, int d); |
101 | void addEvent(const QDateTime &start, const QDateTime &stop, | 102 | void addEvent(const QDateTime &start, const QDateTime &stop, |
102 | const QString &str, const QString &location); | 103 | const QString &str, const QString &location); |
103 | private: | 104 | private: |
104 | bool bStartOnMonday; | 105 | bool bStartOnMonday; |
105 | protected slots: | 106 | protected slots: |
106 | void keyPressEvent(QKeyEvent *); | 107 | void keyPressEvent(QKeyEvent *); |
107 | }; | 108 | }; |
108 | 109 | ||
109 | class DateBookWeekLstDblView: public QWidget { | 110 | class DateBookWeekLstDblView: public QWidget { |
110 | Q_OBJECT | 111 | Q_OBJECT |
111 | public: | 112 | public: |
112 | DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, | 113 | DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, |
113 | QValueList<EffectiveEvent> &ev2, | 114 | QValueList<EffectiveEvent> &ev2, |
114 | QDate &d, bool onM, | 115 | QDate &d, bool onM, |
115 | QWidget* parent = 0, const char* name = 0, | 116 | QWidget* parent = 0, const char* name = 0, |
116 | WFlags fl = 0 ); | 117 | WFlags fl = 0 ); |
117 | signals: | 118 | signals: |
118 | void editEvent(const Event &e); | 119 | void editEvent(const Event &e); |
119 | void duplicateEvent(const Event &e); | 120 | void duplicateEvent(const Event &e); |
120 | void removeEvent(const Event &e); | 121 | void removeEvent(const Event &e); |
121 | void beamEvent(const Event &e); | 122 | void beamEvent(const Event &e); |
122 | void redraw(); | 123 | void redraw(); |
123 | void showDate(int y, int m, int d); | 124 | void showDate(int y, int m, int d); |
124 | void addEvent(const QDateTime &start, const QDateTime &stop, | 125 | void addEvent(const QDateTime &start, const QDateTime &stop, |
125 | const QString &str, const QString &location); | 126 | const QString &str, const QString &location); |
126 | }; | 127 | }; |
127 | 128 | ||
128 | class DateBookWeekLst : public QWidget | 129 | class DateBookWeekLst : public QWidget |
129 | { | 130 | { |
130 | Q_OBJECT | 131 | Q_OBJECT |
131 | 132 | ||
132 | public: | 133 | public: |
133 | DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB, | 134 | DateBookWeekLst( bool ampm, bool onM, DateBookDBHoliday *newDB, |
134 | QWidget *parent = 0, | 135 | QWidget *parent = 0, |
135 | const char *name = 0 ); | 136 | const char *name = 0 ); |
136 | ~DateBookWeekLst(); | 137 | ~DateBookWeekLst(); |
137 | void setDate( int y, int w ); | 138 | void setDate( int y, int w ); |
138 | void setDate(const QDate &d ); | 139 | void setDate(const QDate &d ); |
139 | int week() const { return _week; }; | 140 | int week() const { return _week; }; |
140 | QDate date(); | 141 | QDate date(); |
141 | QDate weekDate() const; | 142 | QDate weekDate() const; |
@@ -146,27 +147,27 @@ public slots: | |||
146 | 147 | ||
147 | protected slots: | 148 | protected slots: |
148 | void keyPressEvent(QKeyEvent *); | 149 | void keyPressEvent(QKeyEvent *); |
149 | void setDbl(bool on); | 150 | void setDbl(bool on); |
150 | 151 | ||
151 | signals: | 152 | signals: |
152 | void showDate(int y, int m, int d); | 153 | void showDate(int y, int m, int d); |
153 | void addEvent(const QDateTime &start, const QDateTime &stop, | 154 | void addEvent(const QDateTime &start, const QDateTime &stop, |
154 | const QString &str, const QString &location); | 155 | const QString &str, const QString &location); |
155 | void editEvent(const Event &e); | 156 | void editEvent(const Event &e); |
156 | void duplicateEvent(const Event &e); | 157 | void duplicateEvent(const Event &e); |
157 | void removeEvent(const Event &e); | 158 | void removeEvent(const Event &e); |
158 | void beamEvent(const Event &e); | 159 | void beamEvent(const Event &e); |
159 | 160 | ||
160 | private: | 161 | private: |
161 | DateBookDB *db; | 162 | DateBookDBHoliday *db; |
162 | int startTime; | 163 | int startTime; |
163 | bool ampm; | 164 | bool ampm; |
164 | bool bStartOnMonday; | 165 | bool bStartOnMonday; |
165 | bool dbl; | 166 | bool dbl; |
166 | QDate bdate; | 167 | QDate bdate; |
167 | int year, _week,dow; | 168 | int year, _week,dow; |
168 | DateBookWeekLstHeader *header; | 169 | DateBookWeekLstHeader *header; |
169 | QWidget *view; | 170 | QWidget *view; |
170 | QVBoxLayout *layout; | 171 | QVBoxLayout *layout; |
171 | QScrollView *scroll; | 172 | QScrollView *scroll; |
172 | 173 | ||