summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweeklst.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebookweeklst.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookweeklst.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 771aa00..0555bc7 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -1,16 +1,17 @@
#include "namespace_hack.h"
#include "datebookweeklst.h"
#include "datebook.h"
+#include "datebooktypes.h"
#include <opie2/odebug.h>
#include <qpe/datebookmonth.h>
#include <qpe/config.h>
#include <qpe/ir.h>
#include <qpe/resource.h>
#include <qlayout.h>
#include <qtoolbutton.h>
#include <qtl.h>
@@ -308,25 +309,25 @@ DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
w=new DateBookWeekLstView(ev2,d.addDays(7),onM,this);
layout->addWidget(w);
connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (w, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &)));
connect (w, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &)));
connect (w, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &)));
connect (w, SIGNAL(redraw()), this, SIGNAL(redraw()));
connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
}
-DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
+DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDBHoliday *newDB,
QWidget *parent,
const char *name )
: QWidget( parent, name ),
db( newDB ),
startTime( 0 ),
ampm( ap ),
bStartOnMonday(onM)
{
setFocusPolicy(StrongFocus);
layout = new QVBoxLayout( this );
layout->setMargin(0);
@@ -374,31 +375,31 @@ QDate DateBookWeekLst::weekDate() const
// Calculate offset to first day of week.
int dayoffset=d.dayOfWeek();
if(bStartOnMonday) dayoffset--;
else if( dayoffset == 7 )
dayoffset = 0;
return d.addDays(-dayoffset);
}
void DateBookWeekLst::getEvents() {
QDate start = weekDate(); //date();
- QDate stop = start.addDays(6);
+ QDate stop = start.addDays(7);
QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop);
if (view) delete view;
if (dbl) {
- QDate start2=start.addDays(7);
- stop=start2.addDays(6);
+ QDate start2=start.addDays(8);
+ stop=start2.addDays(7);
QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop);
view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll);
} else {
view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll);
}
connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (view, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &)));
connect (view, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &)));
connect (view, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &)));
connect (view, SIGNAL(redraw()), this, SLOT(redraw()));
connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));