author | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
commit | fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb (patch) (side-by-side diff) | |
tree | 32e68b5b483dd3ce8041542e7d95f0b6d8dbf644 /core/pim/todo/taskeditoroverviewimpl.cpp | |
parent | bd692f7ebe04e23151cce39baf311b925ccf91b1 (diff) | |
download | opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.zip opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.gz opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.bz2 |
Back from hospital with new power
This versions clean up m failure on templates with Qt... in todoview
Implements Recurrance( backends to not safe it yet )
OPimState and Maintainer mode in some ways
and much more
This one also implements the OPimMainWindow specs
and has a small Memu replacement to get the toolbar in one line
Diffstat (limited to 'core/pim/todo/taskeditoroverviewimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/todo/taskeditoroverviewimpl.cpp | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/core/pim/todo/taskeditoroverviewimpl.cpp b/core/pim/todo/taskeditoroverviewimpl.cpp index 24b3386..aef3b1d 100644 --- a/core/pim/todo/taskeditoroverviewimpl.cpp +++ b/core/pim/todo/taskeditoroverviewimpl.cpp @@ -8,4 +8,6 @@ #include <qpe/timestring.h> +#include <opie/orecur.h> + #include "taskeditoroverviewimpl.h" @@ -30,13 +32,28 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) { btnStart->setEnabled( FALSE ); - + /* + * get some basic dateinfos for now + */ QDate date = QDate::currentDate(); QString str = TimeString::longDateString( date ); - emit recurranceEnabled( FALSE ); - ckbStart->setChecked( FALSE ); + CheckBox7->setChecked( todo.recurrence().doesRecur() ); + emit recurranceEnabled( todo.recurrence().doesRecur() ); + + + ckbStart->setChecked( todo.hasStartDate() ); + btnStart->setEnabled( todo.hasStartDate() ); + if ( todo.hasStartDate() ) { + m_start = todo.startDate(); + btnStart->setText( TimeString::longDateString( m_start ) ); + } else btnStart->setText( str ); - ckbComp->setChecked( FALSE ); + ckbComp->setChecked( todo.hasCompletedDate() ); + btnComp->setEnabled( todo.hasCompletedDate() ); + if ( todo.hasCompletedDate() ) { + m_comp = todo.completedDate(); + btnComp->setText( TimeString::longDateString( m_comp ) ); + }else btnComp->setText( str ); @@ -48,4 +65,5 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) { btnDue->setText( TimeString::longDateString( todo.dueDate() ) ); btnDue->setEnabled( todo.hasDueDate() ); + m_due = todo.dueDate(); cmbPrio->setCurrentItem( todo.priority() -1 ); @@ -56,5 +74,9 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) { } void TaskEditorOverViewImpl::save( OTodo& to) { - qWarning("save it now"); + /* a invalid date */ + QDate inval; + /* save our info back */ + + /* due date */ if ( ckbDue->isChecked() ) { to.setDueDate( m_due ); @@ -62,4 +84,19 @@ void TaskEditorOverViewImpl::save( OTodo& to) { }else to.setHasDueDate( false ); + + /* start date */ + if ( ckbStart->isChecked() ) { + to.setStartDate( m_start ); + }else + to.setStartDate( inval ); + + /* comp date */ + if ( ckbComp->isChecked() ) { + qWarning("completed checked"); + to.setCompletedDate( m_comp ); + }else + to.setCompletedDate( inval ); + + if ( comboCategory->currentCategory() != -1 ) { QArray<int> arr = comboCategory->currentCategories(); @@ -137,4 +174,5 @@ void TaskEditorOverViewImpl::slotStartChanged(int y, int m, int d) { void TaskEditorOverViewImpl::slotDueChecked() { btnDue->setEnabled( ckbDue->isChecked() ); + emit dueDateChanged( m_due ); qWarning("slotDueChecked"); } @@ -142,4 +180,5 @@ void TaskEditorOverViewImpl::slotDueChanged(int y, int m, int d ) { m_due.setYMD(y, m, d ); btnDue->setText( TimeString::longDateString( m_due ) ); + emit dueDateChanged( m_due ); } void TaskEditorOverViewImpl::slotCompletedChecked() { |