author | erik <erik> | 2007-04-23 20:46:34 (UTC) |
---|---|---|
committer | erik <erik> | 2007-04-23 20:46:34 (UTC) |
commit | 34975323367e4a903886cd317b34192f1271a1f2 (patch) (side-by-side diff) | |
tree | 8898d9010cdb89b371e0bccdbf717f87359d8513 /core/pim/datebook/modules/weeklst/datebookweeklstdblview.cpp | |
parent | d38e40fe9ee475230425fa83e924c49e5946b87c (diff) | |
download | opie-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/datebookweeklstdblview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/modules/weeklst/datebookweeklstdblview.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/pim/datebook/modules/weeklst/datebookweeklstdblview.cpp b/core/pim/datebook/modules/weeklst/datebookweeklstdblview.cpp index 6389822..5182df1 100644 --- a/core/pim/datebook/modules/weeklst/datebookweeklstdblview.cpp +++ b/core/pim/datebook/modules/weeklst/datebookweeklstdblview.cpp @@ -1,63 +1,63 @@ #include "datebookweeklstdblview.h"
#include "datebookweeklstview.h"
#include <qlayout.h>
DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
QValueList<EffectiveEvent> &ev2,
- QDate &d, bool onM,
+ QDate &d, bool onM, bool showAmPm,
QWidget* parent,
const char* name, WFlags fl)
- : QWidget( parent, name, fl )
+ : QWidget( parent, name, fl ), ampm( showAmPm )
{
m_MainLayout = new QHBoxLayout( this );
leftView = 0;
rightView = 0;
setEvents(ev1,ev2,d,onM);
}
DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
- QDate &d, bool onM,
+ QDate &d, bool onM, bool showAmPm,
QWidget* parent,
const char* name, WFlags fl)
- : QWidget( parent, name, fl )
+ : QWidget( parent, name, fl ), ampm( showAmPm )
{
m_MainLayout = new QHBoxLayout( this );
leftView = 0;
rightView = 0;
setEvents(ev1,d,onM);
}
/* setting the variant with both views */
void DateBookWeekLstDblView::setEvents(QValueList<EffectiveEvent> &ev1,QValueList<EffectiveEvent> &ev2,QDate &d, bool onM)
{
setUpdatesEnabled(false);
if (!leftView) {
- leftView=new DateBookWeekLstView(ev1,d,onM,this);
+ leftView=new DateBookWeekLstView(ev1, d, onM, ampm, this);
m_MainLayout->addWidget(leftView);
connect (leftView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (leftView, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &)));
connect (leftView, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &)));
connect (leftView, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &)));
connect (leftView, SIGNAL(redraw()), this, SIGNAL(redraw()));
connect (leftView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
connect (leftView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
} else {
leftView->hide();
leftView->setEvents(ev1,d,onM);
}
if (!rightView) {
- rightView=new DateBookWeekLstView(ev2,d.addDays(7),onM,this);
+ rightView=new DateBookWeekLstView(ev2, d.addDays(7), onM, ampm, this);
m_MainLayout->addWidget(rightView);
connect (rightView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (rightView, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &)));
connect (rightView, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &)));
connect (rightView, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &)));
connect (rightView, SIGNAL(redraw()), this, SIGNAL(redraw()));
connect (rightView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
connect (rightView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
@@ -70,17 +70,17 @@ void DateBookWeekLstDblView::setEvents(QValueList<EffectiveEvent> &ev1,QValueLis leftView->show();
rightView->show();
setUpdatesEnabled(true);
}
void DateBookWeekLstDblView::setEvents(QValueList<EffectiveEvent> &ev1,QDate &d, bool onM)
{
if (!leftView) {
- leftView=new DateBookWeekLstView(ev1,d,onM,this);
+ leftView=new DateBookWeekLstView(ev1, d, onM, ampm, this);
m_MainLayout->addWidget(leftView);
connect (leftView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (leftView, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &)));
connect (leftView, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &)));
connect (leftView, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &)));
connect (leftView, SIGNAL(redraw()), this, SIGNAL(redraw()));
connect (leftView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
connect (leftView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
@@ -94,17 +94,17 @@ void DateBookWeekLstDblView::setEvents(QValueList<EffectiveEvent> &ev1,QDate &d, if (rightView) {
rightView->hide();
}
}
void DateBookWeekLstDblView::setRightEvents(QValueList<EffectiveEvent> &ev1,QDate &d, bool onM)
{
if (!rightView) {
- rightView=new DateBookWeekLstView(ev1,d,onM,this);
+ rightView=new DateBookWeekLstView(ev1, d, onM, ampm, this);
m_MainLayout->addWidget(rightView);
connect (leftView, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
connect (leftView, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &)));
connect (leftView, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &)));
connect (leftView, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &)));
connect (leftView, SIGNAL(redraw()), this, SIGNAL(redraw()));
connect (leftView, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
connect (leftView, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
|