summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.cpp
authoralwin <alwin>2005-03-17 14:01:23 (UTC)
committer alwin <alwin>2005-03-17 14:01:23 (UTC)
commit8752141a5341877369f89a42fa1f0b5d08f56dbd (patch) (side-by-side diff)
tree63dc48ee207a4e9fbb6b9e8abddb239ec724c155 /core/pim/datebook/datebookday.cpp
parentafee05f4b4c1e8dab8463e3423fcfc8f9d45aa8b (diff)
downloadopie-8752141a5341877369f89a42fa1f0b5d08f56dbd.zip
opie-8752141a5341877369f89a42fa1f0b5d08f56dbd.tar.gz
opie-8752141a5341877369f89a42fa1f0b5d08f56dbd.tar.bz2
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.
Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp5
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
@@ -16,12 +16,13 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "datebookday.h"
+#include "datebooktypes.h"
#include "datebookdayheaderimpl.h"
#include "datebookdayallday.h"
#include <opie2/oholidayplugin.h>
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
@@ -224,13 +225,13 @@ void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */)
{
slotReturnPressed(); // Reuse code to add event and close this widget.
}
//===========================================================================
-DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, DateBookHoliday*newHdb, QWidget *parent, const char *name )
+DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDBHoliday *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() );
@@ -364,13 +365,13 @@ void DateBookDay::getEvents()
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 );
+ QValueList<EffectiveEvent> eventList = db->getEffectiveEventsNoHoliday( currDate, currDate );
QValueListIterator<EffectiveEvent> it;
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.
if (ev.event().type() == Event::AllDay ) {