summaryrefslogtreecommitdiff
path: root/core/pim/todo/otaskeditor.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/otaskeditor.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp
index 1ed20b4..ab1ce94 100644
--- a/core/pim/todo/otaskeditor.cpp
+++ b/core/pim/todo/otaskeditor.cpp
@@ -1,7 +1,5 @@
1#include <qlayout.h> 1#include <qlayout.h>
2 2
3#include <opie/orecurrancewidget.h>
4
5#include "taskeditoroverview.h" 3#include "taskeditoroverview.h"
6#include "taskeditorstatus.h" 4#include "taskeditorstatus.h"
7#include "taskeditoralarms.h" 5#include "taskeditoralarms.h"
@@ -13,7 +11,7 @@ OTaskEditor::OTaskEditor(int cur)
13 init(); 11 init();
14 init( cur ); 12 init( cur );
15} 13}
16OTaskEditor::OTaskEditor( const OTodo& to) 14OTaskEditor::OTaskEditor( const OPimTodo& to)
17 : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { 15 : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) {
18 init(); 16 init();
19 init( to ); 17 init( to );
@@ -22,18 +20,18 @@ OTaskEditor::~OTaskEditor() {
22 20
23} 21}
24void OTaskEditor::init( int cur ) { 22void OTaskEditor::init( int cur ) {
25 OTodo to; 23 OPimTodo to;
26 to.setUid( 1 ); // generate a new uid 24 to.setUid( 1 ); // generate a new uid
27 if ( cur != 0 ) 25 if ( cur != 0 )
28 to.setCategories( cur ); 26 to.setCategories( cur );
29 load(to); 27 load(to);
30} 28}
31void OTaskEditor::init( const OTodo& to ) { 29void OTaskEditor::init( const OPimTodo& to ) {
32 load( to ); 30 load( to );
33} 31}
34OTodo OTaskEditor::todo()const{ 32OPimTodo OTaskEditor::todo()const{
35 qWarning("saving!"); 33 qWarning("saving!");
36 OTodo to ( m_todo ); 34 OPimTodo to ( m_todo );
37 m_overView->save( to ); 35 m_overView->save( to );
38 m_stat->save( to ); 36 m_stat->save( to );
39 to.setRecurrence( m_rec->recurrence() ); 37 to.setRecurrence( m_rec->recurrence() );
@@ -41,12 +39,12 @@ OTodo OTaskEditor::todo()const{
41 39
42 return to; 40 return to;
43} 41}
44void OTaskEditor::load(const OTodo& to) { 42void OTaskEditor::load(const OPimTodo& to) {
45 m_overView->load( to ); 43 m_overView->load( to );
46 m_stat->load( to ); 44 m_stat->load( to );
47 m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); 45 m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() );
48 m_alarm->load( to ); 46 m_alarm->load( to );
49 47
50 m_todo = to; 48 m_todo = to;
51} 49}
52void OTaskEditor::init() { 50void OTaskEditor::init() {
@@ -75,7 +73,7 @@ void OTaskEditor::init() {
75// lbl->setText( tr("X-Ref") ); 73// lbl->setText( tr("X-Ref") );
76// m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); 74// m_tab->addTab( lbl, "todo/xref", tr("X-Ref") );
77 75
78 m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); 76 m_rec = new OPimRecurrenceWidget( true, QDate::currentDate(), this );
79 m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); 77 m_tab->addTab( m_rec, "repeat", tr("Recurrence") );
80 78
81 79