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.cpp35
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
@@ -3,9 +3,8 @@
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"
@@ -42,5 +41,5 @@ OTodo OTaskEditor::todo()const{
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
@@ -49,41 +48,35 @@ OTodo OTaskEditor::todo()const{
49void OTaskEditor::load(const OTodo& to) { 48void 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}
54void OTaskEditor::init() { 53void 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