summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-18 09:41:45 (UTC)
committer zautrix <zautrix>2004-10-18 09:41:45 (UTC)
commit112db6c41265da5255a58424186d95d7a00b6ff0 (patch) (unidiff)
treed0ca062305a6dfea479268e2de9c755da8a75708
parent56990d318b15eacf7d3cc7425ab62f68da099ddf (diff)
downloadkdepimpi-112db6c41265da5255a58424186d95d7a00b6ff0.zip
kdepimpi-112db6c41265da5255a58424186d95d7a00b6ff0.tar.gz
kdepimpi-112db6c41265da5255a58424186d95d7a00b6ff0.tar.bz2
template loading changed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneralevent.cpp24
-rw-r--r--korganizer/koeditorgeneralevent.h1
2 files changed, 14 insertions, 11 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 42c3df1..fc5be71 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -51,4 +51,5 @@ KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent,
51 KOEditorGeneral( parent, name) 51 KOEditorGeneral( parent, name)
52{ 52{
53 mTemplate = false;
53 connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), 54 connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
54 SLOT(setDuration())); 55 SLOT(setDuration()));
@@ -176,11 +177,12 @@ void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end)
176{ 177{
177// kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; 178// kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl;
178 179 if ( !mTemplate )
179 mStartDateEdit->setDate(start.date()); 180 mStartDateEdit->setDate(start.date());
180 // KTimeEdit seems to emit some signals when setTime() is called. 181 // KTimeEdit seems to emit some signals when setTime() is called.
181 mStartTimeEdit->blockSignals( true ); 182 mStartTimeEdit->blockSignals( true );
182 mStartTimeEdit->setTime(start.time()); 183 mStartTimeEdit->setTime(start.time());
183 mStartTimeEdit->blockSignals( false ); 184 mStartTimeEdit->blockSignals( false );
184 mEndDateEdit->setDate(end.date()); 185 if ( !mTemplate )
186 mEndDateEdit->setDate(end.date());
185 mEndTimeEdit->setTime(end.time()); 187 mEndTimeEdit->setTime(end.time());
186 188
@@ -262,12 +264,12 @@ void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl )
262 QString tmpStr; 264 QString tmpStr;
263 265
264 if ( !tmpl ) { 266 mTemplate = tmpl;
265 // the rest is for the events only 267 // the rest is for the events only
266 mNoTimeButton->setChecked(event->doesFloat()); 268 mNoTimeButton->setChecked(event->doesFloat());
267 timeStuffDisable(event->doesFloat()); 269 timeStuffDisable(event->doesFloat());
268 270
269 setDateTimes(event->dtStart(),event->dtEnd()); 271 setDateTimes(event->dtStart(),event->dtEnd());
270 } 272
271 273 mTemplate = false;
272 switch( event->transparency() ) { 274 switch( event->transparency() ) {
273 case Event::Transparent: 275 case Event::Transparent:
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index 188dc93..0174788 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -91,4 +91,5 @@ class KOEditorGeneralEvent : public KOEditorGeneral
91 91
92 private: 92 private:
93 bool mTemplate;
93 QLabel *mStartDateLabel; 94 QLabel *mStartDateLabel;
94 QLabel *mEndDateLabel; 95 QLabel *mEndDateLabel;