Diffstat (limited to 'core/pim/datebook/datebook.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.h | 87 |
1 files changed, 58 insertions, 29 deletions
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h index d7cfb33..54ffcfb 100644 --- a/core/pim/datebook/datebook.h +++ b/core/pim/datebook/datebook.h | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | #include <qmainwindow.h> | 25 | #include <qmainwindow.h> |
26 | 26 | ||
27 | enum { DAY=1,WEEK,WEEKLST,MONTH };// defaultView values | 27 | enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values |
28 | enum { NONE=0,NORMAL,EXTENDED };// WeekLstView's modes. | 28 | enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes. |
29 | 29 | ||
30 | class QAction; | 30 | class QAction; |
31 | class QWidgetStack; | 31 | class QWidgetStack; |
@@ -36,18 +36,46 @@ class DateBookMonth; | |||
36 | class Event; | 36 | class Event; |
37 | class QDate; | 37 | class QDate; |
38 | class Ir; | 38 | class Ir; |
39 | class QLibrary; | ||
40 | |||
41 | namespace Opie { | ||
42 | namespace Datebook { | ||
43 | class HolidayPlugin; | ||
44 | class HolidayPluginIf; | ||
45 | } | ||
46 | } | ||
39 | 47 | ||
40 | class DateBookDBHack : public DateBookDB { | 48 | class DateBookDBHack : public DateBookDB { |
41 | public: | 49 | public: |
42 | Event eventByUID(int id); | 50 | Event eventByUID(int id); |
43 | }; | 51 | }; |
44 | 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 | |||
45 | class DateBook : public QMainWindow | 73 | class DateBook : public QMainWindow |
46 | { | 74 | { |
47 | Q_OBJECT | 75 | Q_OBJECT |
48 | 76 | ||
49 | public: | 77 | public: |
50 | static QString appName() { return QString::fromLatin1("datebook"); } | 78 | static QString appName() { return QString::fromLatin1("datebook"); } |
51 | DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 79 | DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
52 | ~DateBook(); | 80 | ~DateBook(); |
53 | 81 | ||
@@ -71,7 +99,7 @@ private slots: | |||
71 | void fileNew(); | 99 | void fileNew(); |
72 | void slotNewEntry(const QDateTime &start, const QDateTime &end, const QString &str, const QString &location=0); | 100 | void slotNewEntry(const QDateTime &start, const QDateTime &end, const QString &str, const QString &location=0); |
73 | void slotSettings(); | 101 | void slotSettings(); |
74 | void slotToday();// view today | 102 | void slotToday(); // view today |
75 | void changeClock( bool newClock ); | 103 | void changeClock( bool newClock ); |
76 | void changeWeek( bool newDay ); | 104 | void changeWeek( bool newDay ); |
77 | void appMessage(const QCString& msg, const QByteArray& data); | 105 | void appMessage(const QCString& msg, const QByteArray& data); |
@@ -89,8 +117,8 @@ private slots: | |||
89 | 117 | ||
90 | void showDay( int y, int m, int d ); | 118 | void showDay( int y, int m, int d ); |
91 | 119 | ||
92 | void insertEvent( const Event &e ); | 120 | void insertEvent( const Event &e ); |
93 | void editEvent( const Event &e ); | 121 | void editEvent( const Event &e ); |
94 | void duplicateEvent( const Event &e ); | 122 | void duplicateEvent( const Event &e ); |
95 | void removeEvent( const Event &e ); | 123 | void removeEvent( const Event &e ); |
96 | 124 | ||
@@ -109,29 +137,30 @@ private: | |||
109 | void saveSettings(); | 137 | void saveSettings(); |
110 | 138 | ||
111 | private: | 139 | private: |
112 | DateBookDBHack *db; | 140 | DateBookDBHack *db; |
113 | QWidgetStack *views; | 141 | DateBookHoliday*db_holiday; |
114 | DateBookDay *dayView; | 142 | QWidgetStack *views; |
115 | DateBookWeek *weekView; | 143 | DateBookDay *dayView; |
116 | DateBookMonth *monthView; | 144 | DateBookWeek *weekView; |
117 | DateBookWeekLst *weekLstView; | 145 | DateBookMonth *monthView; |
118 | QAction *dayAction, *weekAction, *weekLstAction, *monthAction; | 146 | DateBookWeekLst *weekLstView; |
119 | int weeklistviewconfig; | 147 | QAction *dayAction, *weekAction, *weekLstAction, *monthAction; |
120 | bool aPreset; // have everything set to alarm? | 148 | int weeklistviewconfig; |
121 | int presetTime; // the standard time for the alarm | 149 | bool aPreset; // have everything set to alarm? |
122 | int startTime; | 150 | int presetTime; // the standard time for the alarm |
123 | int rowStyle; | 151 | int startTime; |
124 | int defaultView; | 152 | int rowStyle; |
125 | QArray<int> defaultCategories; | 153 | int defaultView; |
126 | QString defaultLocation; | 154 | QArray<int> defaultCategories; |
127 | bool bJumpToCurTime; //should jump to current time in dayview? | 155 | QString defaultLocation; |
128 | bool ampm; | 156 | bool bJumpToCurTime; //should jump to current time in dayview? |
129 | bool onMonday; | 157 | bool ampm; |
130 | 158 | bool onMonday; | |
131 | bool syncing; | 159 | |
132 | bool inSearch; | 160 | bool syncing; |
133 | 161 | bool inSearch; | |
134 | int alarmCounter; | 162 | |
163 | int alarmCounter; | ||
135 | 164 | ||
136 | QString checkEvent(const Event &); | 165 | QString checkEvent(const Event &); |
137 | }; | 166 | }; |