author | eilers <eilers> | 2003-08-01 14:22:29 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 14:22:29 (UTC) |
commit | 7d51872c86155fbbf27aeb8e49e7a336d909caac (patch) (unidiff) | |
tree | 55ecf3452d6711065e36c6bceab8ec52bd5525d8 /core/pim/todo/otaskeditor.cpp | |
parent | 34991bac7d96b1c17601be6a5607819342571e0c (diff) | |
download | opie-7d51872c86155fbbf27aeb8e49e7a336d909caac.zip opie-7d51872c86155fbbf27aeb8e49e7a336d909caac.tar.gz opie-7d51872c86155fbbf27aeb8e49e7a336d909caac.tar.bz2 |
Merging changes from BRANCH_1_0 to HEAD
Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index 84f854f..1ed20b4 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -1,6 +1,3 @@ | |||
1 | #include <qdatetime.h> | ||
2 | #include <qlabel.h> | ||
3 | #include <qlayout.h> | 1 | #include <qlayout.h> |
4 | #include <qmultilineedit.h> | ||
5 | 2 | ||
6 | #include <opie/orecurrancewidget.h> | 3 | #include <opie/orecurrancewidget.h> |
@@ -27,17 +24,15 @@ OTaskEditor::~OTaskEditor() { | |||
27 | void OTaskEditor::init( int cur ) { | 24 | void OTaskEditor::init( int cur ) { |
28 | OTodo to; | 25 | OTodo to; |
26 | to.setUid( 1 ); // generate a new uid | ||
29 | if ( cur != 0 ) | 27 | if ( cur != 0 ) |
30 | to.setCategories( cur ); | 28 | to.setCategories( cur ); |
31 | load(to); | 29 | load(to); |
32 | m_uid = 1; // generate a new one | ||
33 | } | 30 | } |
34 | void OTaskEditor::init( const OTodo& to ) { | 31 | void OTaskEditor::init( const OTodo& to ) { |
35 | load( to ); | 32 | load( to ); |
36 | m_uid = to.uid(); | ||
37 | } | 33 | } |
38 | OTodo OTaskEditor::todo()const{ | 34 | OTodo OTaskEditor::todo()const{ |
39 | qWarning("saving!"); | 35 | qWarning("saving!"); |
40 | OTodo to; | 36 | OTodo to ( m_todo ); |
41 | to.setUid(m_uid ); | ||
42 | m_overView->save( to ); | 37 | m_overView->save( to ); |
43 | m_stat->save( to ); | 38 | m_stat->save( to ); |
@@ -51,9 +46,10 @@ void OTaskEditor::load(const OTodo& to) { | |||
51 | m_stat->load( to ); | 46 | m_stat->load( to ); |
52 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); | 47 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); |
53 | m_alarm->setEnabled( !to.hasRecurrence() ); | ||
54 | m_alarm->load( to ); | 48 | m_alarm->load( to ); |
49 | |||
50 | m_todo = to; | ||
55 | } | 51 | } |
56 | void OTaskEditor::init() { | 52 | void OTaskEditor::init() { |
57 | setCaption("Task Editor"); | 53 | setCaption(tr("Task Editor") ); |
58 | 54 | ||
59 | QVBoxLayout* layo = new QVBoxLayout( this ); | 55 | QVBoxLayout* layo = new QVBoxLayout( this ); |