-rw-r--r-- | core/pim/todo/taskeditoroverview.cpp | 4 | ||||
-rw-r--r-- | core/pim/todo/taskeditorstatus.cpp | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/core/pim/todo/taskeditoroverview.cpp b/core/pim/todo/taskeditoroverview.cpp index 92408ba..9a8abea 100644 --- a/core/pim/todo/taskeditoroverview.cpp +++ b/core/pim/todo/taskeditoroverview.cpp | |||
@@ -142,8 +142,8 @@ void TaskEditorOverView::load( const OTodo& todo ) | |||
142 | cmbCategory->setCategories( todo.categories(), "Todo List", tr( "Todo List" ) ); | 142 | cmbCategory->setCategories( todo.categories(), "Todo List", tr( "Todo List" ) ); |
143 | 143 | ||
144 | // Recurrence | 144 | // Recurrence |
145 | ckbRecurrence->setChecked( todo.recurrence().doesRecur() ); | 145 | ckbRecurrence->setChecked( todo.hasRecurrence() ); |
146 | emit recurranceEnabled( todo.recurrence().doesRecur() ); | 146 | emit recurranceEnabled( todo.hasRecurrence() ); |
147 | 147 | ||
148 | // Notes | 148 | // Notes |
149 | mleNotes->setText( todo.description() ); | 149 | mleNotes->setText( todo.description() ); |
diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp index b11fdab..4331877 100644 --- a/core/pim/todo/taskeditorstatus.cpp +++ b/core/pim/todo/taskeditorstatus.cpp | |||
@@ -64,7 +64,7 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f | |||
64 | QWidget *container = new QWidget( sv->viewport() ); | 64 | QWidget *container = new QWidget( sv->viewport() ); |
65 | sv->addChild( container ); | 65 | sv->addChild( container ); |
66 | 66 | ||
67 | QGridLayout *layout = new QGridLayout( container, 7, 3, 4, 4 ); | 67 | QGridLayout *layout = new QGridLayout( container, 7, 3, 4, 4 ); |
68 | 68 | ||
69 | // Status | 69 | // Status |
70 | QLabel *label = new QLabel( tr( "Status:" ), container ); | 70 | QLabel *label = new QLabel( tr( "Status:" ), container ); |
@@ -91,7 +91,7 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f | |||
91 | cmbProgress->insertItem( tr( "100 %" ) ); | 91 | cmbProgress->insertItem( tr( "100 %" ) ); |
92 | layout->addMultiCellWidget( cmbProgress, 1, 1, 1, 2 ); | 92 | layout->addMultiCellWidget( cmbProgress, 1, 1, 1, 2 ); |
93 | QWhatsThis::add( cmbProgress, tr( "Select progress made on this task here." ) ); | 93 | QWhatsThis::add( cmbProgress, tr( "Select progress made on this task here." ) ); |
94 | 94 | ||
95 | // Start date | 95 | // Start date |
96 | ckbStart = new QCheckBox( tr( "Start Date:" ), container ); | 96 | ckbStart = new QCheckBox( tr( "Start Date:" ), container ); |
97 | layout->addWidget( ckbStart, 2, 0 ); | 97 | layout->addWidget( ckbStart, 2, 0 ); |
@@ -107,7 +107,7 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f | |||
107 | btnStart->setPopup( popup ); | 107 | btnStart->setPopup( popup ); |
108 | connect( m_startBook, SIGNAL( dateClicked( int, int, int ) ), | 108 | connect( m_startBook, SIGNAL( dateClicked( int, int, int ) ), |
109 | this, SLOT( slotStartChanged( int, int, int ) ) ); | 109 | this, SLOT( slotStartChanged( int, int, int ) ) ); |
110 | 110 | ||
111 | // Due date | 111 | // Due date |
112 | ckbDue = new QCheckBox( tr( "Due Date:" ), container ); | 112 | ckbDue = new QCheckBox( tr( "Due Date:" ), container ); |
113 | layout->addWidget( ckbDue, 3, 0 ); | 113 | layout->addWidget( ckbDue, 3, 0 ); |
@@ -123,7 +123,7 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f | |||
123 | btnDue->setPopup( popup ); | 123 | btnDue->setPopup( popup ); |
124 | connect( m_dueBook, SIGNAL( dateClicked( int, int, int ) ), | 124 | connect( m_dueBook, SIGNAL( dateClicked( int, int, int ) ), |
125 | this, SLOT( slotDueChanged( int, int, int ) ) ); | 125 | this, SLOT( slotDueChanged( int, int, int ) ) ); |
126 | 126 | ||
127 | // Completed | 127 | // Completed |
128 | ckbComp = new QCheckBox( tr( "Completed:" ), container ); | 128 | ckbComp = new QCheckBox( tr( "Completed:" ), container ); |
129 | layout->addWidget( ckbComp, 4, 0 ); | 129 | layout->addWidget( ckbComp, 4, 0 ); |
@@ -179,14 +179,14 @@ void TaskEditorStatus::load( const OTodo &todo ) | |||
179 | QString str = TimeString::longDateString( date ); | 179 | QString str = TimeString::longDateString( date ); |
180 | 180 | ||
181 | // Status | 181 | // Status |
182 | int state = todo.state().state(); | 182 | int state = todo.hasState()? todo.state().state() : OPimState::NotStarted; |
183 | if ( state == OPimState::Undefined ) | 183 | if ( state == OPimState::Undefined ) |
184 | state = OPimState::NotStarted; | 184 | state = OPimState::NotStarted; |
185 | cmbStatus->setCurrentItem( state ); | 185 | cmbStatus->setCurrentItem( state ); |
186 | 186 | ||
187 | // Progress | 187 | // Progress |
188 | cmbProgress->setCurrentItem( todo.progress() / 20 ); | 188 | cmbProgress->setCurrentItem( todo.progress() / 20 ); |
189 | 189 | ||
190 | // Start date | 190 | // Start date |
191 | ckbStart->setChecked( todo.hasStartDate() ); | 191 | ckbStart->setChecked( todo.hasStartDate() ); |
192 | btnStart->setEnabled( todo.hasStartDate() ); | 192 | btnStart->setEnabled( todo.hasStartDate() ); |
@@ -216,7 +216,7 @@ void TaskEditorStatus::load( const OTodo &todo ) | |||
216 | btnComp->setText( str ); | 216 | btnComp->setText( str ); |
217 | 217 | ||
218 | // Maintainer Mode | 218 | // Maintainer Mode |
219 | state = todo.maintainer().mode(); | 219 | state = todo.hasMaintainer() ? todo.maintainer().mode() : OPimMaintainer::Nothing; |
220 | if ( state == OPimMaintainer::Undefined ) | 220 | if ( state == OPimMaintainer::Undefined ) |
221 | state = OPimMaintainer::Nothing; | 221 | state = OPimMaintainer::Nothing; |
222 | cmbMaintMode->setCurrentItem( state ); | 222 | cmbMaintMode->setCurrentItem( state ); |
@@ -230,7 +230,7 @@ void TaskEditorStatus::save( OTodo &todo ) | |||
230 | 230 | ||
231 | // Status | 231 | // Status |
232 | todo.setState( OPimState( cmbStatus->currentItem() ) ); | 232 | todo.setState( OPimState( cmbStatus->currentItem() ) ); |
233 | 233 | ||
234 | // Progress | 234 | // Progress |
235 | todo.setProgress( cmbProgress->currentItem() * 20 ); | 235 | todo.setProgress( cmbProgress->currentItem() * 20 ); |
236 | 236 | ||
@@ -259,7 +259,7 @@ void TaskEditorStatus::save( OTodo &todo ) | |||
259 | } | 259 | } |
260 | else | 260 | else |
261 | todo.setCompletedDate( inval ); | 261 | todo.setCompletedDate( inval ); |
262 | 262 | ||
263 | // Maintainer mode - not implemented yet | 263 | // Maintainer mode - not implemented yet |
264 | 264 | ||
265 | // Maintainer | 265 | // Maintainer |