author | drw <drw> | 2002-12-23 17:13:12 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-23 17:13:12 (UTC) |
commit | 1cb75c721b69459494cb599730a96bbc1ddc0f65 (patch) (side-by-side diff) | |
tree | 9a45955d74016b639593c4a888acb4e96e17e9fb /core/pim/todo/otaskeditor.cpp | |
parent | deb4685b99d6c5917f92ce188ead09fdd9c37859 (diff) | |
download | opie-1cb75c721b69459494cb599730a96bbc1ddc0f65.zip opie-1cb75c721b69459494cb599730a96bbc1ddc0f65.tar.gz opie-1cb75c721b69459494cb599730a96bbc1ddc0f65.tar.bz2 |
Task Editor dialog: 1. added tab icons 2. rearranged the overview tab 3. alarm/reminder tab updates 4. code clean-up. Still need to work on advanced tab and add qwhatsthis.
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 33 |
1 files changed, 13 insertions, 20 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 @@ -1,15 +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 "taskeditoroverview.h" #include "taskeditoradvancedimpl.h" #include "taskeditoralarms.h" #include "otaskeditor.h" OTaskEditor::OTaskEditor(int cur) @@ -38,56 +37,50 @@ void OTaskEditor::init( const OTodo& to ) { } OTodo OTaskEditor::todo()const{ qWarning("saving!"); OTodo to; to.setUid(m_uid ); m_overView->save( to ); - m_adv->save( to ); + //m_adv->save( to ); to.setRecurrence( m_rec->recurrence() ); return to; } void OTaskEditor::load(const OTodo& to) { m_overView->load( to ); - m_adv->load( to ); + //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"); - QWidget* container = new QWidget( view->viewport() ); - view->addChild( container ); - QVBoxLayout* layo = new QVBoxLayout( container ); - m_tab = new OTabWidget(container ); + QVBoxLayout* layo = new QVBoxLayout( this ); + m_tab = new OTabWidget( this ); layo->addWidget( m_tab ); + /* * Add the Widgets */ - m_overView = new TaskEditorOverViewImpl(m_tab ); - m_tab->addTab( m_overView, QString::null, tr("Overview") ); + m_overView = new TaskEditorOverView( m_tab ); + m_tab->addTab( m_overView, "TodoList", tr("Overview") ); m_adv = new TaskEditorAdvancedImpl( m_tab ); - m_tab->addTab( m_adv, QString::null, tr("Advanced") ); + m_tab->addTab( m_adv, "todo/advanced", tr("Advanced") ); m_alarm = new TaskEditorAlarms( m_tab ); - m_tab->addTab( m_alarm, QString::null, tr("Alarms") ); + m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); m_remind = new TaskEditorAlarms( m_tab ); - m_tab->addTab( m_remind, QString::null, tr("Reminders") ); + m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); QLabel* lbl = new QLabel(m_tab ); lbl->setText( tr("X-Ref") ); - m_tab->addTab( lbl, QString::null, tr("X-Ref") ); + m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); - m_tab->addTab( m_rec, QString::null, tr("Recurrance") ); + m_tab->addTab( m_rec, "repeat", tr("Recurrance") ); /* signal and slots */ connect(m_overView, SIGNAL(recurranceEnabled(bool) ), m_rec, SLOT(setEnabled(bool) ) ); |