author | zautrix <zautrix> | 2005-04-14 20:32:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-14 20:32:31 (UTC) |
commit | 7e87a287a0860882af27e26288bc9cc553dd3a0b (patch) (side-by-side diff) | |
tree | a55374f708a8c27da182bcd8d975ad3f20f39057 | |
parent | 2a449f785f955649df9de639d38dcb250fe1376d (diff) | |
download | kdepimpi-7e87a287a0860882af27e26288bc9cc553dd3a0b.zip kdepimpi-7e87a287a0860882af27e26288bc9cc553dd3a0b.tar.gz kdepimpi-7e87a287a0860882af27e26288bc9cc553dd3a0b.tar.bz2 |
fix
-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 24 | ||||
-rw-r--r-- | korganizer/koeditorgeneralevent.h | 2 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 7 |
3 files changed, 18 insertions, 15 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index 3b2a276..af97ee9 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -144,5 +144,4 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) this, SLOT(endDateChanged(QDate))); - connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); - connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),mEndTimeEdit,SLOT(setTime(QTime))); - + connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(sTimeChanged(QTime))); + connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(eTimeChanged(QTime))); } @@ -198,5 +197,14 @@ void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end) +void KOEditorGeneralEvent::sTimeChanged(QTime ti) +{ + mStartTimeEdit->setTime( ti ); + startTimeChanged ( ti); +} +void KOEditorGeneralEvent::eTimeChanged(QTime ti ) +{ + mEndTimeEdit->setTime( ti ); + endTimeChanged( ti ); +} void KOEditorGeneralEvent::startTimeChanged(QTime newtime) { - kdDebug() << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; @@ -204,5 +212,5 @@ void KOEditorGeneralEvent::startTimeChanged(QTime newtime) - mCurrStartDateTime.setTime(newtime); - + mCurrStartDateTime = QDateTime( mStartDateEdit->date(), QTime(newtime.hour(),newtime.minute(),0) ); // adjust end time so that the event has the same duration as before. + if( secsep > 0 ) mCurrEndDateTime = mCurrStartDateTime.addSecs(secsep); @@ -216,6 +224,4 @@ void KOEditorGeneralEvent::endTimeChanged(QTime newtime) { -// kdDebug() << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; - QDateTime newdt(mCurrEndDateTime.date(), newtime); - mCurrEndDateTime = newdt; + mCurrEndDateTime = QDateTime ( mEndDateEdit->date(), QTime(newtime.hour(),newtime.minute(),0)); diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h index 0174788..9649806 100644 --- a/korganizer/koeditorgeneralevent.h +++ b/korganizer/koeditorgeneralevent.h @@ -85,2 +85,4 @@ class KOEditorGeneralEvent : public KOEditorGeneral void emitDateTimeStr(); + void sTimeChanged(QTime); + void eTimeChanged(QTime); diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index baa11b5..e5ff8af 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -218,6 +218,3 @@ void KOEventViewerDialog::editIncidence() if ( mIncidence ){ -#ifndef DESKTOP_VERSION - //hide(); close(); -#endif emit editIncidence( mIncidence ); @@ -256,5 +253,3 @@ void KOEventViewerDialog::showIncidence() } -#ifndef DESKTOP_VERSION - reject(); -#endif + close(); } |