summaryrefslogtreecommitdiff
path: root/core/pim/todo/otaskeditor.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/otaskeditor.cpp33
1 files changed, 21 insertions, 12 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp
index 8b261de..eeb3c0c 100644
--- a/core/pim/todo/otaskeditor.cpp
+++ b/core/pim/todo/otaskeditor.cpp
@@ -4,2 +4,3 @@
4#include <qmultilineedit.h> 4#include <qmultilineedit.h>
5#include <qscrollview.h>
5 6
@@ -8,3 +9,3 @@
8#include "taskeditoroverviewimpl.h" 9#include "taskeditoroverviewimpl.h"
9#include "taskeditoradvanced.h" 10#include "taskeditoradvancedimpl.h"
10#include "taskeditoralarms.h" 11#include "taskeditoralarms.h"
@@ -42,3 +43,4 @@ OTodo OTaskEditor::todo()const{
42 m_overView->save( to ); 43 m_overView->save( to );
43 to.setDescription( m_line->text() ); 44 m_adv->save( to );
45 to.setRecurrence( m_rec->recurrence() );
44 46
@@ -48,3 +50,4 @@ void OTaskEditor::load(const OTodo& to) {
48 m_overView->load( to ); 50 m_overView->load( to );
49 m_line->setText( to.description() ); 51 m_adv->load( to );
52 m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() );
50} 53}
@@ -52,5 +55,13 @@ void OTaskEditor::init() {
52 QVBoxLayout* lay = new QVBoxLayout(this); 55 QVBoxLayout* lay = new QVBoxLayout(this);
56 QScrollView* view = new QScrollView( this );
57 view->setResizePolicy( QScrollView::AutoOneFit );
58 lay->addWidget( view );
59
53 setCaption("Task Editor"); 60 setCaption("Task Editor");
54 m_tab = new OTabWidget(this); 61 QWidget* container = new QWidget( view->viewport() );
62 view->addChild( container );
55 63
64 QVBoxLayout* layo = new QVBoxLayout( container );
65 m_tab = new OTabWidget(container );
66 layo->addWidget( m_tab );
56 /* 67 /*
@@ -61,9 +72,3 @@ void OTaskEditor::init() {
61 72
62 m_adv = new TaskEditorAdvanced( m_tab ); 73 m_adv = new TaskEditorAdvancedImpl( m_tab );
63 m_line = new QMultiLineEdit(m_adv );
64 m_line->setWordWrap( QMultiLineEdit::WidgetWidth );
65 QLabel* label = new QLabel(m_adv );
66 label->setText( tr("Description") );
67 ((QGridLayout*) m_adv->layout() )->addWidget( label,3, 0 );
68 ((QGridLayout*) m_adv->layout())->addWidget( m_line,4,0 );
69 m_tab->addTab( m_adv, QString::null, tr("Advanced") ); 74 m_tab->addTab( m_adv, QString::null, tr("Advanced") );
@@ -83,3 +88,2 @@ void OTaskEditor::init() {
83 88
84 lay->addWidget(m_tab );
85 89
@@ -89,2 +93,7 @@ void OTaskEditor::init() {
89 93
94 /* connect due date changed to the recurrence tab */
95 connect(m_overView, SIGNAL(dueDateChanged(const QDate&) ),
96 m_rec, SLOT(setStartDate(const QDate& ) ) );
97
98
90 m_tab->setCurrentTab( m_overView ); 99 m_tab->setCurrentTab( m_overView );