summaryrefslogtreecommitdiff
path: root/core/pim/datebook/modules/weeklst/datebookweeklst.cpp
authorerik <erik>2007-04-23 20:46:34 (UTC)
committer erik <erik>2007-04-23 20:46:34 (UTC)
commit34975323367e4a903886cd317b34192f1271a1f2 (patch) (side-by-side diff)
tree8898d9010cdb89b371e0bccdbf717f87359d8513 /core/pim/datebook/modules/weeklst/datebookweeklst.cpp
parentd38e40fe9ee475230425fa83e924c49e5946b87c (diff)
downloadopie-34975323367e4a903886cd317b34192f1271a1f2.zip
opie-34975323367e4a903886cd317b34192f1271a1f2.tar.gz
opie-34975323367e4a903886cd317b34192f1271a1f2.tar.bz2
Fix for bug 1844. The display of 12hour (AM/PM) time was broken. It was
because the views never bother to check. This fix incorporates the patch submitted by harlekin. Thanks!
Diffstat (limited to 'core/pim/datebook/modules/weeklst/datebookweeklst.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/modules/weeklst/datebookweeklst.cpp15
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
@@ -10,6 +10,7 @@
#include <qpe/datebookmonth.h>
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
#include <qlayout.h>
#include <qtoolbutton.h>
@@ -68,7 +69,9 @@ void DateBookWeekLst::setDbl(bool on) {
}
}
-void DateBookWeekLst::redraw() {getEvents();}
+void DateBookWeekLst::redraw() {
+ getEvents();
+}
QDate DateBookWeekLst::date() {
return bdate;
@@ -106,9 +109,9 @@ void DateBookWeekLst::getEvents() {
}
if (!m_CurrentView) {
if (dbl) {
- m_CurrentView=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll);
+ m_CurrentView=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,ampm,scroll);
} else {
- m_CurrentView=new DateBookWeekLstDblView(el,start,bStartOnMonday,scroll);
+ m_CurrentView=new DateBookWeekLstDblView(el,start,bStartOnMonday,ampm,scroll);
}
m_CurrentView->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
connect (m_CurrentView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
@@ -119,6 +122,7 @@ void DateBookWeekLst::getEvents() {
connect (m_CurrentView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
connect (m_CurrentView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
+ connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool)));
scroll->addChild(m_CurrentView);
} else {
if (dbl) {
@@ -130,6 +134,11 @@ void DateBookWeekLst::getEvents() {
scroll->updateScrollBars();
}
+void DateBookWeekLst::slotClockChanged( bool ap ) {
+ ampm = ap;
+ getEvents();
+}
+
void DateBookWeekLst::dateChanged(QDate &newdate) {
dateset = true;
bdate=newdate;