summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.cpp
Unidiff
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 @@
22#include "datebookdayheaderimpl.h" 22#include "datebookdayheaderimpl.h"
23#include "datebookdayallday.h" 23#include "datebookdayallday.h"
24 24
25#include <opie2/oholidayplugin.h>
25#include <qpe/resource.h> 26#include <qpe/resource.h>
26#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
27#include <qpe/ir.h> 28#include <qpe/ir.h>
@@ -226,10 +227,11 @@ void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */)
226 227
227//=========================================================================== 228//===========================================================================
228 229
229DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, QWidget *parent, const char *name ) 230DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, DateBookHoliday*newHdb, QWidget *parent, const char *name )
230 : QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 ) 231 : QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 )
231{ 232{
232 widgetList.setAutoDelete( true ); 233 widgetList.setAutoDelete( true );
234 _holiday_db = newHdb;
233 header = new DateBookDayHeader( startOnMonday, this, "day header" ); 235 header = new DateBookDayHeader( startOnMonday, this, "day header" );
234 header->setDate( currDate.year(), currDate.month(), currDate.day() ); 236 header->setDate( currDate.year(), currDate.month(), currDate.day() );
235 237
@@ -357,9 +359,17 @@ void DateBookDay::getEvents()
357 m_allDays->hide(); // just in case 359 m_allDays->hide(); // just in case
358 m_allDays->removeAllEvents(); 360 m_allDays->removeAllEvents();
359 361
362 QStringList hdays = _holiday_db->holidaylist(currDate);
363 QStringList::Iterator sit;
364 QObject* object = 0;
365 for (sit=hdays.begin();sit!=hdays.end();++sit) {
366 object = m_allDays->addHoliday(*sit);
367 if (!object) continue;
368 /* not to do something with it */
369 }
360 QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); 370 QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate );
361 QValueListIterator<EffectiveEvent> it; 371 QValueListIterator<EffectiveEvent> it;
362 QObject* object = 0; 372
363 for ( it = eventList.begin(); it != eventList.end(); ++it ) { 373 for ( it = eventList.begin(); it != eventList.end(); ++it ) {
364 EffectiveEvent ev=*it; 374 EffectiveEvent ev=*it;
365 if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) {// Skip events ending at 00:00 starting at another day. 375 if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) {// Skip events ending at 00:00 starting at another day.