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/datebooktypes.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/datebooktypes.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebooktypes.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/core/pim/datebook/datebooktypes.h b/core/pim/datebook/datebooktypes.h new file mode 100644 index 0000000..9eb7e89 --- a/dev/null +++ b/core/pim/datebook/datebooktypes.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef _DATEBOOK_TYPES_H | ||
2 | #define _DATEBOOK_TYPES_H | ||
3 | |||
4 | #include <qpe/datebookdb.h> | ||
5 | |||
6 | #include <qvaluelist.h> | ||
7 | #include <qstringlist.h> | ||
8 | |||
9 | namespace Opie { | ||
10 | namespace Datebook { | ||
11 | class HolidayPlugin; | ||
12 | class HolidayPluginIf; | ||
13 | } | ||
14 | } | ||
15 | |||
16 | class QLibrary; | ||
17 | |||
18 | class DateBookDBHack : virtual public DateBookDB { | ||
19 | public: | ||
20 | virtual ~DateBookDBHack(){} | ||
21 | Event eventByUID(int id); | ||
22 | }; | ||
23 | |||
24 | class DateBookHoliday | ||
25 | { | ||
26 | public: | ||
27 | DateBookHoliday(); | ||
28 | virtual ~DateBookHoliday(); | ||
29 | |||
30 | QStringList holidaylist(const QDate&); | ||
31 | QStringList holidaylist(unsigned year, unsigned month, unsigned day); | ||
32 | virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDate &from,const QDate &to ); | ||
33 | virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDateTime &start); | ||
34 | |||
35 | protected: | ||
36 | void init(); | ||
37 | void deinit(); | ||
38 | |||
39 | struct HPlugin { | ||
40 | Opie::Datebook::HolidayPlugin*_plugin; | ||
41 | QLibrary*_lib; | ||
42 | Opie::Datebook::HolidayPluginIf*_if; | ||
43 | }; | ||
44 | QValueList<HPlugin*>_pluginlist; | ||
45 | }; | ||
46 | |||
47 | class DateBookDBHoliday:virtual public DateBookDBHack { | ||
48 | public: | ||
49 | DateBookDBHoliday():DateBookDBHack(){db_holiday=0;} | ||
50 | virtual ~DateBookDBHoliday(){} | ||
51 | virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDate &from,const QDate &to ); | ||
52 | virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDateTime &start); | ||
53 | virtual QValueList<EffectiveEvent> getEffectiveEventsNoHoliday(const QDate &from,const QDate &to ); | ||
54 | virtual QValueList<EffectiveEvent> getEffectiveEventsNoHoliday(const QDateTime &start); | ||
55 | |||
56 | DateBookHoliday*db_holiday; | ||
57 | }; | ||
58 | |||
59 | #endif | ||