Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index d1e50f7..f0128bc 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -1,56 +1,57 @@ | |||
1 | #include <qlayout.h> | 1 | #include <qlayout.h> |
2 | 2 | ||
3 | #include "taskeditoroverview.h" | 3 | #include "taskeditoroverview.h" |
4 | #include "taskeditorstatus.h" | 4 | #include "taskeditorstatus.h" |
5 | #include "taskeditoralarms.h" | 5 | #include "taskeditoralarms.h" |
6 | 6 | ||
7 | #include "otaskeditor.h" | 7 | #include "otaskeditor.h" |
8 | 8 | ||
9 | using namespace Opie::Ui; | ||
9 | OTaskEditor::OTaskEditor(int cur) | 10 | OTaskEditor::OTaskEditor(int cur) |
10 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 11 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
11 | init(); | 12 | init(); |
12 | init( cur ); | 13 | init( cur ); |
13 | } | 14 | } |
14 | OTaskEditor::OTaskEditor( const OPimTodo& to) | 15 | OTaskEditor::OTaskEditor( const OPimTodo& to) |
15 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 16 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
16 | init(); | 17 | init(); |
17 | init( to ); | 18 | init( to ); |
18 | } | 19 | } |
19 | OTaskEditor::~OTaskEditor() { | 20 | OTaskEditor::~OTaskEditor() { |
20 | 21 | ||
21 | } | 22 | } |
22 | void OTaskEditor::init( int cur ) { | 23 | void OTaskEditor::init( int cur ) { |
23 | OPimTodo to; | 24 | OPimTodo to; |
24 | to.setUid( 1 ); // generate a new uid | 25 | to.setUid( 1 ); // generate a new uid |
25 | if ( cur != 0 ) | 26 | if ( cur != 0 ) |
26 | to.setCategories( cur ); | 27 | to.setCategories( cur ); |
27 | load(to); | 28 | load(to); |
28 | } | 29 | } |
29 | void OTaskEditor::init( const OPimTodo& to ) { | 30 | void OTaskEditor::init( const OPimTodo& to ) { |
30 | load( to ); | 31 | load( to ); |
31 | } | 32 | } |
32 | OPimTodo OTaskEditor::todo()const{ | 33 | OPimTodo OTaskEditor::todo()const{ |
33 | qWarning("saving!"); | 34 | qWarning("saving!"); |
34 | OPimTodo to ( m_todo ); | 35 | OPimTodo to ( m_todo ); |
35 | m_overView->save( to ); | 36 | m_overView->save( to ); |
36 | m_stat->save( to ); | 37 | m_stat->save( to ); |
37 | to.setRecurrence( m_rec->recurrence() ); | 38 | to.setRecurrence( m_rec->recurrence() ); |
38 | m_alarm->save( to ); | 39 | m_alarm->save( to ); |
39 | 40 | ||
40 | return to; | 41 | return to; |
41 | } | 42 | } |
42 | void OTaskEditor::load(const OPimTodo& to) { | 43 | void OTaskEditor::load(const OPimTodo& to) { |
43 | m_overView->load( to ); | 44 | m_overView->load( to ); |
44 | m_stat->load( to ); | 45 | m_stat->load( to ); |
45 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); | 46 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); |
46 | m_alarm->load( to ); | 47 | m_alarm->load( to ); |
47 | 48 | ||
48 | m_todo = to; | 49 | m_todo = to; |
49 | } | 50 | } |
50 | void OTaskEditor::init() { | 51 | void OTaskEditor::init() { |
51 | setCaption(tr("Task Editor") ); | 52 | setCaption(tr("Task Editor") ); |
52 | 53 | ||
53 | QVBoxLayout* layo = new QVBoxLayout( this ); | 54 | QVBoxLayout* layo = new QVBoxLayout( this ); |
54 | m_tab = new OTabWidget( this ); | 55 | m_tab = new OTabWidget( this ); |
55 | layo->addWidget( m_tab ); | 56 | layo->addWidget( m_tab ); |
56 | 57 | ||