summaryrefslogtreecommitdiff
path: root/core/pim/datebook/modules/weeklst/datebookweeklstview.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/modules/weeklst/datebookweeklstview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/modules/weeklst/datebookweeklstview.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/pim/datebook/modules/weeklst/datebookweeklstview.cpp b/core/pim/datebook/modules/weeklst/datebookweeklstview.cpp
index 82b9c6d..469a60a 100644
--- a/core/pim/datebook/modules/weeklst/datebookweeklstview.cpp
+++ b/core/pim/datebook/modules/weeklst/datebookweeklstview.cpp
@@ -8,4 +8,5 @@
8 8
9#include <qpe/config.h> 9#include <qpe/config.h>
10#include <qpe/qpeapplication.h>
10 11
11#include <qlayout.h> 12#include <qlayout.h>
@@ -13,8 +14,8 @@
13 14
14DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, 15DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
15 const QDate &d, bool onM, 16 const QDate &d, bool onM, bool showAmPm,
16 QWidget* parent, 17 QWidget* parent,
17 const char* name, WFlags fl) 18 const char* name, WFlags fl)
18 : QWidget( parent, name, fl ) 19 : QWidget( parent, name, fl ), ampm(showAmPm)
19{ 20{
20 childs.clear(); 21 childs.clear();
@@ -66,5 +67,5 @@ void DateBookWeekLstView::setEvents(QValueList<EffectiveEvent> &ev, const QDate
66 QVBoxLayout * tlayout = new QVBoxLayout(w); 67 QVBoxLayout * tlayout = new QVBoxLayout(w);
67 childs.append(w); 68 childs.append(w);
68 // Header 69 // Header
69 DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,w); 70 DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,w);
70 connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); 71 connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
@@ -72,9 +73,10 @@ void DateBookWeekLstView::setEvents(QValueList<EffectiveEvent> &ev, const QDate
72 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); 73 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
73 tlayout->addWidget(hdr); 74 tlayout->addWidget(hdr);
75 connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool)));
74 76
75 // Events 77 // Events
76 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { 78 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
77 if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) { // Skip events ending at 00:00 starting at another day. 79 if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) { // Skip events ending at 00:00 starting at another day.
78 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,w); 80 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(ampm,*it,weeklistviewconfig,w);
79 tlayout->addWidget(l); 81 tlayout->addWidget(l);
80 connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); 82 connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
@@ -88,12 +90,12 @@ void DateBookWeekLstView::setEvents(QValueList<EffectiveEvent> &ev, const QDate
88 tlayout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); 90 tlayout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
89 m_MainLayout->addWidget(w); 91 m_MainLayout->addWidget(w);
90/*
91 QSpacerItem * tmp = new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding);
92 m_MainLayout->addItem(tmp);
93*/
94 } 92 }
95 setUpdatesEnabled(true); 93 setUpdatesEnabled(true);
96} 94}
97 95
96void DateBookWeekLstView::slotClockChanged( bool ap ) {
97 ampm = ap;
98}
99
98DateBookWeekLstView::~DateBookWeekLstView() 100DateBookWeekLstView::~DateBookWeekLstView()
99{} 101{}