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/datebook.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/datebook.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.h | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h index 54ffcfb..3d7f5b5 100644 --- a/core/pim/datebook/datebook.h +++ b/core/pim/datebook/datebook.h | |||
@@ -17,12 +17,14 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef DATEBOOK_H | 20 | #ifndef DATEBOOK_H |
21 | #define DATEBOOK_H | 21 | #define DATEBOOK_H |
22 | 22 | ||
23 | #include "datebooktypes.h" | ||
24 | |||
23 | #include <qpe/datebookdb.h> | 25 | #include <qpe/datebookdb.h> |
24 | 26 | ||
25 | #include <qmainwindow.h> | 27 | #include <qmainwindow.h> |
26 | 28 | ||
27 | enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values | 29 | enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values |
28 | enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes. | 30 | enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes. |
@@ -33,45 +35,12 @@ class DateBookDay; | |||
33 | class DateBookWeek; | 35 | class DateBookWeek; |
34 | class DateBookWeekLst; | 36 | class DateBookWeekLst; |
35 | class DateBookMonth; | 37 | class DateBookMonth; |
36 | class Event; | 38 | class Event; |
37 | class QDate; | 39 | class QDate; |
38 | class Ir; | 40 | class Ir; |
39 | class QLibrary; | ||
40 | |||
41 | namespace Opie { | ||
42 | namespace Datebook { | ||
43 | class HolidayPlugin; | ||
44 | class HolidayPluginIf; | ||
45 | } | ||
46 | } | ||
47 | |||
48 | class DateBookDBHack : public DateBookDB { | ||
49 | public: | ||
50 | Event eventByUID(int id); | ||
51 | }; | ||
52 | |||
53 | class DateBookHoliday | ||
54 | { | ||
55 | public: | ||
56 | DateBookHoliday(); | ||
57 | virtual ~DateBookHoliday(); | ||
58 | |||
59 | QStringList holidaylist(const QDate&); | ||
60 | QStringList holidaylist(unsigned year, unsigned month, unsigned day); | ||
61 | protected: | ||
62 | void init(); | ||
63 | void deinit(); | ||
64 | |||
65 | struct HPlugin { | ||
66 | Opie::Datebook::HolidayPlugin*_plugin; | ||
67 | QLibrary*_lib; | ||
68 | Opie::Datebook::HolidayPluginIf*_if; | ||
69 | }; | ||
70 | QValueList<HPlugin*>_pluginlist; | ||
71 | }; | ||
72 | 41 | ||
73 | class DateBook : public QMainWindow | 42 | class DateBook : public QMainWindow |
74 | { | 43 | { |
75 | Q_OBJECT | 44 | Q_OBJECT |
76 | 45 | ||
77 | public: | 46 | public: |
@@ -134,13 +103,13 @@ private: | |||
134 | void initWeekLst(); | 103 | void initWeekLst(); |
135 | void initMonth(); | 104 | void initMonth(); |
136 | void loadSettings(); | 105 | void loadSettings(); |
137 | void saveSettings(); | 106 | void saveSettings(); |
138 | 107 | ||
139 | private: | 108 | private: |
140 | DateBookDBHack *db; | 109 | DateBookDBHoliday *db; |
141 | DateBookHoliday*db_holiday; | 110 | DateBookHoliday*db_holiday; |
142 | QWidgetStack *views; | 111 | QWidgetStack *views; |
143 | DateBookDay *dayView; | 112 | DateBookDay *dayView; |
144 | DateBookWeek *weekView; | 113 | DateBookWeek *weekView; |
145 | DateBookMonth *monthView; | 114 | DateBookMonth *monthView; |
146 | DateBookWeekLst *weekLstView; | 115 | DateBookWeekLst *weekLstView; |