author | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
commit | fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb (patch) (side-by-side diff) | |
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
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, 22 insertions, 13 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 @@ #include <qmultilineedit.h> +#include <qscrollview.h> @@ -8,3 +9,3 @@ #include "taskeditoroverviewimpl.h" -#include "taskeditoradvanced.h" +#include "taskeditoradvancedimpl.h" #include "taskeditoralarms.h" @@ -42,3 +43,4 @@ OTodo OTaskEditor::todo()const{ m_overView->save( to ); - to.setDescription( m_line->text() ); + m_adv->save( to ); + to.setRecurrence( m_rec->recurrence() ); @@ -48,9 +50,18 @@ void OTaskEditor::load(const OTodo& to) { m_overView->load( to ); - m_line->setText( to.description() ); + m_adv->load( to ); + m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); } void OTaskEditor::init() { - QVBoxLayout* lay = new QVBoxLayout(this); + QVBoxLayout* lay = new QVBoxLayout(this ); + QScrollView* view = new QScrollView( this ); + view->setResizePolicy( QScrollView::AutoOneFit ); + lay->addWidget( view ); + setCaption("Task Editor"); - m_tab = new OTabWidget(this); + QWidget* container = new QWidget( view->viewport() ); + view->addChild( container ); + QVBoxLayout* layo = new QVBoxLayout( container ); + m_tab = new OTabWidget(container ); + layo->addWidget( m_tab ); /* @@ -61,9 +72,3 @@ void OTaskEditor::init() { - m_adv = new TaskEditorAdvanced( m_tab ); - m_line = new QMultiLineEdit(m_adv ); - m_line->setWordWrap( QMultiLineEdit::WidgetWidth ); - QLabel* label = new QLabel(m_adv ); - label->setText( tr("Description") ); - ((QGridLayout*) m_adv->layout() )->addWidget( label,3, 0 ); - ((QGridLayout*) m_adv->layout())->addWidget( m_line,4,0 ); + m_adv = new TaskEditorAdvancedImpl( m_tab ); m_tab->addTab( m_adv, QString::null, tr("Advanced") ); @@ -83,3 +88,2 @@ void OTaskEditor::init() { - lay->addWidget(m_tab ); @@ -89,2 +93,7 @@ void OTaskEditor::init() { + /* connect due date changed to the recurrence tab */ + connect(m_overView, SIGNAL(dueDateChanged(const QDate&) ), + m_rec, SLOT(setStartDate(const QDate& ) ) ); + + m_tab->setCurrentTab( m_overView ); |