author | alwin <alwin> | 2005-03-17 14:01:23 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-17 14:01:23 (UTC) |
commit | 8752141a5341877369f89a42fa1f0b5d08f56dbd (patch) (unidiff) | |
tree | 63dc48ee207a4e9fbb6b9e8abddb239ec724c155 /core/pim/datebook/datebookweeklst.h | |
parent | afee05f4b4c1e8dab8463e3423fcfc8f9d45aa8b (diff) | |
download | opie-8752141a5341877369f89a42fa1f0b5d08f56dbd.zip opie-8752141a5341877369f89a42fa1f0b5d08f56dbd.tar.gz opie-8752141a5341877369f89a42fa1f0b5d08f56dbd.tar.bz2 |
1. datebookweeklist - a week has SEVEN days, not SIX. I'm wondering why
events on sunday never showed there ;)
2. extra file datebooktypes contains some special classes used by datebook
so other classes must not include the big mainheader file.
3. added support for holiday-plugins to week-views. Month view is a little
bit more tricky 'cause TT has never heard about virtual methods and so
I have the choice between complete copy the monthview and make the modifications
or changing the interface of datebookdb-class to virtual. both isn't nice.
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 | |||
@@ -16,2 +16,3 @@ class QDateTime; | |||
16 | class DateBookDB; | 16 | class DateBookDB; |
17 | class DateBookDBHoliday; | ||
17 | 18 | ||
@@ -22,3 +23,3 @@ 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(); |
@@ -27,15 +28,15 @@ public: | |||
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 | }; |
@@ -47,4 +48,4 @@ 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: |
@@ -55,3 +56,3 @@ signals: | |||
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: |
@@ -65,4 +66,4 @@ 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: |
@@ -90,18 +91,18 @@ 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 | }; |
@@ -112,6 +113,6 @@ 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: |
@@ -124,3 +125,3 @@ signals: | |||
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 | }; |
@@ -132,5 +133,5 @@ class DateBookWeekLst : public QWidget | |||
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(); |
@@ -151,12 +152,12 @@ protected slots: | |||
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; |
@@ -165,3 +166,3 @@ private: | |||
165 | bool dbl; | 166 | bool dbl; |
166 | QDate bdate; | 167 | QDate bdate; |
167 | int year, _week,dow; | 168 | int year, _week,dow; |