author | umopapisdn <umopapisdn> | 2003-03-24 10:09:47 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2003-03-24 10:09:47 (UTC) |
commit | 4ddc90a51f8a4d248ece9a86d01ef636fe8c95e2 (patch) (side-by-side diff) | |
tree | 3342092adf744b90b0da3be25bd35267d0610044 | |
parent | 90eeb65c389f3c5deab32e3cc9ee084e89770563 (diff) | |
download | opie-4ddc90a51f8a4d248ece9a86d01ef636fe8c95e2.zip opie-4ddc90a51f8a4d248ece9a86d01ef636fe8c95e2.tar.gz opie-4ddc90a51f8a4d248ece9a86d01ef636fe8c95e2.tar.bz2 |
Bugfix: Duplicating events introduced a bug making it impossible to add events Week List view. This fixes it.
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 18 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index e8e12ba..5334a16 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -132,17 +132,17 @@ void DateBookWeekLstDayHdr::showDay() { emit showDate(date.year(), date.month(), date.day()); } void DateBookWeekLstDayHdr::newEvent() { QDateTime start, stop; start=stop=date; start.setTime(QTime(10,0)); stop.setTime(QTime(12,0)); - emit addEvent(start,stop,""); + emit addEvent(start,stop,"",0); } DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, QWidget* parent, const char* name, WFlags fl) : OClickableLabel(parent,name,fl), event(ev) { @@ -195,20 +195,20 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, for (int i=0; i<7; i++) { // Header DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i), onMonday,this); connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); connect(hdr, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &)), + const QString &, const QString &)), this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &))); + const QString &, const QString &))); layout->addWidget(hdr); // Events while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { if(!((*it).end().hour()==(*it).start().hour() && (*it).end().minute()==(*it).start().minute())) { // Skip effective events with no duration. (i.e ending at 00:00) DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,this); layout->addWidget(l); connect (l, SIGNAL(editEvent(const Event &)), @@ -234,31 +234,31 @@ DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, DateBookWeekLstView *w=new DateBookWeekLstView(ev1,d,onM,this); layout->addWidget(w); connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); 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 &,const QString &)), this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &))); + const QString &, const QString &))); 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(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &)), + const QString &, const QString &)), this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &))); + const QString &, const QString &))); } DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB, QWidget *parent, const char *name ) : QWidget( parent, name ), db( newDB ), startTime( 0 ), @@ -336,19 +336,19 @@ void DateBookWeekLst::getEvents() { view=new DateBookWeekLstView(el,start,onMonday,scroll); } connect (view, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); connect (view, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &)), + const QString &, const QString &)), this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, - const QString &))); + const QString &, const QString &))); scroll->addChild(view); view->show(); scroll->updateScrollBars(); } void DateBookWeekLst::dateChanged(int y, int w) { year=y; diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index 24f6c83..ea88f20 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h @@ -45,17 +45,17 @@ public: QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); public slots: void showDay(); void newEvent(); signals: void showDate(int y, int m, int d); void addEvent(const QDateTime &start, const QDateTime &stop, - const QString &str); + const QString &str, const QString &location); private: QDate date; }; class DateBookWeekLstEvent: public OClickableLabel { Q_OBJECT public: @@ -77,17 +77,17 @@ public: DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~DateBookWeekLstView(); signals: void editEvent(const Event &e); void showDate(int y, int m, int d); void addEvent(const QDateTime &start, const QDateTime &stop, - const QString &str); + const QString &str, const QString &location); private: bool onMonday; protected slots: void keyPressEvent(QKeyEvent *); }; class DateBookWeekLstDblView: public QWidget { Q_OBJECT @@ -96,17 +96,17 @@ public: QValueList<EffectiveEvent> &ev2, QDate &d, bool onM, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); signals: void editEvent(const Event &e); void showDate(int y, int m, int d); void addEvent(const QDateTime &start, const QDateTime &stop, - const QString &str); + const QString &str, const QString &location); }; class DateBookWeekLst : public QWidget { Q_OBJECT public: DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB, @@ -124,17 +124,17 @@ public slots: protected slots: void keyPressEvent(QKeyEvent *); void setDbl(bool on); signals: void showDate(int y, int m, int d); void addEvent(const QDateTime &start, const QDateTime &stop, - const QString &str); + const QString &str, const QString &location); void editEvent(const Event &e); private: DateBookDB *db; int startTime; bool ampm; bool onMonday; bool dbl; |