summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp14
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.