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) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/taskeditoroverviewimpl.cpp | 55 |
1 files changed, 47 insertions, 8 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 @@ -9,2 +9,4 @@ +#include <opie/orecur.h> + #include "taskeditoroverviewimpl.h" @@ -22,3 +24,3 @@ TaskEditorOverViewImpl::~TaskEditorOverViewImpl() { void TaskEditorOverViewImpl::load( const OTodo& todo) { - /* + /* * now that we're 'preloaded' we @@ -31,3 +33,5 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) { - + /* + * get some basic dateinfos for now + */ QDate date = QDate::currentDate(); @@ -35,8 +39,21 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) { - emit recurranceEnabled( FALSE ); - ckbStart->setChecked( FALSE ); - btnStart->setText( str ); + CheckBox7->setChecked( todo.recurrence().doesRecur() ); + emit recurranceEnabled( todo.recurrence().doesRecur() ); + - ckbComp->setChecked( FALSE ); - btnComp->setText( str ); + 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( todo.hasCompletedDate() ); + btnComp->setEnabled( todo.hasCompletedDate() ); + if ( todo.hasCompletedDate() ) { + m_comp = todo.completedDate(); + btnComp->setText( TimeString::longDateString( m_comp ) ); + }else + btnComp->setText( str ); @@ -49,2 +66,3 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) { btnDue->setEnabled( todo.hasDueDate() ); + m_due = todo.dueDate(); @@ -57,3 +75,7 @@ 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() ) { @@ -63,2 +85,17 @@ void TaskEditorOverViewImpl::save( OTodo& to) { 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 ) { @@ -138,2 +175,3 @@ void TaskEditorOverViewImpl::slotDueChecked() { btnDue->setEnabled( ckbDue->isChecked() ); + emit dueDateChanged( m_due ); qWarning("slotDueChecked"); @@ -143,2 +181,3 @@ void TaskEditorOverViewImpl::slotDueChanged(int y, int m, int d ) { btnDue->setText( TimeString::longDateString( m_due ) ); + emit dueDateChanged( m_due ); } |