From 8752141a5341877369f89a42fa1f0b5d08f56dbd Mon Sep 17 00:00:00 2001 From: alwin Date: Thu, 17 Mar 2005 14:01:23 +0000 Subject: 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. --- (limited to 'core/pim/datebook/datebooktypes.h') 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 @@ +#ifndef _DATEBOOK_TYPES_H +#define _DATEBOOK_TYPES_H + +#include + +#include +#include + +namespace Opie { +namespace Datebook { + class HolidayPlugin; + class HolidayPluginIf; +} +} + +class QLibrary; + +class DateBookDBHack : virtual public DateBookDB { + public: + virtual ~DateBookDBHack(){} + Event eventByUID(int id); +}; + +class DateBookHoliday +{ +public: + DateBookHoliday(); + virtual ~DateBookHoliday(); + + QStringList holidaylist(const QDate&); + QStringList holidaylist(unsigned year, unsigned month, unsigned day); + virtual QValueList getEffectiveEvents(const QDate &from,const QDate &to ); + virtual QValueList getEffectiveEvents(const QDateTime &start); + +protected: + void init(); + void deinit(); + + struct HPlugin { + Opie::Datebook::HolidayPlugin*_plugin; + QLibrary*_lib; + Opie::Datebook::HolidayPluginIf*_if; + }; + QValueList_pluginlist; +}; + +class DateBookDBHoliday:virtual public DateBookDBHack { +public: + DateBookDBHoliday():DateBookDBHack(){db_holiday=0;} + virtual ~DateBookDBHoliday(){} + virtual QValueList getEffectiveEvents(const QDate &from,const QDate &to ); + virtual QValueList getEffectiveEvents(const QDateTime &start); + virtual QValueList getEffectiveEventsNoHoliday(const QDate &from,const QDate &to ); + virtual QValueList getEffectiveEventsNoHoliday(const QDateTime &start); + + DateBookHoliday*db_holiday; +}; + +#endif -- cgit v0.9.0.2