Diffstat (limited to 'core/pim/datebook/modules/weeklst/datebookweeklst.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/modules/weeklst/datebookweeklst.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/pim/datebook/modules/weeklst/datebookweeklst.cpp b/core/pim/datebook/modules/weeklst/datebookweeklst.cpp index b36bf6d..59f937f 100644 --- a/core/pim/datebook/modules/weeklst/datebookweeklst.cpp +++ b/core/pim/datebook/modules/weeklst/datebookweeklst.cpp | |||
@@ -9,8 +9,9 @@ | |||
9 | #include <opie2/odebug.h> | 9 | #include <opie2/odebug.h> |
10 | 10 | ||
11 | #include <qpe/datebookmonth.h> | 11 | #include <qpe/datebookmonth.h> |
12 | #include <qpe/config.h> | 12 | #include <qpe/config.h> |
13 | #include <qpe/qpeapplication.h> | ||
13 | 14 | ||
14 | #include <qlayout.h> | 15 | #include <qlayout.h> |
15 | #include <qtoolbutton.h> | 16 | #include <qtoolbutton.h> |
16 | 17 | ||
@@ -67,9 +68,11 @@ void DateBookWeekLst::setDbl(bool on) { | |||
67 | getEvents(); | 68 | getEvents(); |
68 | } | 69 | } |
69 | } | 70 | } |
70 | 71 | ||
71 | void DateBookWeekLst::redraw() {getEvents();} | 72 | void DateBookWeekLst::redraw() { |
73 | getEvents(); | ||
74 | } | ||
72 | 75 | ||
73 | QDate DateBookWeekLst::date() { | 76 | QDate DateBookWeekLst::date() { |
74 | return bdate; | 77 | return bdate; |
75 | } | 78 | } |
@@ -105,11 +108,11 @@ void DateBookWeekLst::getEvents() { | |||
105 | el2 = db->getEffectiveEvents(start2, stop); | 108 | el2 = db->getEffectiveEvents(start2, stop); |
106 | } | 109 | } |
107 | if (!m_CurrentView) { | 110 | if (!m_CurrentView) { |
108 | if (dbl) { | 111 | if (dbl) { |
109 | m_CurrentView=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll); | 112 | m_CurrentView=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,ampm,scroll); |
110 | } else { | 113 | } else { |
111 | m_CurrentView=new DateBookWeekLstDblView(el,start,bStartOnMonday,scroll); | 114 | m_CurrentView=new DateBookWeekLstDblView(el,start,bStartOnMonday,ampm,scroll); |
112 | } | 115 | } |
113 | m_CurrentView->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); | 116 | m_CurrentView->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); |
114 | connect (m_CurrentView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | 117 | connect (m_CurrentView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); |
115 | connect (m_CurrentView, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | 118 | connect (m_CurrentView, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); |
@@ -118,8 +121,9 @@ void DateBookWeekLst::getEvents() { | |||
118 | connect (m_CurrentView, SIGNAL(redraw()), this, SLOT(redraw())); | 121 | connect (m_CurrentView, SIGNAL(redraw()), this, SLOT(redraw())); |
119 | connect (m_CurrentView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | 122 | connect (m_CurrentView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); |
120 | connect (m_CurrentView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | 123 | connect (m_CurrentView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), |
121 | this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); | 124 | this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); |
125 | connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool))); | ||
122 | scroll->addChild(m_CurrentView); | 126 | scroll->addChild(m_CurrentView); |
123 | } else { | 127 | } else { |
124 | if (dbl) { | 128 | if (dbl) { |
125 | m_CurrentView->setEvents(el,el2,start,bStartOnMonday); | 129 | m_CurrentView->setEvents(el,el2,start,bStartOnMonday); |
@@ -129,8 +133,13 @@ void DateBookWeekLst::getEvents() { | |||
129 | } | 133 | } |
130 | scroll->updateScrollBars(); | 134 | scroll->updateScrollBars(); |
131 | } | 135 | } |
132 | 136 | ||
137 | void DateBookWeekLst::slotClockChanged( bool ap ) { | ||
138 | ampm = ap; | ||
139 | getEvents(); | ||
140 | } | ||
141 | |||
133 | void DateBookWeekLst::dateChanged(QDate &newdate) { | 142 | void DateBookWeekLst::dateChanged(QDate &newdate) { |
134 | dateset = true; | 143 | dateset = true; |
135 | bdate=newdate; | 144 | bdate=newdate; |
136 | odebug << "Date changed " << oendl; | 145 | odebug << "Date changed " << oendl; |