summaryrefslogtreecommitdiff
authorhakan <hakan>2002-03-29 16:33:34 (UTC)
committer hakan <hakan>2002-03-29 16:33:34 (UTC)
commit3a1684894efb2106f957469b94350abf754a404e (patch) (unidiff)
tree22e475a3dd11da80fa4f3735b479102715ba7eb3
parentd31e0363e905aae78034626896b0d6620ffbc8fc (diff)
downloadopie-3a1684894efb2106f957469b94350abf754a404e.zip
opie-3a1684894efb2106f957469b94350abf754a404e.tar.gz
opie-3a1684894efb2106f957469b94350abf754a404e.tar.bz2
Editing an event will no longer clears it's uid
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp12
-rw-r--r--core/pim/datebook/dateentryimpl.cpp2
-rw-r--r--core/pim/datebook/timepicker.cpp1
3 files changed, 9 insertions, 6 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 2deb96f..97c305c 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -207,12 +207,13 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
207 QCopChannel *channel = new QCopChannel( "QPE/System", this ); 207 QCopChannel *channel = new QCopChannel( "QPE/System", this );
208 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 208 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
209 this, SLOT(receive(const QCString&, const QByteArray&)) ); 209 this, SLOT(receive(const QCString&, const QByteArray&)) );
210 channel = new QCopChannel( "QPE/Datebook", this ); 210 channel = new QCopChannel( "QPE/Datebook", this );
211 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 211 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
212 this, SLOT(receive(const QCString&, const QByteArray&)) ); 212 this, SLOT(receive(const QCString&, const QByteArray&)) );
213 qDebug("olle\n");
213#endif 214#endif
214#endif 215#endif
215 216
216 qDebug("done t=%d", t.elapsed() ); 217 qDebug("done t=%d", t.elapsed() );
217 218
218} 219}
@@ -227,18 +228,16 @@ void DateBook::receive( const QCString &msg, const QByteArray &data )
227 else if ( weekAction->isOn() ) 228 else if ( weekAction->isOn() )
228 viewWeek(); 229 viewWeek();
229 else if ( monthAction->isOn() ) 230 else if ( monthAction->isOn() )
230 viewMonth(); 231 viewMonth();
231 } 232 }
232 else if (msg == "editEvent(int)") { 233 else if (msg == "editEvent(int)") {
233 /* Not yet working... 234 int uid;
234 int uid; 235 stream >> uid;
235 stream >> uid; 236 Event e=db->getEvent(uid);
236 Event e=db->getEvent(uid); 237 editEvent(e);
237 editEvent(e);
238 */
239 } 238 }
240} 239}
241 240
242DateBook::~DateBook() 241DateBook::~DateBook()
243{ 242{
244} 243}
@@ -398,12 +397,13 @@ void DateBook::editEvent( const Event &e )
398 397
399#if defined(Q_WS_QWS) || defined(_WS_QWS_) 398#if defined(Q_WS_QWS) || defined(_WS_QWS_)
400 editDlg.showMaximized(); 399 editDlg.showMaximized();
401#endif 400#endif
402 while (editDlg.exec() ) { 401 while (editDlg.exec() ) {
403 Event newEv = entry->event(); 402 Event newEv = entry->event();
403 newEv.setUid(e.uid()); // FIXME: Hack not to clear uid
404 QString error = checkEvent(newEv); 404 QString error = checkEvent(newEv);
405 if (!error.isNull()) { 405 if (!error.isNull()) {
406 if (QMessageBox::warning(this, "error box", 406 if (QMessageBox::warning(this, "error box",
407 error, "Fix it", "Continue", 407 error, "Fix it", "Continue",
408 0, 0, 1) == 0) 408 0, 0, 1) == 0)
409 continue; 409 continue;
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index 1c43363..e563db0 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -110,14 +110,16 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
110void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) 110void DateEntry::setDates( const QDateTime& s, const QDateTime& e )
111{ 111{
112 startDate = s.date(); 112 startDate = s.date();
113 endDate = e.date(); 113 endDate = e.date();
114 startTime = s.time(); 114 startTime = s.time();
115 endTime = e.time(); 115 endTime = e.time();
116
116 startDateChanged( s.date().year(), s.date().month(), s.date().day() ); 117 startDateChanged( s.date().year(), s.date().month(), s.date().day() );
117 endDateChanged( e.date().year(), e.date().month(), e.date().day() ); 118 endDateChanged( e.date().year(), e.date().month(), e.date().day() );
119
118 updateTimeEdit(true,true); 120 updateTimeEdit(true,true);
119} 121}
120 122
121void DateEntry::updateTimeEdit(bool s, bool e) { 123void DateEntry::updateTimeEdit(bool s, bool e) {
122 124
123 // Comboboxes 125 // Comboboxes
diff --git a/core/pim/datebook/timepicker.cpp b/core/pim/datebook/timepicker.cpp
index 5f08a05..9097e1b 100644
--- a/core/pim/datebook/timepicker.cpp
+++ b/core/pim/datebook/timepicker.cpp
@@ -2,12 +2,13 @@
2 2
3#include <qbuttongroup.h> 3#include <qbuttongroup.h>
4#include <qtoolbutton.h> 4#include <qtoolbutton.h>
5#include <qlayout.h> 5#include <qlayout.h>
6#include "clickablelabel.h" 6#include "clickablelabel.h"
7#include <qstring.h> 7#include <qstring.h>
8#include <stdio.h>
8 9
9TimePicker::TimePicker(QWidget* parent = 0, const char* name = 0, 10TimePicker::TimePicker(QWidget* parent = 0, const char* name = 0,
10 WFlags fl = 0) : 11 WFlags fl = 0) :
11 QWidget(parent,name,fl) 12 QWidget(parent,name,fl)
12{ 13{
13 QVBoxLayout *vbox=new QVBoxLayout(this); 14 QVBoxLayout *vbox=new QVBoxLayout(this);