author | zautrix <zautrix> | 2005-01-15 00:20:28 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-15 00:20:28 (UTC) |
commit | 80da9080c1c33c4704806c442179522edce06bd2 (patch) (side-by-side diff) | |
tree | f17bfb786b7c85d4d3bf93545494dafdf9ec5184 /korganizer | |
parent | d937154e5ae3691dda55fac9114142f92e29e37b (diff) | |
download | kdepimpi-80da9080c1c33c4704806c442179522edce06bd2.zip kdepimpi-80da9080c1c33c4704806c442179522edce06bd2.tar.gz kdepimpi-80da9080c1c33c4704806c442179522edce06bd2.tar.bz2 |
completed todo
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 20 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 |
4 files changed, 22 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 363dc32..378c7d4 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2727,4 +2727,6 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), viewManager(), SLOT( showAgendaView( bool ) ) ); + connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), + this, SLOT( todoChanged(Todo *) ) ); mEventViewerDialog->resize( 640, 480 ); diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 68c0e1a..772fd95 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -150,5 +150,8 @@ void KOEventViewerDialog::addEvent(Event *event) mEventViewer->addEvent(event); mIncidence = event; - findButton( Close )->setFocus(); + findButton( Close )->setFocus(); + if ( !mSyncMode ) { + findButton( User1 )->setText( i18n("Agenda")); + } } @@ -157,5 +160,8 @@ void KOEventViewerDialog::setTodo(Todo *event) mEventViewer->setTodo(event); mIncidence = (Incidence*)event; - findButton( Close )->setFocus(); + findButton( Close )->setFocus(); + if ( !mSyncMode ) { + findButton( User1 )->setText( i18n("Set complete")); + } } void KOEventViewerDialog::setJournal(Journal *j) @@ -164,4 +170,7 @@ void KOEventViewerDialog::setJournal(Journal *j) mIncidence = (Incidence*)j; findButton( Close )->setFocus(); + if ( !mSyncMode ) { + findButton( User1 )->setText( i18n("Agenda")); + } } @@ -200,4 +209,5 @@ void KOEventViewerDialog::showIncidence() QDate date; if ( mIncidence->type() == "Todo" ) { + /* if ( ((Todo*)mIncidence)->hasDueDate() ) date = ((Todo*)mIncidence)->dtDue().date(); @@ -207,4 +217,10 @@ void KOEventViewerDialog::showIncidence() return; } + */ + ((Todo*)mIncidence)->setCompleted( true ); + hide(); + emit todoCompleted(((Todo*)mIncidence)); + return; + } else date = mIncidence->dtStart().date(); diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 21cb3ee..b6b4103 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -56,4 +56,5 @@ class KOEventViewerDialog : public KDialogBase { void jumpToTime( const QDate &); void showAgendaView( bool ); + void todoCompleted(Todo*); private slots: void editIncidence(); diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 6f76e2c..3c251fb 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h @@ -67,5 +67,4 @@ class KOViewManager : public QObject void setDocumentId( const QString & ); - void updateView(); void updateView( const QDate &start, const QDate &end ); @@ -82,4 +81,5 @@ class KOViewManager : public QObject void printWNV(); public slots: + void updateView(); void showWhatsNextView(); void showListView(); |