summaryrefslogtreecommitdiff
path: root/core/pim/todo/taskeditoroverviewimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/taskeditoroverviewimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/taskeditoroverviewimpl.cpp55
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 @@
9 9
10#include <opie/orecur.h>
11
10#include "taskeditoroverviewimpl.h" 12#include "taskeditoroverviewimpl.h"
@@ -22,3 +24,3 @@ TaskEditorOverViewImpl::~TaskEditorOverViewImpl() {
22void TaskEditorOverViewImpl::load( const OTodo& todo) { 24void TaskEditorOverViewImpl::load( const OTodo& todo) {
23 /* 25 /*
24 * now that we're 'preloaded' we 26 * now that we're 'preloaded' we
@@ -31,3 +33,5 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) {
31 33
32 34 /*
35 * get some basic dateinfos for now
36 */
33 QDate date = QDate::currentDate(); 37 QDate date = QDate::currentDate();
@@ -35,8 +39,21 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) {
35 39
36 emit recurranceEnabled( FALSE ); 40 CheckBox7->setChecked( todo.recurrence().doesRecur() );
37 ckbStart->setChecked( FALSE ); 41 emit recurranceEnabled( todo.recurrence().doesRecur() );
38 btnStart->setText( str ); 42
39 43
40 ckbComp->setChecked( FALSE ); 44 ckbStart->setChecked( todo.hasStartDate() );
41 btnComp->setText( str ); 45 btnStart->setEnabled( todo.hasStartDate() );
46 if ( todo.hasStartDate() ) {
47 m_start = todo.startDate();
48 btnStart->setText( TimeString::longDateString( m_start ) );
49 } else
50 btnStart->setText( str );
51
52 ckbComp->setChecked( todo.hasCompletedDate() );
53 btnComp->setEnabled( todo.hasCompletedDate() );
54 if ( todo.hasCompletedDate() ) {
55 m_comp = todo.completedDate();
56 btnComp->setText( TimeString::longDateString( m_comp ) );
57 }else
58 btnComp->setText( str );
42 59
@@ -49,2 +66,3 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) {
49 btnDue->setEnabled( todo.hasDueDate() ); 66 btnDue->setEnabled( todo.hasDueDate() );
67 m_due = todo.dueDate();
50 68
@@ -57,3 +75,7 @@ void TaskEditorOverViewImpl::load( const OTodo& todo) {
57void TaskEditorOverViewImpl::save( OTodo& to) { 75void TaskEditorOverViewImpl::save( OTodo& to) {
58 qWarning("save it now"); 76 /* a invalid date */
77 QDate inval;
78 /* save our info back */
79
80 /* due date */
59 if ( ckbDue->isChecked() ) { 81 if ( ckbDue->isChecked() ) {
@@ -63,2 +85,17 @@ void TaskEditorOverViewImpl::save( OTodo& to) {
63 to.setHasDueDate( false ); 85 to.setHasDueDate( false );
86
87 /* start date */
88 if ( ckbStart->isChecked() ) {
89 to.setStartDate( m_start );
90 }else
91 to.setStartDate( inval );
92
93 /* comp date */
94 if ( ckbComp->isChecked() ) {
95 qWarning("completed checked");
96 to.setCompletedDate( m_comp );
97 }else
98 to.setCompletedDate( inval );
99
100
64 if ( comboCategory->currentCategory() != -1 ) { 101 if ( comboCategory->currentCategory() != -1 ) {
@@ -138,2 +175,3 @@ void TaskEditorOverViewImpl::slotDueChecked() {
138 btnDue->setEnabled( ckbDue->isChecked() ); 175 btnDue->setEnabled( ckbDue->isChecked() );
176 emit dueDateChanged( m_due );
139 qWarning("slotDueChecked"); 177 qWarning("slotDueChecked");
@@ -143,2 +181,3 @@ void TaskEditorOverViewImpl::slotDueChanged(int y, int m, int d ) {
143 btnDue->setText( TimeString::longDateString( m_due ) ); 181 btnDue->setText( TimeString::longDateString( m_due ) );
182 emit dueDateChanged( m_due );
144} 183}