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 | |||
@@ -11,73 +11,42 @@ | |||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
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. |
29 | 31 | ||
30 | class QAction; | 32 | class QAction; |
31 | class QWidgetStack; | 33 | class QWidgetStack; |
32 | class DateBookDay; | 34 | 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: |
78 | static QString appName() { return QString::fromLatin1("datebook"); } | 47 | static QString appName() { return QString::fromLatin1("datebook"); } |
79 | DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 48 | DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
80 | ~DateBook(); | 49 | ~DateBook(); |
81 | 50 | ||
82 | signals: | 51 | signals: |
83 | void newEvent(); | 52 | void newEvent(); |
@@ -128,25 +97,25 @@ private slots: | |||
128 | void beamDone( Ir *ir ); | 97 | void beamDone( Ir *ir ); |
129 | 98 | ||
130 | private: | 99 | private: |
131 | void addEvent( const Event &e ); | 100 | void addEvent( const Event &e ); |
132 | void initDay(); | 101 | void initDay(); |
133 | void initWeek(); | 102 | void initWeek(); |
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; |
147 | QAction *dayAction, *weekAction, *weekLstAction, *monthAction; | 116 | QAction *dayAction, *weekAction, *weekLstAction, *monthAction; |
148 | int weeklistviewconfig; | 117 | int weeklistviewconfig; |
149 | bool aPreset; // have everything set to alarm? | 118 | bool aPreset; // have everything set to alarm? |
150 | int presetTime; // the standard time for the alarm | 119 | int presetTime; // the standard time for the alarm |
151 | int startTime; | 120 | int startTime; |
152 | int rowStyle; | 121 | int rowStyle; |