summaryrefslogtreecommitdiff
path: root/core/pim/todo/taskeditorstatus.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/taskeditorstatus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/taskeditorstatus.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp
index 98e3cea..367dd58 100644
--- a/core/pim/todo/taskeditorstatus.cpp
+++ b/core/pim/todo/taskeditorstatus.cpp
@@ -19,27 +19,26 @@
19 :     =  ...= . :.=- 19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU 20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = General Public License along with 21  -_. . .   )=.  = General Public License along with
22    --        :-=` this library; see the file COPYING.LIB. 22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "taskeditorstatus.h" 29#include "taskeditorstatus.h"
30 30
31#include <opie/otodo.h> 31#include <opie2/opimmaintainer.h>
32#include <opie/opimmaintainer.h> 32#include <opie2/opimstate.h>
33#include <opie/opimstate.h>
34 33
35#include <qpe/datebookmonth.h> 34#include <qpe/datebookmonth.h>
36 35
37#include <qcheckbox.h> 36#include <qcheckbox.h>
38#include <qcombobox.h> 37#include <qcombobox.h>
39#include <qlabel.h> 38#include <qlabel.h>
40#include <qlayout.h> 39#include <qlayout.h>
41#include <qwhatsthis.h> 40#include <qwhatsthis.h>
42 41
43// FIXME add the hack slots instead of setPopup!!!! 42// FIXME add the hack slots instead of setPopup!!!!
44// drw you shouldn't have removed them 43// drw you shouldn't have removed them
45 44
@@ -162,25 +161,25 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f
162 QWhatsThis::add( txtMaintainer, tr( "This is the name of the current task maintainer." ) ); 161 QWhatsThis::add( txtMaintainer, tr( "This is the name of the current task maintainer." ) );
163 tbtMaintainer = new QToolButton( container ); 162 tbtMaintainer = new QToolButton( container );
164 tbtMaintainer->setPixmap( Resource::loadPixmap( "todo/more" ) ); 163 tbtMaintainer->setPixmap( Resource::loadPixmap( "todo/more" ) );
165// layout->addWidget( tbtMaintainer, 7, 2 ); 164// layout->addWidget( tbtMaintainer, 7, 2 );
166 QWhatsThis::add( tbtMaintainer, tr( "Click here to select the task maintainer." ) ); 165 QWhatsThis::add( tbtMaintainer, tr( "Click here to select the task maintainer." ) );
167#endif 166#endif
168} 167}
169 168
170TaskEditorStatus::~TaskEditorStatus() 169TaskEditorStatus::~TaskEditorStatus()
171{ 170{
172} 171}
173 172
174void TaskEditorStatus::load( const OTodo &todo ) 173void TaskEditorStatus::load( const OPimTodo &todo )
175{ 174{
176 QDate date = QDate::currentDate(); 175 QDate date = QDate::currentDate();
177 QString str = TimeString::longDateString( date ); 176 QString str = TimeString::longDateString( date );
178 177
179 // Status 178 // Status
180 int state = todo.hasState()? todo.state().state() : OPimState::NotStarted; 179 int state = todo.hasState()? todo.state().state() : OPimState::NotStarted;
181 if ( state == OPimState::Undefined ) 180 if ( state == OPimState::Undefined )
182 state = OPimState::NotStarted; 181 state = OPimState::NotStarted;
183 cmbStatus->setCurrentItem( state ); 182 cmbStatus->setCurrentItem( state );
184 183
185 // Progress 184 // Progress
186 cmbProgress->setCurrentItem( todo.progress() / 20 ); 185 cmbProgress->setCurrentItem( todo.progress() / 20 );
@@ -214,25 +213,25 @@ void TaskEditorStatus::load( const OTodo &todo )
214 btnComp->setText( str ); 213 btnComp->setText( str );
215 214
216 // Maintainer Mode 215 // Maintainer Mode
217#if 0 216#if 0
218 state = todo.hasMaintainer() ? todo.maintainer().mode() : OPimMaintainer::Nothing; 217 state = todo.hasMaintainer() ? todo.maintainer().mode() : OPimMaintainer::Nothing;
219 if ( state == OPimMaintainer::Undefined ) 218 if ( state == OPimMaintainer::Undefined )
220 state = OPimMaintainer::Nothing; 219 state = OPimMaintainer::Nothing;
221 cmbMaintMode->setCurrentItem( state ); 220 cmbMaintMode->setCurrentItem( state );
222#endif 221#endif
223 // Maintainer - not implemented yet 222 // Maintainer - not implemented yet
224} 223}
225 224
226void TaskEditorStatus::save( OTodo &todo ) 225void TaskEditorStatus::save( OPimTodo &todo )
227{ 226{
228 QDate inval; 227 QDate inval;
229 228
230 // Status 229 // Status
231 todo.setState( OPimState( cmbStatus->currentItem() ) ); 230 todo.setState( OPimState( cmbStatus->currentItem() ) );
232 231
233 // Progress 232 // Progress
234 todo.setProgress( cmbProgress->currentItem() * 20 ); 233 todo.setProgress( cmbProgress->currentItem() * 20 );
235 234
236 // Start date 235 // Start date
237 if ( ckbStart->isChecked() ) 236 if ( ckbStart->isChecked() )
238 { 237 {