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 | |
parent | f84a46fce6c1b7702ec1eaebd40e363b67253649 (diff) | |
download | opie-bea97f98bfb31994425908e7ce982b2450696706.zip opie-bea97f98bfb31994425908e7ce982b2450696706.tar.gz opie-bea97f98bfb31994425908e7ce982b2450696706.tar.bz2 |
Todo: libopie->libopie2
33 files changed, 232 insertions, 219 deletions
diff --git a/core/pim/todo/config.in b/core/pim/todo/config.in index 0b6af4c..45c4558 100644 --- a/core/pim/todo/config.in +++ b/core/pim/todo/config.in @@ -3,2 +3,2 @@ default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index fc189bd..0613f2c 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -30,2 +30,16 @@ +#include <opie2/opimrecurrence.h> +#include <opie2/opimnotifymanager.h> +#include <opie2/otodoaccessvcal.h> +#include <opie2/oapplicationfactory.h> + +#include <qpe/applnk.h> +#include <qpe/config.h> +#include <qpe/ir.h> +#include <qpe/resource.h> +#include <qpe/qpemessagebox.h> +#include <qpe/alarmserver.h> +#include <qpe/timestring.h> +#include <qpe/qpeapplication.h> + #include <qmenubar.h> @@ -43,18 +57,2 @@ -#include <qpe/applnk.h> -#include <qpe/config.h> -#include <qpe/ir.h> -#include <qpe/resource.h> -#include <qpe/qpemessagebox.h> -#include <qpe/alarmserver.h> -#include <qpe/timestring.h> -#include <qpe/qpeapplication.h> - -#include <opie/orecur.h> -#include <opie/opimnotifymanager.h> -#include <opie/otodoaccessvcal.h> -#include <opie/owidgetstack.h> - -#include <opie/oapplicationfactory.h> - #include "quickeditimpl.h" @@ -312,6 +310,6 @@ QToolBar* MainWindow::toolbar() { } -OTodoAccess::List MainWindow::list()const { +OPimTodoAccess::List MainWindow::list()const { return m_todoMgr.list(); } -OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { +OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { int cat = 0; @@ -333,3 +331,3 @@ OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { } -OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { +OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { int cat = 0; @@ -343,3 +341,3 @@ OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { } -OTodo MainWindow::event( int uid ) { +OPimTodo MainWindow::event( int uid ) { return m_todoMgr.event( uid ); @@ -435,3 +433,3 @@ void MainWindow::slotNewFromTemplate( int id ) { - OTodo event = templateManager()->templateEvent( name ); + OPimTodo event = templateManager()->templateEvent( name ); event = currentEditor()->edit(this, @@ -442,3 +440,3 @@ void MainWindow::slotNewFromTemplate( int id ) { event.setUid( 1 ); - handleAlarms( OTodo(), event ); + handleAlarms( OPimTodo(), event ); m_todoMgr.add( event ); @@ -459,3 +457,3 @@ void MainWindow::slotDuplicate() { } - OTodo ev = m_todoMgr.event( currentView()->current() ); + OPimTodo ev = m_todoMgr.event( currentView()->current() ); /* let's generate a new uid */ @@ -480,3 +478,3 @@ void MainWindow::slotDelete() { - handleAlarms( m_todoMgr.event( currentView()->current() ), OTodo() ); + handleAlarms( m_todoMgr.event( currentView()->current() ), OPimTodo() ); m_todoMgr.remove( currentView()->current() ); @@ -492,3 +490,3 @@ void MainWindow::slotDelete(int uid ) { } - OTodo to = m_todoMgr.event(uid); + OPimTodo to = m_todoMgr.event(uid); if (!QPEMessageBox::confirmDelete(this, QWidget::tr("Todo"), to.toShortText() ) ) @@ -496,3 +494,3 @@ void MainWindow::slotDelete(int uid ) { - handleAlarms(to, OTodo() ); + handleAlarms(to, OPimTodo() ); m_todoMgr.remove( to.uid() ); @@ -599,7 +597,7 @@ void MainWindow::beamDone( Ir* ir) { void MainWindow::receiveFile( const QString& filename ) { - OTodoAccessVCal* cal = new OTodoAccessVCal(filename ); + OPimTodoAccessVCal* cal = new OPimTodoAccessVCal(filename ); - OTodoAccess acc( cal ); + OPimTodoAccess acc( cal ); acc.load(); - OTodoAccess::List list = acc.allRecords(); + OPimTodoAccess::List list = acc.allRecords(); @@ -612,3 +610,3 @@ void MainWindow::receiveFile( const QString& filename ) { QMessageBox::Cancel ) == QMessageBox::Ok ) { - OTodoAccess::List::Iterator it; + OPimTodoAccess::List::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) @@ -710,5 +708,5 @@ void MainWindow::slotEdit( int uid ) { - OTodo old_todo = m_todoMgr.event( uid ); + OPimTodo old_todo = m_todoMgr.event( uid ); - OTodo todo = currentEditor()->edit(this, old_todo ); + OPimTodo todo = currentEditor()->edit(this, old_todo ); @@ -730,3 +728,3 @@ void MainWindow::slotUpdate1( int uid, const SmallTodo& ev) { */ -void MainWindow::updateTodo( const OTodo& ev) { +void MainWindow::updateTodo( const OPimTodo& ev) { m_todoMgr.update( ev.uid() , ev ); @@ -748,3 +746,3 @@ void MainWindow::slotQuickEntered() { qWarning("entered"); - OTodo todo = quickEditor()->todo(); + OPimTodo todo = quickEditor()->todo(); if (todo.isEmpty() ) @@ -762,4 +760,4 @@ void MainWindow::slotComplete( int uid ) { } -void MainWindow::slotComplete( const OTodo& todo ) { - OTodo to = todo; +void MainWindow::slotComplete( const OPimTodo& todo ) { + OPimTodo to = todo; to.setCompleted( !to.isCompleted() ); @@ -779,8 +777,8 @@ void MainWindow::slotComplete( const OTodo& todo ) { if ( to.hasRecurrence() && to.isCompleted() ) { - OTodo to2( to ); + OPimTodo to2( to ); /* the spinned off one won't recur anymore */ - to.setRecurrence( ORecur() ); + to.setRecurrence( OPimRecurrence() ); - ORecur rec = to2.recurrence(); + OPimRecurrence rec = to2.recurrence(); rec.setStart( to.dueDate() ); @@ -827,3 +825,3 @@ void MainWindow::slotComplete( const OTodo& todo ) { to2.notifiers().setAlarms( als ); - handleAlarms( OTodo(), todo ); + handleAlarms( OPimTodo(), todo ); } @@ -857,3 +855,3 @@ int MainWindow::create() { - OTodo todo = currentEditor()->newTodo( currentCatId(), + OPimTodo todo = currentEditor()->newTodo( currentCatId(), this ); @@ -863,3 +861,3 @@ int MainWindow::create() { uid = todo.uid(); - handleAlarms( OTodo(), todo ); + handleAlarms( OPimTodo(), todo ); m_todoMgr.add( todo ); @@ -882,3 +880,3 @@ bool MainWindow::remove( int uid ) { /* argh need to get the whole OEvent... to disable alarms -zecke */ - handleAlarms( OTodo(), m_todoMgr.event( uid ) ); + handleAlarms( OPimTodo(), m_todoMgr.event( uid ) ); @@ -892,5 +890,5 @@ void MainWindow::beam( int uid) { - OTodo todo = event( uid ); - OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) ); - OTodoAccess acc( cal ); + OPimTodo todo = event( uid ); + OPimTodoAccessVCal* cal = new OPimTodoAccessVCal(QString::fromLatin1(beamfile) ); + OPimTodoAccess acc( cal ); acc.load(); @@ -915,6 +913,6 @@ void MainWindow::edit( int uid ) { void MainWindow::add( const OPimRecord& rec) { - if ( rec.rtti() != OTodo::rtti() ) return; + if ( rec.rtti() != OPimTodo::rtti() ) return; m_todoMgr.load(); // might not be loaded - const OTodo& todo = static_cast<const OTodo&>(rec); + const OPimTodo& todo = static_cast<const OPimTodo&>(rec); @@ -971,3 +969,3 @@ namespace { -void MainWindow::handleAlarms( const OTodo& oldTodo, const OTodo& newTodo) { +void MainWindow::handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo) { /* @@ -999,3 +997,3 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) { - OTodo todo = m_todoMgr.event( uid ); + OPimTodo todo = m_todoMgr.event( uid ); if (!todo.hasNotifiers() ) return; diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index fd0e1bd..6a7296b 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h @@ -33,5 +33,6 @@ -#include <opie/otodoaccess.h> -#include <opie/otodo.h> -#include <opie/opimmainwindow.h> +#include <opie2/otodoaccess.h> +#include <opie2/opimtodo.h> +#include <opie2/opimmainwindow.h> +#include <opie2/owidgetstack.h> @@ -46,3 +47,2 @@ class QToolBar; class QAction; -class OWidgetStack; class Ir; @@ -51,2 +51,4 @@ class QLineEdit; +using namespace Opie; + namespace Todo { @@ -71,3 +73,3 @@ namespace Todo { - /** return a context menu for an OTodo */ + /** return a context menu for an OPimTodo */ QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); @@ -79,7 +81,7 @@ namespace Todo { void updateList(); - OTodoAccess::List list()const; - OTodoAccess::List sorted( bool asc, int sortOrder ); - OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); + OPimTodoAccess::List list()const; + OPimTodoAccess::List sorted( bool asc, int sortOrder ); + OPimTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); - OTodo event(int uid ); + OPimTodo event(int uid ); @@ -95,3 +97,3 @@ namespace Todo { - void updateTodo( const OTodo& ); + void updateTodo( const OPimTodo& ); void populateTemplates(); @@ -110,3 +112,3 @@ private slots: /* handle setting and removing alarms */ - void handleAlarms( const OTodo& oldTodo, const OTodo& newTodo ); + void handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo ); void receiveFile( const QString& filename ); @@ -167,3 +169,3 @@ private slots: void slotComplete( int uid ); - void slotComplete( const OTodo& ev ); + void slotComplete( const OPimTodo& ev ); void slotNewFromTemplate(int id ); diff --git a/core/pim/todo/opie-todo.control b/core/pim/todo/opie-todo.control index 8ad50b2..3a65c04 100644 --- a/core/pim/todo/opie-todo.control +++ b/core/pim/todo/opie-todo.control @@ -6,3 +6,3 @@ Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org> Architecture: arm -Depends: task-opie-minimal, libopie1, opie-pics +Depends: task-opie-minimal, libopiecore2, libopieui2, libopiepim2, opie-pics Description: Todo list manager 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 @@ -2,4 +2,2 @@ -#include <opie/orecurrancewidget.h> - #include "taskeditoroverview.h" @@ -15,3 +13,3 @@ OTaskEditor::OTaskEditor(int cur) } -OTaskEditor::OTaskEditor( const OTodo& to) +OTaskEditor::OTaskEditor( const OPimTodo& to) : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { @@ -24,3 +22,3 @@ OTaskEditor::~OTaskEditor() { void OTaskEditor::init( int cur ) { - OTodo to; + OPimTodo to; to.setUid( 1 ); // generate a new uid @@ -30,8 +28,8 @@ void OTaskEditor::init( int cur ) { } -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 ); @@ -43,3 +41,3 @@ OTodo OTaskEditor::todo()const{ } -void OTaskEditor::load(const OTodo& to) { +void OTaskEditor::load(const OPimTodo& to) { m_overView->load( to ); @@ -77,3 +75,3 @@ void OTaskEditor::init() { - m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); + m_rec = new OPimRecurrenceWidget( true, QDate::currentDate(), this ); m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); diff --git a/core/pim/todo/otaskeditor.h b/core/pim/todo/otaskeditor.h index 2daae52..7068df8 100644 --- a/core/pim/todo/otaskeditor.h +++ b/core/pim/todo/otaskeditor.h @@ -5,4 +5,5 @@ -#include <opie/otodo.h> -#include <opie/otabwidget.h> +#include <opie2/opimtodo.h> +#include <opie2/otabwidget.h> +#include <opie2/opimrecurrencewidget.h> @@ -11,3 +12,2 @@ class TaskEditorStatus; class TaskEditorAlarms; -class ORecurranceWidget; class QMultiLineEdit; @@ -18,3 +18,3 @@ public: OTaskEditor(int cur); - OTaskEditor( const OTodo& todo ); + OTaskEditor( const OPimTodo& todo ); ~OTaskEditor(); @@ -26,7 +26,7 @@ public: void init( int cur ); - void init( const OTodo& todo ); + void init( const OPimTodo& todo ); - OTodo todo()const; + OPimTodo todo()const; private: - void load( const OTodo& ); + void load( const OPimTodo& ); void init(); @@ -38,4 +38,4 @@ private: TaskEditorAlarms *m_remind; - ORecurranceWidget *m_rec; - OTodo m_todo; + OPimRecurrenceWidget *m_rec; + OPimTodo m_todo; }; diff --git a/core/pim/todo/quickedit.h b/core/pim/todo/quickedit.h index 5fe74fe..0c0c204 100644 --- a/core/pim/todo/quickedit.h +++ b/core/pim/todo/quickedit.h @@ -6,3 +6,5 @@ -#include <opie/otodo.h> +#include <opie2/opimtodo.h> + +using Opie::OPimTodo; @@ -11,3 +13,3 @@ namespace Todo{ struct QuickEditBase { - virtual OTodo todo()const = 0l; + virtual OPimTodo todo()const = 0l; virtual QSignal* signal() = 0l; @@ -25,3 +27,3 @@ namespace Todo{ * Quick edit is meant to quickly enter - * OTodos in a fast way + * OPimTodos in a fast way */ @@ -31,3 +33,3 @@ namespace Todo{ virtual ~QuickEdit(); - //OTodo todo()const; + //OPimTodo todo()const; QSignal* signal(); diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp index 1863ef4..cd0684f 100644 --- a/core/pim/todo/quickeditimpl.cpp +++ b/core/pim/todo/quickeditimpl.cpp @@ -6,3 +6,3 @@ -#include <opie/oclickablelabel.h> +#include <opie2/oclickablelabel.h> @@ -64,3 +64,3 @@ QuickEditImpl::~QuickEditImpl() { } -OTodo QuickEditImpl::todo()const { +OPimTodo QuickEditImpl::todo()const { return m_todo; @@ -71,3 +71,3 @@ QWidget* QuickEditImpl::widget() { void QuickEditImpl::slotEnter() { - OTodo todo; + OPimTodo todo; diff --git a/core/pim/todo/quickeditimpl.h b/core/pim/todo/quickeditimpl.h index 89b94f8..d465dba 100644 --- a/core/pim/todo/quickeditimpl.h +++ b/core/pim/todo/quickeditimpl.h @@ -17,3 +17,3 @@ public: ~QuickEditImpl(); - OTodo todo()const; + OPimTodo todo()const; QWidget* widget(); @@ -32,3 +32,3 @@ private: QPopupMenu* m_menu; - OTodo m_todo; + OPimTodo m_todo; bool m_visible; diff --git a/core/pim/todo/smalltodo.h b/core/pim/todo/smalltodo.h index 952ed04..963218e 100644 --- a/core/pim/todo/smalltodo.h +++ b/core/pim/todo/smalltodo.h @@ -39,4 +39,4 @@ namespace Todo { * SmallTodo holds everything necessary - * to represent a OTodo without holding - * everything from a OTodo + * to represent a OPimTodo without holding + * everything from a OPimTodo */ diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index d980a24..5bbf880 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -39,3 +39,3 @@ -#include <opie/orecur.h> +#include <opie2/opimrecurrence.h> @@ -186,3 +186,3 @@ int TableView::prev() { QString TableView::currentRepresentation() { - OTodo to = sorted()[currentRow()]; + OPimTodo to = sorted()[currentRow()]; return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; @@ -206,3 +206,3 @@ void TableView::updateView( ) { sort(); - OTodoAccess::List::Iterator it, end; + OPimTodoAccess::List::Iterator it, end; it = sorted().begin(); @@ -229,3 +229,3 @@ void TableView::updateView( ) { } -void TableView::setTodo( int, const OTodo&) { +void TableView::setTodo( int, const OPimTodo&) { sort(); @@ -235,3 +235,3 @@ void TableView::setTodo( int, const OTodo&) { } -void TableView::addEvent( const OTodo&) { +void TableView::addEvent( const OPimTodo&) { @@ -244,3 +244,3 @@ void TableView::addEvent( const OTodo&) { */ -void TableView::replaceEvent( const OTodo& ev) { +void TableView::replaceEvent( const OPimTodo& ev) { addEvent( ev ); @@ -390,3 +390,3 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool - OTodo task = sorted()[row]; + OPimTodo task = sorted()[row]; @@ -499,3 +499,3 @@ void TableView::setCellContentFromEditor(int row, int col ) { int pri = ((QComboBox*)wid)->currentItem() + 1; - OTodo todo = sorted()[row]; + OPimTodo todo = sorted()[row]; if ( todo.priority() != pri ) { @@ -510,3 +510,3 @@ void TableView::setCellContentFromEditor(int row, int col ) { QString text = ((QLineEdit*)wid)->text(); - OTodo todo = sorted()[row]; + OPimTodo todo = sorted()[row]; if ( todo.summary() != text ) { diff --git a/core/pim/todo/tableview.h b/core/pim/todo/tableview.h index 528ddc9..7f78255 100644 --- a/core/pim/todo/tableview.h +++ b/core/pim/todo/tableview.h @@ -58,5 +58,5 @@ namespace Todo { void updateView(); - void setTodo( int uid, const OTodo& ); - void addEvent( const OTodo& event ); - void replaceEvent( const OTodo& ); + void setTodo( int uid, const OPimTodo& ); + void addEvent( const OPimTodo& event ); + void replaceEvent( const OPimTodo& ); void removeEvent( int uid ); @@ -74,3 +74,3 @@ namespace Todo { * 40.000 QTableItems for 10.000 - * OTodos where we only show 10 at a time! + * OPimTodos where we only show 10 at a time! */ diff --git a/core/pim/todo/taskeditoralarms.cpp b/core/pim/todo/taskeditoralarms.cpp index bcc40fe..930c94e 100644 --- a/core/pim/todo/taskeditoralarms.cpp +++ b/core/pim/todo/taskeditoralarms.cpp @@ -30,5 +30,4 @@ -#include <opie/otodo.h> -#include <opie/opimnotifymanager.h> -#include <opie/otimepicker.h> +#include <opie2/opimnotifymanager.h> +#include <opie2/otimepicker.h> @@ -124,3 +123,3 @@ void TaskEditorAlarms::slotDelete(){ -void TaskEditorAlarms::load( const OTodo& todo) { +void TaskEditorAlarms::load( const OPimTodo& todo) { lstAlarms->clear(); @@ -138,3 +137,3 @@ void TaskEditorAlarms::load( const OTodo& todo) { } -void TaskEditorAlarms::save( OTodo& todo ) { +void TaskEditorAlarms::save( OPimTodo& todo ) { if (lstAlarms->childCount() <= 0 ) return; diff --git a/core/pim/todo/taskeditoralarms.h b/core/pim/todo/taskeditoralarms.h index 0aa52cc..2379b0c 100644 --- a/core/pim/todo/taskeditoralarms.h +++ b/core/pim/todo/taskeditoralarms.h @@ -31,2 +31,4 @@ +#include <opie2/opimtodo.h> + #include <qwidget.h> @@ -35,3 +37,4 @@ class QListView; class QListViewItem; -class OTodo; + +using namespace Opie; @@ -50,4 +53,4 @@ public: ~TaskEditorAlarms(); - void load( const OTodo& ); - void save( OTodo& ); + void load( const OPimTodo& ); + void save( OPimTodo& ); private: diff --git a/core/pim/todo/taskeditoroverview.cpp b/core/pim/todo/taskeditoroverview.cpp index 415dcf2..294acb9 100644 --- a/core/pim/todo/taskeditoroverview.cpp +++ b/core/pim/todo/taskeditoroverview.cpp @@ -30,3 +30,3 @@ -#include <opie/orecur.h> +//#include <opie2/opimrecurrence.h> @@ -129,3 +129,3 @@ TaskEditorOverView::~TaskEditorOverView() -void TaskEditorOverView::load( const OTodo& todo ) +void TaskEditorOverView::load( const OPimTodo& todo ) { @@ -150,3 +150,3 @@ void TaskEditorOverView::load( const OTodo& todo ) -void TaskEditorOverView::save( OTodo &todo ) +void TaskEditorOverView::save( OPimTodo &todo ) { diff --git a/core/pim/todo/taskeditoroverview.h b/core/pim/todo/taskeditoroverview.h index d5f5125..89679f1 100644 --- a/core/pim/todo/taskeditoroverview.h +++ b/core/pim/todo/taskeditoroverview.h @@ -31,3 +31,3 @@ -#include <opie/otodo.h> +#include <opie2/opimtodo.h> @@ -41,2 +41,4 @@ class QMultiLineEdit; +using namespace Opie; + class TaskEditorOverView : public QWidget @@ -55,4 +57,4 @@ public: - void load( const OTodo & ); - void save( OTodo & ); + void load( const OPimTodo & ); + void save( OPimTodo & ); diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp index 98e3cea..367dd58 100644 --- a/core/pim/todo/taskeditorstatus.cpp +++ b/core/pim/todo/taskeditorstatus.cpp @@ -30,5 +30,4 @@ -#include <opie/otodo.h> -#include <opie/opimmaintainer.h> -#include <opie/opimstate.h> +#include <opie2/opimmaintainer.h> +#include <opie2/opimstate.h> @@ -173,3 +172,3 @@ TaskEditorStatus::~TaskEditorStatus() -void TaskEditorStatus::load( const OTodo &todo ) +void TaskEditorStatus::load( const OPimTodo &todo ) { @@ -225,3 +224,3 @@ void TaskEditorStatus::load( const OTodo &todo ) -void TaskEditorStatus::save( OTodo &todo ) +void TaskEditorStatus::save( OPimTodo &todo ) { diff --git a/core/pim/todo/taskeditorstatus.h b/core/pim/todo/taskeditorstatus.h index 3544200..97129f0 100644 --- a/core/pim/todo/taskeditorstatus.h +++ b/core/pim/todo/taskeditorstatus.h @@ -31,2 +31,4 @@ +#include <opie2/opimtodo.h> + #include <qdatetime.h> @@ -35,3 +37,2 @@ class DateBookMonth; -class OTodo; class QCheckBox; @@ -42,2 +43,4 @@ class QToolButton; +using namespace Opie; + /** @@ -70,3 +73,3 @@ public: * I could have a struct which returns a QWidget* - * load and save to a OTodo + * load and save to a OPimTodo * and use multiple inheretence with all other widgets @@ -76,4 +79,4 @@ public: */ - void load( const OTodo & ); - void save( OTodo & ); + void load( const OPimTodo & ); + void save( OPimTodo & ); diff --git a/core/pim/todo/templatedialogimpl.cpp b/core/pim/todo/templatedialogimpl.cpp index 63d8107..c9ad3d0 100644 --- a/core/pim/todo/templatedialogimpl.cpp +++ b/core/pim/todo/templatedialogimpl.cpp @@ -17,12 +17,12 @@ namespace { const QString& name, - const OTodo& ); + const OPimTodo& ); ~TemplateListItem(); - OTodo event()const; + OPimTodo event()const; QString text()const; void setText(const QString& str ); - void setEvent( const OTodo& ); + void setEvent( const OPimTodo& ); private: QString m_name; - OTodo m_ev; + OPimTodo m_ev; }; @@ -32,3 +32,3 @@ namespace { const QString& text, - const OTodo& ev ) + const OPimTodo& ev ) : QListViewItem( view ), m_name( text ), m_ev( ev ) @@ -38,3 +38,3 @@ namespace { TemplateListItem::~TemplateListItem() {} - OTodo TemplateListItem::event() const { + OPimTodo TemplateListItem::event() const { return m_ev; @@ -48,3 +48,3 @@ namespace { } - void TemplateListItem::setEvent( const OTodo& ev) { + void TemplateListItem::setEvent( const OPimTodo& ev) { m_ev = ev; @@ -74,3 +74,3 @@ void TemplateDialogImpl::slotAdd() { QString str = QWidget::tr("New Template %1").arg( listView()->childCount() ); - OTodo ev; + OPimTodo ev; m_man->addEvent(str, ev); @@ -94,3 +94,3 @@ void TemplateDialogImpl::slotEdit() { TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); - OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); + OPimTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); if ( m_win->currentEditor()->accepted() ) { diff --git a/core/pim/todo/templatedialogimpl.h b/core/pim/todo/templatedialogimpl.h index f366c9e..cc78521 100644 --- a/core/pim/todo/templatedialogimpl.h +++ b/core/pim/todo/templatedialogimpl.h @@ -5,3 +5,3 @@ -#include <opie/otodo.h> +#include <opie2/opimtodo.h> diff --git a/core/pim/todo/textviewshow.cpp b/core/pim/todo/textviewshow.cpp index 35ea74b..01e5810 100644 --- a/core/pim/todo/textviewshow.cpp +++ b/core/pim/todo/textviewshow.cpp @@ -13,3 +13,3 @@ QString TextViewShow::type()const { } -void TextViewShow::slotShow( const OTodo& ev ) { +void TextViewShow::slotShow( const OPimTodo& ev ) { setText( ev.toRichText() ); diff --git a/core/pim/todo/textviewshow.h b/core/pim/todo/textviewshow.h index 498de81..cc31522 100644 --- a/core/pim/todo/textviewshow.h +++ b/core/pim/todo/textviewshow.h @@ -12,3 +12,3 @@ namespace Todo { QString type()const; - void slotShow( const OTodo& ev ); + void slotShow( const OPimTodo& ev ); QWidget* widget(); diff --git a/core/pim/todo/todo.pro b/core/pim/todo/todo.pro index 51cfde7..9267082 100644 --- a/core/pim/todo/todo.pro +++ b/core/pim/todo/todo.pro @@ -46,3 +46,3 @@ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 -lopieui2 -lopiepim2 diff --git a/core/pim/todo/todoedit.h b/core/pim/todo/todoedit.h index 02800ca..4e89e93 100644 --- a/core/pim/todo/todoedit.h +++ b/core/pim/todo/todoedit.h @@ -3,3 +3,3 @@ -#include <opie/otodo.h> +#include <opie2/opimtodo.h> @@ -11,4 +11,4 @@ namespace Todo { - ToDoEvent newEvent( const OTodo& ) = 0; - ToDoEvent editEvent( const OTodo& ) = 0; + ToDoEvent newEvent( const OPimTodo& ) = 0; + ToDoEvent editEvent( const OPimTodo& ) = 0; }; diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp index 78aedd6..879d809 100644 --- a/core/pim/todo/todoeditor.cpp +++ b/core/pim/todo/todoeditor.cpp @@ -16,3 +16,3 @@ Editor::~Editor() { } -OTodo Editor::newTodo( int cur, +OPimTodo Editor::newTodo( int cur, QWidget*) { @@ -30,3 +30,3 @@ OTodo Editor::newTodo( int cur, - OTodo ev = e->todo(); + OPimTodo ev = e->todo(); qWarning("Todo uid"); @@ -37,4 +37,4 @@ OTodo Editor::newTodo( int cur, } -OTodo Editor::edit( QWidget *, - const OTodo& todo ) { +OPimTodo Editor::edit( QWidget *, + const OPimTodo& todo ) { OTaskEditor *e = self(); @@ -45,3 +45,3 @@ OTodo Editor::edit( QWidget *, - OTodo ev = e->todo(); + OPimTodo ev = e->todo(); if ( ret == QDialog::Accepted ) diff --git a/core/pim/todo/todoeditor.h b/core/pim/todo/todoeditor.h index fe30634..bcfd205 100644 --- a/core/pim/todo/todoeditor.h +++ b/core/pim/todo/todoeditor.h @@ -3,3 +3,3 @@ -#include <opie/otodo.h> +#include <opie2/opimtodo.h> @@ -13,6 +13,6 @@ namespace Todo { - OTodo newTodo( int currentCatId, + OPimTodo newTodo( int currentCatId, QWidget* par ); - OTodo edit( QWidget* par, - const OTodo& ev = OTodo() ); + OPimTodo edit( QWidget* par, + const OPimTodo& ev = OPimTodo() ); diff --git a/core/pim/todo/todomanager.cpp b/core/pim/todo/todomanager.cpp index 501cca7..21e1d0c 100644 --- a/core/pim/todo/todomanager.cpp +++ b/core/pim/todo/todomanager.cpp @@ -44,3 +44,3 @@ TodoManager::~TodoManager() { } -OTodo TodoManager::event(int uid ) { +OPimTodo TodoManager::event(int uid ) { return m_db->find( uid ); @@ -51,9 +51,9 @@ void TodoManager::updateList() { } -OTodoAccess::List TodoManager::list() const{ +OPimTodoAccess::List TodoManager::list() const{ return m_list; } -OTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { +OPimTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { return m_db->sorted( asc, so, f, cat ); } -OTodoAccess::List::Iterator TodoManager::overDue() { +OPimTodoAccess::List::Iterator TodoManager::overDue() { int filter = 2 | 1; @@ -63,3 +63,3 @@ OTodoAccess::List::Iterator TodoManager::overDue() { } -OTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, +OPimTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, const QDate& end ) { @@ -69,3 +69,3 @@ OTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, } -OTodoAccess::List::Iterator TodoManager::query( const OTodo& ev, int query ) { +OPimTodoAccess::List::Iterator TodoManager::query( const OPimTodo& ev, int query ) { m_list = m_db->queryByExample( ev, query ); @@ -74,6 +74,6 @@ OTodoAccess::List::Iterator TodoManager::query( const OTodo& ev, int query ) { } -OTodoAccess* TodoManager::todoDB() { +OPimTodoAccess* TodoManager::todoDB() { return m_db; } -void TodoManager::add( const OTodo& ev ) { +void TodoManager::add( const OPimTodo& ev ) { m_db->add( ev ); @@ -83,3 +83,3 @@ void TodoManager::update( int, const SmallTodo& ) { } -void TodoManager::update( int, const OTodo& ev) { +void TodoManager::update( int, const OPimTodo& ev) { m_db->replace( ev ); @@ -123,3 +123,3 @@ void TodoManager::load() { if (!m_db) { - m_db = new OTodoAccess(); + m_db = new OPimTodoAccess(); m_db->load(); diff --git a/core/pim/todo/todomanager.h b/core/pim/todo/todomanager.h index 8544277..865b47b 100644 --- a/core/pim/todo/todomanager.h +++ b/core/pim/todo/todomanager.h @@ -31,5 +31,4 @@ -#include <qarray.h> -#include <qobject.h> -#include <qstring.h> +#include <opie2/opimtodo.h> +#include <opie2/otodoaccess.h> @@ -37,4 +36,5 @@ -#include <opie/otodo.h> -#include <opie/otodoaccess.h> +#include <qarray.h> +#include <qobject.h> +#include <qstring.h> @@ -42,2 +42,4 @@ +using Opie::OPimTodo; +using Opie::OPimTodoAccess; @@ -54,3 +56,3 @@ namespace Todo { int catId(const QString&); - OTodo event(int uid ); + OPimTodo event(int uid ); @@ -58,9 +60,9 @@ namespace Todo { /** returns the iterator sorted if set sorted*/ - OTodoAccess::List list()const; - OTodoAccess::List sorted( bool asc, int so, int f, int cat ); + OPimTodoAccess::List list()const; + OPimTodoAccess::List sorted( bool asc, int so, int f, int cat ); - OTodoAccess::List::Iterator overDue(); - OTodoAccess::List::Iterator fromTo( const QDate& start, + OPimTodoAccess::List::Iterator overDue(); + OPimTodoAccess::List::Iterator fromTo( const QDate& start, const QDate& end ); - OTodoAccess::List::Iterator query( const OTodo& ev, int query ); + OPimTodoAccess::List::Iterator query( const OPimTodo& ev, int query ); @@ -72,3 +74,3 @@ namespace Todo { - OTodoAccess* todoDB(); + OPimTodoAccess* todoDB(); bool saveAll(); @@ -81,5 +83,5 @@ namespace Todo { public slots: - void add( const OTodo& ); + void add( const OPimTodo& ); void update( int uid, const SmallTodo& ); - void update( int uid, const OTodo& ); + void update( int uid, const OPimTodo& ); bool remove( int uid ); @@ -96,6 +98,6 @@ namespace Todo { private: - OTodoAccess* m_db; - OTodoAccess::List m_list; - OTodoAccess::List::Iterator m_it; - OTodoAccess::List m_sorted; + OPimTodoAccess* m_db; + OPimTodoAccess::List m_list; + OPimTodoAccess::List::Iterator m_it; + OPimTodoAccess::List m_sorted; Categories m_cat; diff --git a/core/pim/todo/todoshow.h b/core/pim/todo/todoshow.h index 2babe93..1eeadf8 100644 --- a/core/pim/todo/todoshow.h +++ b/core/pim/todo/todoshow.h @@ -33,3 +33,5 @@ -#include <opie/otodo.h> +#include <opie2/opimtodo.h> + +using Opie::OPimTodo; @@ -48,3 +50,3 @@ namespace Todo { virtual QString type()const = 0; - virtual void slotShow( const OTodo& ev ) = 0; + virtual void slotShow( const OPimTodo& ev ) = 0; virtual QWidget* widget() = 0; diff --git a/core/pim/todo/todotemplatemanager.cpp b/core/pim/todo/todotemplatemanager.cpp index 5b83f76..eeac51b 100644 --- a/core/pim/todo/todotemplatemanager.cpp +++ b/core/pim/todo/todotemplatemanager.cpp @@ -1 +1,4 @@ +#include <opie2/otodoaccess.h> +#include <opie2/otodoaccessxml.h> + #include <qpe/config.h> @@ -3,5 +6,2 @@ -#include <opie/otodoaccess.h> -#include <opie/otodoaccessxml.h> - #include "todotemplatemanager.h" @@ -19,11 +19,11 @@ void TemplateManager::load() { Config conf("todolist_templates"); - OTodoAccessXML *xml = new OTodoAccessXML( QString::fromLatin1("template"), + OPimTodoAccessXML *xml = new OPimTodoAccessXML( QString::fromLatin1("template"), m_path ); - OTodoAccess todoDB(xml ); + OPimTodoAccess todoDB(xml ); todoDB.load(); - OTodoAccess::List::Iterator it; - OTodoAccess::List list = todoDB.allRecords(); + OPimTodoAccess::List::Iterator it; + OPimTodoAccess::List list = todoDB.allRecords(); for ( it = list.begin(); it != list.end(); ++it ) { - OTodo ev = (*it); + OPimTodo ev = (*it); conf.setGroup( QString::number( ev.uid() ) ); @@ -40,5 +40,5 @@ void TemplateManager::save() { - OTodoAccessXML *res = new OTodoAccessXML( "template", + OPimTodoAccessXML *res = new OPimTodoAccessXML( "template", m_path ); - OTodoAccess db(res); + OPimTodoAccess db(res); db.load(); @@ -47,5 +47,5 @@ void TemplateManager::save() { - QMap<QString, OTodo>::Iterator it; + QMap<QString, OPimTodo>::Iterator it; for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { - OTodo ev = it.data(); + OPimTodo ev = it.data(); conf.setGroup( QString::number( ev.uid() ) ); @@ -58,5 +58,5 @@ void TemplateManager::save() { void TemplateManager::addEvent( const QString& str, - const OTodo& ev) { + const OPimTodo& ev) { qWarning("AddEvent"+ str ); - OTodo todo = ev; + OPimTodo todo = ev; if( ev.uid() == 0 ) @@ -71,3 +71,3 @@ QStringList TemplateManager::templates() const { QStringList list; - QMap<QString, OTodo>::ConstIterator it; + QMap<QString, OPimTodo>::ConstIterator it; for (it = m_templates.begin(); it != m_templates.end(); ++it ) { @@ -78,3 +78,3 @@ QStringList TemplateManager::templates() const { } -OTodo TemplateManager::templateEvent( const QString& templateName ) { +OPimTodo TemplateManager::templateEvent( const QString& templateName ) { return m_templates[templateName]; diff --git a/core/pim/todo/todotemplatemanager.h b/core/pim/todo/todotemplatemanager.h index 387ced1..ee8aaaf 100644 --- a/core/pim/todo/todotemplatemanager.h +++ b/core/pim/todo/todotemplatemanager.h @@ -3,2 +3,4 @@ +#include <opie2/opimtodo.h> + #include <qstring.h> @@ -6,4 +8,3 @@ -#include <opie/otodo.h> - +using namespace Opie; @@ -17,6 +18,6 @@ namespace Todo { QStringList templates()const; - OTodo templateEvent( const QString& templateName ); + OPimTodo templateEvent( const QString& templateName ); /* also replaces one */ - void addEvent( const QString&, const OTodo& ); + void addEvent( const QString&, const OPimTodo& ); void removeEvent( const QString& ); @@ -24,3 +25,3 @@ namespace Todo { QString m_path; - QMap<QString, OTodo> m_templates; + QMap<QString, OPimTodo> m_templates; diff --git a/core/pim/todo/todoview.cpp b/core/pim/todo/todoview.cpp index 31047cf..d99cf77 100644 --- a/core/pim/todo/todoview.cpp +++ b/core/pim/todo/todoview.cpp @@ -21,6 +21,6 @@ MainWindow* TodoView::todoWindow() { -OTodo TodoView::event(int uid ) { +OPimTodo TodoView::event(int uid ) { return m_main->event( uid ); } -OTodoAccess::List TodoView::list(){ +OPimTodoAccess::List TodoView::list(){ todoWindow()->updateList(); @@ -28,3 +28,3 @@ OTodoAccess::List TodoView::list(){ } -OTodoAccess::List TodoView::sorted()const{ +OPimTodoAccess::List TodoView::sorted()const{ return m_sort; @@ -48,3 +48,3 @@ void TodoView::update(int, const SmallTodo& ) { } -void TodoView::update(int , const OTodo& ev ) { +void TodoView::update(int , const OPimTodo& ev ) { m_main->updateTodo( ev ); @@ -63,3 +63,3 @@ void TodoView::complete( int uid ) { } -void TodoView::complete( const OTodo& ev ) { +void TodoView::complete( const OPimTodo& ev ) { m_main->slotComplete( ev ); diff --git a/core/pim/todo/todoview.h b/core/pim/todo/todoview.h index e5ed66f..a5ea9f5 100644 --- a/core/pim/todo/todoview.h +++ b/core/pim/todo/todoview.h @@ -36,3 +36,3 @@ -#include <opie/otodoaccess.h> +#include <opie2/otodoaccess.h> @@ -40,2 +40,4 @@ +using Opie::OPimTodo; +using Opie::OPimTodoAccess; @@ -70,4 +72,4 @@ namespace Todo { - virtual void addEvent( const OTodo& ) = 0; - virtual void replaceEvent( const OTodo& ) = 0; + virtual void addEvent( const OPimTodo& ) = 0; + virtual void replaceEvent( const OPimTodo& ) = 0; virtual void removeEvent( int uid ) = 0; @@ -106,5 +108,5 @@ namespace Todo { MainWindow* todoWindow(); - OTodo event(int uid ); - OTodoAccess::List list(); - OTodoAccess::List sorted()const; + OPimTodo event(int uid ); + OPimTodoAccess::List list(); + OPimTodoAccess::List sorted()const; void sort(); @@ -121,3 +123,3 @@ namespace Todo { void update(int uid, const SmallTodo& to ); - void update(int uid, const OTodo& ev); + void update(int uid, const OPimTodo& ev); void remove( int uid ); @@ -126,6 +128,6 @@ namespace Todo { void complete( int uid ); - void complete( const OTodo& ev ); + void complete( const OPimTodo& ev ); private: MainWindow *m_main; - OTodoAccess::List m_sort; + OPimTodoAccess::List m_sort; bool m_asc : 1; |