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 @@ -26,4 +26,4 @@ -enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values -enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes. +enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values +enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes. @@ -38,2 +38,10 @@ class QDate; class Ir; +class QLibrary; + +namespace Opie { +namespace Datebook { + class HolidayPlugin; + class HolidayPluginIf; +} +} @@ -44,2 +52,22 @@ class DateBookDBHack : public DateBookDB { +class DateBookHoliday +{ +public: + DateBookHoliday(); + virtual ~DateBookHoliday(); + + QStringList holidaylist(const QDate&); + QStringList holidaylist(unsigned year, unsigned month, unsigned day); +protected: + void init(); + void deinit(); + + struct HPlugin { + Opie::Datebook::HolidayPlugin*_plugin; + QLibrary*_lib; + Opie::Datebook::HolidayPluginIf*_if; + }; + QValueList<HPlugin*>_pluginlist; +}; + class DateBook : public QMainWindow @@ -49,3 +77,3 @@ class DateBook : public QMainWindow public: - static QString appName() { return QString::fromLatin1("datebook"); } + static QString appName() { return QString::fromLatin1("datebook"); } DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); @@ -73,3 +101,3 @@ private slots: void slotSettings(); - void slotToday(); // view today + void slotToday(); // view today void changeClock( bool newClock ); @@ -91,4 +119,4 @@ private slots: - void insertEvent( const Event &e ); - void editEvent( const Event &e ); + void insertEvent( const Event &e ); + void editEvent( const Event &e ); void duplicateEvent( const Event &e ); @@ -111,25 +139,26 @@ private: private: - DateBookDBHack *db; - QWidgetStack *views; - DateBookDay *dayView; - DateBookWeek *weekView; - DateBookMonth *monthView; - DateBookWeekLst *weekLstView; - QAction *dayAction, *weekAction, *weekLstAction, *monthAction; - int weeklistviewconfig; - bool aPreset; // have everything set to alarm? - int presetTime; // the standard time for the alarm - int startTime; - int rowStyle; - int defaultView; - QArray<int> defaultCategories; - QString defaultLocation; - bool bJumpToCurTime; //should jump to current time in dayview? - bool ampm; - bool onMonday; - - bool syncing; - bool inSearch; - - int alarmCounter; + DateBookDBHack *db; + DateBookHoliday*db_holiday; + QWidgetStack *views; + DateBookDay *dayView; + DateBookWeek *weekView; + DateBookMonth *monthView; + DateBookWeekLst *weekLstView; + QAction *dayAction, *weekAction, *weekLstAction, *monthAction; + int weeklistviewconfig; + bool aPreset; // have everything set to alarm? + int presetTime; // the standard time for the alarm + int startTime; + int rowStyle; + int defaultView; + QArray<int> defaultCategories; + QString defaultLocation; + bool bJumpToCurTime; //should jump to current time in dayview? + bool ampm; + bool onMonday; + + bool syncing; + bool inSearch; + + int alarmCounter; |