author | alwin <alwin> | 2005-03-16 13:14:26 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-16 13:14:26 (UTC) |
commit | 3d43b9e40e562957e1a3fcbe9268634db45951ce (patch) (side-by-side diff) | |
tree | 637f67a6768f6a90e7834b96100f6c70bb66950b /core/pim/datebook/datebookday.cpp | |
parent | 4fef85eb55dbef5f8546caee084e4f0ce51081d3 (diff) | |
download | opie-3d43b9e40e562957e1a3fcbe9268634db45951ce.zip opie-3d43b9e40e562957e1a3fcbe9268634db45951ce.tar.gz opie-3d43b9e40e562957e1a3fcbe9268634db45951ce.tar.bz2 |
ho.
in dayview a holiday will displayed (if plugin found)
generated a straight forward dummy-holiday-plugin for testing the
stuff.
Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index ca63dc5..dfe39e5 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -22,6 +22,7 @@ #include "datebookdayheaderimpl.h" #include "datebookdayallday.h" +#include <opie2/oholidayplugin.h> #include <qpe/resource.h> #include <qpe/qpeapplication.h> #include <qpe/ir.h> @@ -226,10 +227,11 @@ void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */) //=========================================================================== -DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, QWidget *parent, const char *name ) +DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, DateBookHoliday*newHdb, QWidget *parent, const char *name ) : QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 ) { widgetList.setAutoDelete( true ); + _holiday_db = newHdb; header = new DateBookDayHeader( startOnMonday, this, "day header" ); header->setDate( currDate.year(), currDate.month(), currDate.day() ); @@ -357,9 +359,17 @@ void DateBookDay::getEvents() m_allDays->hide(); // just in case m_allDays->removeAllEvents(); + QStringList hdays = _holiday_db->holidaylist(currDate); + QStringList::Iterator sit; + QObject* object = 0; + for (sit=hdays.begin();sit!=hdays.end();++sit) { + object = m_allDays->addHoliday(*sit); + if (!object) continue; + /* not to do something with it */ + } QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); QValueListIterator<EffectiveEvent> it; - QObject* object = 0; + for ( it = eventList.begin(); it != eventList.end(); ++it ) { EffectiveEvent ev=*it; if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day. |