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
-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 @@ -1,13 +1,14 @@ #include <qdatetime.h> #include <qlayout.h> #include <qlabel.h> #include <qmultilineedit.h> +#include <qscrollview.h> #include <opie/orecurrancewidget.h> #include "taskeditoroverviewimpl.h" -#include "taskeditoradvanced.h" +#include "taskeditoradvancedimpl.h" #include "taskeditoralarms.h" #include "otaskeditor.h" @@ -39,34 +40,38 @@ OTodo OTaskEditor::todo()const{ qWarning("saving!"); OTodo to; to.setUid(m_uid ); m_overView->save( to ); - to.setDescription( m_line->text() ); + m_adv->save( to ); + to.setRecurrence( m_rec->recurrence() ); return to; } 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); + 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 ); /* * Add the Widgets */ m_overView = new TaskEditorOverViewImpl(m_tab ); m_tab->addTab( m_overView, QString::null, tr("Overview") ); - 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") ); m_alarm = new TaskEditorAlarms( m_tab ); m_tab->addTab( m_alarm, QString::null, tr("Alarms") ); @@ -80,12 +85,16 @@ void OTaskEditor::init() { m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); m_tab->addTab( m_rec, QString::null, tr("Recurrance") ); - lay->addWidget(m_tab ); /* signal and slots */ connect(m_overView, SIGNAL(recurranceEnabled(bool) ), m_rec, SLOT(setEnabled(bool) ) ); + /* 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 ); } |