author | drw <drw> | 2004-02-25 16:32:24 (UTC) |
---|---|---|
committer | drw <drw> | 2004-02-25 16:32:24 (UTC) |
commit | bea97f98bfb31994425908e7ce982b2450696706 (patch) (side-by-side diff) | |
tree | 2f2bc2f55d4656b7c63a06cdce6bc35346d9388f /core/pim/todo/otaskeditor.cpp | |
parent | f84a46fce6c1b7702ec1eaebd40e363b67253649 (diff) | |
download | opie-bea97f98bfb31994425908e7ce982b2450696706.zip opie-bea97f98bfb31994425908e7ce982b2450696706.tar.gz opie-bea97f98bfb31994425908e7ce982b2450696706.tar.bz2 |
Todo: libopie->libopie2
Diffstat (limited to 'core/pim/todo/otaskeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/otaskeditor.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index 1ed20b4..ab1ce94 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp @@ -1,61 +1,59 @@ #include <qlayout.h> -#include <opie/orecurrancewidget.h> - #include "taskeditoroverview.h" #include "taskeditorstatus.h" #include "taskeditoralarms.h" #include "otaskeditor.h" OTaskEditor::OTaskEditor(int cur) : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { init(); init( cur ); } -OTaskEditor::OTaskEditor( const OTodo& to) +OTaskEditor::OTaskEditor( const OPimTodo& to) : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { init(); init( to ); } OTaskEditor::~OTaskEditor() { } void OTaskEditor::init( int cur ) { - OTodo to; + OPimTodo to; to.setUid( 1 ); // generate a new uid if ( cur != 0 ) to.setCategories( cur ); load(to); } -void OTaskEditor::init( const OTodo& to ) { +void OTaskEditor::init( const OPimTodo& to ) { load( to ); } -OTodo OTaskEditor::todo()const{ +OPimTodo OTaskEditor::todo()const{ qWarning("saving!"); - OTodo to ( m_todo ); + OPimTodo to ( m_todo ); m_overView->save( to ); m_stat->save( to ); to.setRecurrence( m_rec->recurrence() ); m_alarm->save( to ); return to; } -void OTaskEditor::load(const OTodo& to) { +void OTaskEditor::load(const OPimTodo& to) { m_overView->load( to ); m_stat->load( to ); m_rec->setRecurrence( to.recurrence(), to.hasDueDate() ? to.dueDate() : QDate::currentDate() ); m_alarm->load( to ); - + m_todo = to; } void OTaskEditor::init() { setCaption(tr("Task Editor") ); QVBoxLayout* layo = new QVBoxLayout( this ); m_tab = new OTabWidget( this ); layo->addWidget( m_tab ); /* * Add the Widgets */ @@ -66,25 +64,25 @@ void OTaskEditor::init() { m_tab->addTab( m_stat, "todo/TodoList", tr("Status") ); m_alarm = new TaskEditorAlarms( m_tab ); m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); // m_remind = new TaskEditorAlarms( m_tab ); // m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); // QLabel* lbl = new QLabel( m_tab ); // lbl->setText( tr("X-Ref") ); // m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); - m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); + m_rec = new OPimRecurrenceWidget( true, QDate::currentDate(), this ); m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); /* signal and slots */ connect(m_overView, SIGNAL(recurranceEnabled(bool) ), m_rec, SLOT(setEnabled(bool) ) ); /* connect due date changed to the recurrence tab */ connect(m_stat, SIGNAL(dueDateChanged(const QDate&) ), m_rec, SLOT(setStartDate(const QDate& ) ) ); |