Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index eeb3c0c..e6ebf60 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -1,15 +1,14 @@ | |||
1 | #include <qdatetime.h> | 1 | #include <qdatetime.h> |
2 | #include <qlayout.h> | 2 | #include <qlayout.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qmultilineedit.h> | 4 | #include <qmultilineedit.h> |
5 | #include <qscrollview.h> | ||
6 | 5 | ||
7 | #include <opie/orecurrancewidget.h> | 6 | #include <opie/orecurrancewidget.h> |
8 | 7 | ||
9 | #include "taskeditoroverviewimpl.h" | 8 | #include "taskeditoroverview.h" |
10 | #include "taskeditoradvancedimpl.h" | 9 | #include "taskeditoradvancedimpl.h" |
11 | #include "taskeditoralarms.h" | 10 | #include "taskeditoralarms.h" |
12 | 11 | ||
13 | #include "otaskeditor.h" | 12 | #include "otaskeditor.h" |
14 | 13 | ||
15 | OTaskEditor::OTaskEditor(int cur) | 14 | OTaskEditor::OTaskEditor(int cur) |
@@ -38,56 +37,50 @@ void OTaskEditor::init( const OTodo& to ) { | |||
38 | } | 37 | } |
39 | OTodo OTaskEditor::todo()const{ | 38 | OTodo OTaskEditor::todo()const{ |
40 | qWarning("saving!"); | 39 | qWarning("saving!"); |
41 | OTodo to; | 40 | OTodo to; |
42 | to.setUid(m_uid ); | 41 | to.setUid(m_uid ); |
43 | m_overView->save( to ); | 42 | m_overView->save( to ); |
44 | m_adv->save( to ); | 43 | //m_adv->save( to ); |
45 | to.setRecurrence( m_rec->recurrence() ); | 44 | to.setRecurrence( m_rec->recurrence() ); |
46 | 45 | ||
47 | return to; | 46 | return to; |
48 | } | 47 | } |
49 | void OTaskEditor::load(const OTodo& to) { | 48 | void OTaskEditor::load(const OTodo& to) { |
50 | m_overView->load( to ); | 49 | m_overView->load( to ); |
51 | m_adv->load( to ); | 50 | //m_adv->load( to ); |
52 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); | 51 | m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); |
53 | } | 52 | } |
54 | void OTaskEditor::init() { | 53 | void OTaskEditor::init() { |
55 | QVBoxLayout* lay = new QVBoxLayout(this ); | ||
56 | QScrollView* view = new QScrollView( this ); | ||
57 | view->setResizePolicy( QScrollView::AutoOneFit ); | ||
58 | lay->addWidget( view ); | ||
59 | |||
60 | setCaption("Task Editor"); | 54 | setCaption("Task Editor"); |
61 | QWidget* container = new QWidget( view->viewport() ); | ||
62 | view->addChild( container ); | ||
63 | 55 | ||
64 | QVBoxLayout* layo = new QVBoxLayout( container ); | 56 | QVBoxLayout* layo = new QVBoxLayout( this ); |
65 | m_tab = new OTabWidget(container ); | 57 | m_tab = new OTabWidget( this ); |
66 | layo->addWidget( m_tab ); | 58 | layo->addWidget( m_tab ); |
59 | |||
67 | /* | 60 | /* |
68 | * Add the Widgets | 61 | * Add the Widgets |
69 | */ | 62 | */ |
70 | m_overView = new TaskEditorOverViewImpl(m_tab ); | 63 | m_overView = new TaskEditorOverView( m_tab ); |
71 | m_tab->addTab( m_overView, QString::null, tr("Overview") ); | 64 | m_tab->addTab( m_overView, "TodoList", tr("Overview") ); |
72 | 65 | ||
73 | m_adv = new TaskEditorAdvancedImpl( m_tab ); | 66 | m_adv = new TaskEditorAdvancedImpl( m_tab ); |
74 | m_tab->addTab( m_adv, QString::null, tr("Advanced") ); | 67 | m_tab->addTab( m_adv, "todo/advanced", tr("Advanced") ); |
75 | 68 | ||
76 | m_alarm = new TaskEditorAlarms( m_tab ); | 69 | m_alarm = new TaskEditorAlarms( m_tab ); |
77 | m_tab->addTab( m_alarm, QString::null, tr("Alarms") ); | 70 | m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); |
78 | 71 | ||
79 | m_remind = new TaskEditorAlarms( m_tab ); | 72 | m_remind = new TaskEditorAlarms( m_tab ); |
80 | m_tab->addTab( m_remind, QString::null, tr("Reminders") ); | 73 | m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); |
81 | 74 | ||
82 | QLabel* lbl = new QLabel(m_tab ); | 75 | QLabel* lbl = new QLabel( m_tab ); |
83 | lbl->setText( tr("X-Ref") ); | 76 | lbl->setText( tr("X-Ref") ); |
84 | m_tab->addTab( lbl, QString::null, tr("X-Ref") ); | 77 | m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); |
85 | 78 | ||
86 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); | 79 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); |
87 | m_tab->addTab( m_rec, QString::null, tr("Recurrance") ); | 80 | m_tab->addTab( m_rec, "repeat", tr("Recurrance") ); |
88 | 81 | ||
89 | 82 | ||
90 | /* signal and slots */ | 83 | /* signal and slots */ |
91 | connect(m_overView, SIGNAL(recurranceEnabled(bool) ), | 84 | connect(m_overView, SIGNAL(recurranceEnabled(bool) ), |
92 | m_rec, SLOT(setEnabled(bool) ) ); | 85 | m_rec, SLOT(setEnabled(bool) ) ); |
93 | 86 | ||