-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index e26d5e4..84f854f 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -39,19 +39,22 @@ OTodo OTaskEditor::todo()const{ | |||
39 | qWarning("saving!"); | 39 | qWarning("saving!"); |
40 | OTodo to; | 40 | OTodo to; |
41 | to.setUid(m_uid ); | 41 | to.setUid(m_uid ); |
42 | m_overView->save( to ); | 42 | m_overView->save( to ); |
43 | m_stat->save( to ); | 43 | m_stat->save( to ); |
44 | to.setRecurrence( m_rec->recurrence() ); | 44 | to.setRecurrence( m_rec->recurrence() ); |
45 | m_alarm->save( to ); | ||
45 | 46 | ||
46 | return to; | 47 | return to; |
47 | } | 48 | } |
48 | void OTaskEditor::load(const OTodo& to) { | 49 | void OTaskEditor::load(const OTodo& to) { |
49 | m_overView->load( to ); | 50 | m_overView->load( to ); |
50 | m_stat->load( to ); | 51 | m_stat->load( to ); |
51 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); | 52 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); |
53 | m_alarm->setEnabled( !to.hasRecurrence() ); | ||
54 | m_alarm->load( to ); | ||
52 | } | 55 | } |
53 | void OTaskEditor::init() { | 56 | void OTaskEditor::init() { |
54 | setCaption("Task Editor"); | 57 | setCaption("Task Editor"); |
55 | 58 | ||
56 | QVBoxLayout* layo = new QVBoxLayout( this ); | 59 | QVBoxLayout* layo = new QVBoxLayout( this ); |
57 | m_tab = new OTabWidget( this ); | 60 | m_tab = new OTabWidget( this ); |
@@ -66,18 +69,18 @@ void OTaskEditor::init() { | |||
66 | m_stat = new TaskEditorStatus( m_tab ); | 69 | m_stat = new TaskEditorStatus( m_tab ); |
67 | m_tab->addTab( m_stat, "todo/TodoList", tr("Status") ); | 70 | m_tab->addTab( m_stat, "todo/TodoList", tr("Status") ); |
68 | 71 | ||
69 | m_alarm = new TaskEditorAlarms( m_tab ); | 72 | m_alarm = new TaskEditorAlarms( m_tab ); |
70 | m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); | 73 | m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); |
71 | 74 | ||
72 | m_remind = new TaskEditorAlarms( m_tab ); | 75 | // m_remind = new TaskEditorAlarms( m_tab ); |
73 | m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); | 76 | // m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); |
74 | 77 | ||
75 | QLabel* lbl = new QLabel( m_tab ); | 78 | // QLabel* lbl = new QLabel( m_tab ); |
76 | lbl->setText( tr("X-Ref") ); | 79 | // lbl->setText( tr("X-Ref") ); |
77 | m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); | 80 | // m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); |
78 | 81 | ||
79 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); | 82 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); |
80 | m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); | 83 | m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); |
81 | 84 | ||
82 | 85 | ||
83 | /* signal and slots */ | 86 | /* signal and slots */ |