summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.cpp
authorzautrix <zautrix>2005-06-25 16:06:31 (UTC)
committer zautrix <zautrix>2005-06-25 16:06:31 (UTC)
commit3867528ada39bb50a18802c499fbc3f6fae26e8c (patch) (unidiff)
tree6b619b3bc6dea00e52648b4a394a61ab4ee8a072 /korganizer/kotodoeditor.cpp
parent49d8fe456ce284a512227a7ca9d4d49688a39cd2 (diff)
downloadkdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.zip
kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.tar.gz
kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.tar.bz2
fixxxxx
Diffstat (limited to 'korganizer/kotodoeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoeditor.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 9073bca..8b90ae5 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -72,12 +72,14 @@ void KOTodoEditor::init()
72{ 72{
73 setupGeneral(); 73 setupGeneral();
74 setupAttendeesTab(); 74 setupAttendeesTab();
75 setupRecurrence(); 75 setupRecurrence();
76 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); 76 connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence()));
77 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); 77 mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") );
78 connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
79 mRecurrence,SLOT(setDefaultsDates(QDateTime,QDateTime)));
78} 80}
79void KOTodoEditor::setupRecurrence() 81void KOTodoEditor::setupRecurrence()
80{ 82{
81 QFrame *topFrame = addPage( i18n("Recurrence") ); 83 QFrame *topFrame = addPage( i18n("Recurrence") );
82 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 84 QBoxLayout *topLayout = new QVBoxLayout( topFrame );
83 85
@@ -302,13 +304,13 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay)
302 mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); 304 mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 );
303 mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); 305 mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 );
304 306
305 } else 307 } else
306 mGeneral->setFocusOn( 2 ); 308 mGeneral->setFocusOn( 2 );
307 tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); 309 tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false );
308 mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); 310 mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ));
309} 311}
310void KOTodoEditor::checkRecurrence() 312void KOTodoEditor::checkRecurrence()
311{ 313{
312 if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { 314 if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) {
313 tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); 315 tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true );
314 316
@@ -323,17 +325,17 @@ void KOTodoEditor::checkRecurrence()
323 } else { 325 } else {
324 to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; 326 to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ;
325 from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; 327 from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ;
326 } 328 }
327 if ( to < from ) 329 if ( to < from )
328 to = from; 330 to = from;
329 mRecurrence->setDefaults(from,to,!time); 331 mRecurrence->setDefaults(from,to);
330 } 332 }
331 } else { 333 } else {
332 tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); 334 tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false );
333 mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); 335 mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ));
334 } 336 }
335} 337}
336void KOTodoEditor::readTodo(Todo *todo) 338void KOTodoEditor::readTodo(Todo *todo)
337{ 339{
338 mGeneral->readTodo(todo); 340 mGeneral->readTodo(todo);
339 mDetails->readEvent(todo); 341 mDetails->readEvent(todo);