author | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
commit | fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb (patch) (unidiff) | |
tree | 32e68b5b483dd3ce8041542e7d95f0b6d8dbf644 /core/pim/todo/otaskeditor.cpp | |
parent | bd692f7ebe04e23151cce39baf311b925ccf91b1 (diff) | |
download | opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.zip opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.gz opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.bz2 |
Back from hospital with new power
This versions clean up m failure on templates with Qt... in todoview
Implements Recurrance( backends to not safe it yet )
OPimState and Maintainer mode in some ways
and much more
This one also implements the OPimMainWindow specs
and has a small Memu replacement to get the toolbar in one line
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 33 |
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 | |||
@@ -3,9 +3,10 @@ | |||
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qmultilineedit.h> | 4 | #include <qmultilineedit.h> |
5 | #include <qscrollview.h> | ||
5 | 6 | ||
6 | #include <opie/orecurrancewidget.h> | 7 | #include <opie/orecurrancewidget.h> |
7 | 8 | ||
8 | #include "taskeditoroverviewimpl.h" | 9 | #include "taskeditoroverviewimpl.h" |
9 | #include "taskeditoradvanced.h" | 10 | #include "taskeditoradvancedimpl.h" |
10 | #include "taskeditoralarms.h" | 11 | #include "taskeditoralarms.h" |
11 | 12 | ||
@@ -41,5 +42,6 @@ OTodo OTaskEditor::todo()const{ | |||
41 | to.setUid(m_uid ); | 42 | to.setUid(m_uid ); |
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 | ||
45 | return to; | 47 | return to; |
@@ -47,11 +49,20 @@ OTodo OTaskEditor::todo()const{ | |||
47 | void OTaskEditor::load(const OTodo& to) { | 49 | 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 | } |
51 | void OTaskEditor::init() { | 54 | 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 | /* |
57 | * Add the Widgets | 68 | * Add the Widgets |
@@ -60,11 +71,5 @@ void OTaskEditor::init() { | |||
60 | m_tab->addTab( m_overView, QString::null, tr("Overview") ); | 71 | m_tab->addTab( m_overView, QString::null, tr("Overview") ); |
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") ); |
70 | 75 | ||
@@ -82,5 +87,4 @@ void OTaskEditor::init() { | |||
82 | m_tab->addTab( m_rec, QString::null, tr("Recurrance") ); | 87 | m_tab->addTab( m_rec, QString::null, tr("Recurrance") ); |
83 | 88 | ||
84 | lay->addWidget(m_tab ); | ||
85 | 89 | ||
86 | /* signal and slots */ | 90 | /* signal and slots */ |
@@ -88,4 +92,9 @@ void OTaskEditor::init() { | |||
88 | m_rec, SLOT(setEnabled(bool) ) ); | 92 | m_rec, SLOT(setEnabled(bool) ) ); |
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 ); |
91 | } | 100 | } |