Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index dfe39e5..00ddd05 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp | |||
@@ -10,24 +10,25 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "datebookday.h" | 21 | #include "datebookday.h" |
22 | #include "datebooktypes.h" | ||
22 | #include "datebookdayheaderimpl.h" | 23 | #include "datebookdayheaderimpl.h" |
23 | #include "datebookdayallday.h" | 24 | #include "datebookdayallday.h" |
24 | 25 | ||
25 | #include <opie2/oholidayplugin.h> | 26 | #include <opie2/oholidayplugin.h> |
26 | #include <qpe/resource.h> | 27 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
28 | #include <qpe/ir.h> | 29 | #include <qpe/ir.h> |
29 | 30 | ||
30 | #include <qsimplerichtext.h> | 31 | #include <qsimplerichtext.h> |
31 | #include <qpopupmenu.h> | 32 | #include <qpopupmenu.h> |
32 | 33 | ||
33 | 34 | ||
@@ -218,25 +219,25 @@ void DateBookDayViewQuickLineEdit::slotReturnPressed() | |||
218 | } | 219 | } |
219 | void DateBookDayViewQuickLineEdit::finallyCallClose() { | 220 | void DateBookDayViewQuickLineEdit::finallyCallClose() { |
220 | close(true); // also deletes this widget... | 221 | close(true); // also deletes this widget... |
221 | } | 222 | } |
222 | 223 | ||
223 | void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */) | 224 | void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */) |
224 | { | 225 | { |
225 | slotReturnPressed(); // Reuse code to add event and close this widget. | 226 | slotReturnPressed(); // Reuse code to add event and close this widget. |
226 | } | 227 | } |
227 | 228 | ||
228 | //=========================================================================== | 229 | //=========================================================================== |
229 | 230 | ||
230 | DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, DateBookHoliday*newHdb, QWidget *parent, const char *name ) | 231 | DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDBHoliday *newDb, DateBookHoliday*newHdb, QWidget *parent, const char *name ) |
231 | : QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 ) | 232 | : QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 ) |
232 | { | 233 | { |
233 | widgetList.setAutoDelete( true ); | 234 | widgetList.setAutoDelete( true ); |
234 | _holiday_db = newHdb; | 235 | _holiday_db = newHdb; |
235 | header = new DateBookDayHeader( startOnMonday, this, "day header" ); | 236 | header = new DateBookDayHeader( startOnMonday, this, "day header" ); |
236 | header->setDate( currDate.year(), currDate.month(), currDate.day() ); | 237 | header->setDate( currDate.year(), currDate.month(), currDate.day() ); |
237 | 238 | ||
238 | m_allDays = new DatebookdayAllday(newDb, this, "all day event list" ); | 239 | m_allDays = new DatebookdayAllday(newDb, this, "all day event list" ); |
239 | m_allDays->hide(); | 240 | m_allDays->hide(); |
240 | 241 | ||
241 | view = new DateBookDayView( ampm, this, "day view" ); | 242 | view = new DateBookDayView( ampm, this, "day view" ); |
242 | 243 | ||
@@ -358,25 +359,25 @@ void DateBookDay::getEvents() | |||
358 | /* clear the AllDay List */ | 359 | /* clear the AllDay List */ |
359 | m_allDays->hide(); // just in case | 360 | m_allDays->hide(); // just in case |
360 | m_allDays->removeAllEvents(); | 361 | m_allDays->removeAllEvents(); |
361 | 362 | ||
362 | QStringList hdays = _holiday_db->holidaylist(currDate); | 363 | QStringList hdays = _holiday_db->holidaylist(currDate); |
363 | QStringList::Iterator sit; | 364 | QStringList::Iterator sit; |
364 | QObject* object = 0; | 365 | QObject* object = 0; |
365 | for (sit=hdays.begin();sit!=hdays.end();++sit) { | 366 | for (sit=hdays.begin();sit!=hdays.end();++sit) { |
366 | object = m_allDays->addHoliday(*sit); | 367 | object = m_allDays->addHoliday(*sit); |
367 | if (!object) continue; | 368 | if (!object) continue; |
368 | /* not to do something with it */ | 369 | /* not to do something with it */ |
369 | } | 370 | } |
370 | QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); | 371 | QValueList<EffectiveEvent> eventList = db->getEffectiveEventsNoHoliday( currDate, currDate ); |
371 | QValueListIterator<EffectiveEvent> it; | 372 | QValueListIterator<EffectiveEvent> it; |
372 | 373 | ||
373 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { | 374 | for ( it = eventList.begin(); it != eventList.end(); ++it ) { |
374 | EffectiveEvent ev=*it; | 375 | EffectiveEvent ev=*it; |
375 | if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day. | 376 | if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day. |
376 | if (ev.event().type() == Event::AllDay ) { | 377 | if (ev.event().type() == Event::AllDay ) { |
377 | object = m_allDays->addEvent( ev ); | 378 | object = m_allDays->addEvent( ev ); |
378 | if (!object) | 379 | if (!object) |
379 | continue; | 380 | continue; |
380 | }else { | 381 | }else { |
381 | DateBookDayWidget* w = new DateBookDayWidget( *it, this ); | 382 | DateBookDayWidget* w = new DateBookDayWidget( *it, this ); |
382 | widgetList.append( w ); | 383 | widgetList.append( w ); |