33 files changed, 237 insertions, 224 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 @@ | |||
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | 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 @@ | |||
30 | 30 | ||
31 | #include <opie2/opimrecurrence.h> | ||
32 | #include <opie2/opimnotifymanager.h> | ||
33 | #include <opie2/otodoaccessvcal.h> | ||
34 | #include <opie2/oapplicationfactory.h> | ||
35 | |||
36 | #include <qpe/applnk.h> | ||
37 | #include <qpe/config.h> | ||
38 | #include <qpe/ir.h> | ||
39 | #include <qpe/resource.h> | ||
40 | #include <qpe/qpemessagebox.h> | ||
41 | #include <qpe/alarmserver.h> | ||
42 | #include <qpe/timestring.h> | ||
43 | #include <qpe/qpeapplication.h> | ||
44 | |||
31 | #include <qmenubar.h> | 45 | #include <qmenubar.h> |
@@ -43,18 +57,2 @@ | |||
43 | 57 | ||
44 | #include <qpe/applnk.h> | ||
45 | #include <qpe/config.h> | ||
46 | #include <qpe/ir.h> | ||
47 | #include <qpe/resource.h> | ||
48 | #include <qpe/qpemessagebox.h> | ||
49 | #include <qpe/alarmserver.h> | ||
50 | #include <qpe/timestring.h> | ||
51 | #include <qpe/qpeapplication.h> | ||
52 | |||
53 | #include <opie/orecur.h> | ||
54 | #include <opie/opimnotifymanager.h> | ||
55 | #include <opie/otodoaccessvcal.h> | ||
56 | #include <opie/owidgetstack.h> | ||
57 | |||
58 | #include <opie/oapplicationfactory.h> | ||
59 | |||
60 | #include "quickeditimpl.h" | 58 | #include "quickeditimpl.h" |
@@ -312,6 +310,6 @@ QToolBar* MainWindow::toolbar() { | |||
312 | } | 310 | } |
313 | OTodoAccess::List MainWindow::list()const { | 311 | OPimTodoAccess::List MainWindow::list()const { |
314 | return m_todoMgr.list(); | 312 | return m_todoMgr.list(); |
315 | } | 313 | } |
316 | OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { | 314 | OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { |
317 | int cat = 0; | 315 | int cat = 0; |
@@ -333,3 +331,3 @@ OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { | |||
333 | } | 331 | } |
334 | OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { | 332 | OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { |
335 | int cat = 0; | 333 | int cat = 0; |
@@ -343,3 +341,3 @@ OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { | |||
343 | } | 341 | } |
344 | OTodo MainWindow::event( int uid ) { | 342 | OPimTodo MainWindow::event( int uid ) { |
345 | return m_todoMgr.event( uid ); | 343 | return m_todoMgr.event( uid ); |
@@ -435,3 +433,3 @@ void MainWindow::slotNewFromTemplate( int id ) { | |||
435 | 433 | ||
436 | OTodo event = templateManager()->templateEvent( name ); | 434 | OPimTodo event = templateManager()->templateEvent( name ); |
437 | event = currentEditor()->edit(this, | 435 | event = currentEditor()->edit(this, |
@@ -442,3 +440,3 @@ void MainWindow::slotNewFromTemplate( int id ) { | |||
442 | event.setUid( 1 ); | 440 | event.setUid( 1 ); |
443 | handleAlarms( OTodo(), event ); | 441 | handleAlarms( OPimTodo(), event ); |
444 | m_todoMgr.add( event ); | 442 | m_todoMgr.add( event ); |
@@ -459,3 +457,3 @@ void MainWindow::slotDuplicate() { | |||
459 | } | 457 | } |
460 | OTodo ev = m_todoMgr.event( currentView()->current() ); | 458 | OPimTodo ev = m_todoMgr.event( currentView()->current() ); |
461 | /* let's generate a new uid */ | 459 | /* let's generate a new uid */ |
@@ -480,3 +478,3 @@ void MainWindow::slotDelete() { | |||
480 | 478 | ||
481 | handleAlarms( m_todoMgr.event( currentView()->current() ), OTodo() ); | 479 | handleAlarms( m_todoMgr.event( currentView()->current() ), OPimTodo() ); |
482 | m_todoMgr.remove( currentView()->current() ); | 480 | m_todoMgr.remove( currentView()->current() ); |
@@ -492,3 +490,3 @@ void MainWindow::slotDelete(int uid ) { | |||
492 | } | 490 | } |
493 | OTodo to = m_todoMgr.event(uid); | 491 | OPimTodo to = m_todoMgr.event(uid); |
494 | if (!QPEMessageBox::confirmDelete(this, QWidget::tr("Todo"), to.toShortText() ) ) | 492 | if (!QPEMessageBox::confirmDelete(this, QWidget::tr("Todo"), to.toShortText() ) ) |
@@ -496,3 +494,3 @@ void MainWindow::slotDelete(int uid ) { | |||
496 | 494 | ||
497 | handleAlarms(to, OTodo() ); | 495 | handleAlarms(to, OPimTodo() ); |
498 | m_todoMgr.remove( to.uid() ); | 496 | m_todoMgr.remove( to.uid() ); |
@@ -599,7 +597,7 @@ void MainWindow::beamDone( Ir* ir) { | |||
599 | void MainWindow::receiveFile( const QString& filename ) { | 597 | void MainWindow::receiveFile( const QString& filename ) { |
600 | OTodoAccessVCal* cal = new OTodoAccessVCal(filename ); | 598 | OPimTodoAccessVCal* cal = new OPimTodoAccessVCal(filename ); |
601 | 599 | ||
602 | OTodoAccess acc( cal ); | 600 | OPimTodoAccess acc( cal ); |
603 | acc.load(); | 601 | acc.load(); |
604 | OTodoAccess::List list = acc.allRecords(); | 602 | OPimTodoAccess::List list = acc.allRecords(); |
605 | 603 | ||
@@ -612,3 +610,3 @@ void MainWindow::receiveFile( const QString& filename ) { | |||
612 | QMessageBox::Cancel ) == QMessageBox::Ok ) { | 610 | QMessageBox::Cancel ) == QMessageBox::Ok ) { |
613 | OTodoAccess::List::Iterator it; | 611 | OPimTodoAccess::List::Iterator it; |
614 | for ( it = list.begin(); it != list.end(); ++it ) | 612 | for ( it = list.begin(); it != list.end(); ++it ) |
@@ -710,5 +708,5 @@ void MainWindow::slotEdit( int uid ) { | |||
710 | 708 | ||
711 | OTodo old_todo = m_todoMgr.event( uid ); | 709 | OPimTodo old_todo = m_todoMgr.event( uid ); |
712 | 710 | ||
713 | OTodo todo = currentEditor()->edit(this, old_todo ); | 711 | OPimTodo todo = currentEditor()->edit(this, old_todo ); |
714 | 712 | ||
@@ -730,3 +728,3 @@ void MainWindow::slotUpdate1( int uid, const SmallTodo& ev) { | |||
730 | */ | 728 | */ |
731 | void MainWindow::updateTodo( const OTodo& ev) { | 729 | void MainWindow::updateTodo( const OPimTodo& ev) { |
732 | m_todoMgr.update( ev.uid() , ev ); | 730 | m_todoMgr.update( ev.uid() , ev ); |
@@ -748,3 +746,3 @@ void MainWindow::slotQuickEntered() { | |||
748 | qWarning("entered"); | 746 | qWarning("entered"); |
749 | OTodo todo = quickEditor()->todo(); | 747 | OPimTodo todo = quickEditor()->todo(); |
750 | if (todo.isEmpty() ) | 748 | if (todo.isEmpty() ) |
@@ -762,4 +760,4 @@ void MainWindow::slotComplete( int uid ) { | |||
762 | } | 760 | } |
763 | void MainWindow::slotComplete( const OTodo& todo ) { | 761 | void MainWindow::slotComplete( const OPimTodo& todo ) { |
764 | OTodo to = todo; | 762 | OPimTodo to = todo; |
765 | to.setCompleted( !to.isCompleted() ); | 763 | to.setCompleted( !to.isCompleted() ); |
@@ -779,8 +777,8 @@ void MainWindow::slotComplete( const OTodo& todo ) { | |||
779 | if ( to.hasRecurrence() && to.isCompleted() ) { | 777 | if ( to.hasRecurrence() && to.isCompleted() ) { |
780 | OTodo to2( to ); | 778 | OPimTodo to2( to ); |
781 | 779 | ||
782 | /* the spinned off one won't recur anymore */ | 780 | /* the spinned off one won't recur anymore */ |
783 | to.setRecurrence( ORecur() ); | 781 | to.setRecurrence( OPimRecurrence() ); |
784 | 782 | ||
785 | ORecur rec = to2.recurrence(); | 783 | OPimRecurrence rec = to2.recurrence(); |
786 | rec.setStart( to.dueDate() ); | 784 | rec.setStart( to.dueDate() ); |
@@ -827,3 +825,3 @@ void MainWindow::slotComplete( const OTodo& todo ) { | |||
827 | to2.notifiers().setAlarms( als ); | 825 | to2.notifiers().setAlarms( als ); |
828 | handleAlarms( OTodo(), todo ); | 826 | handleAlarms( OPimTodo(), todo ); |
829 | } | 827 | } |
@@ -857,3 +855,3 @@ int MainWindow::create() { | |||
857 | 855 | ||
858 | OTodo todo = currentEditor()->newTodo( currentCatId(), | 856 | OPimTodo todo = currentEditor()->newTodo( currentCatId(), |
859 | this ); | 857 | this ); |
@@ -863,3 +861,3 @@ int MainWindow::create() { | |||
863 | uid = todo.uid(); | 861 | uid = todo.uid(); |
864 | handleAlarms( OTodo(), todo ); | 862 | handleAlarms( OPimTodo(), todo ); |
865 | m_todoMgr.add( todo ); | 863 | m_todoMgr.add( todo ); |
@@ -882,3 +880,3 @@ bool MainWindow::remove( int uid ) { | |||
882 | /* argh need to get the whole OEvent... to disable alarms -zecke */ | 880 | /* argh need to get the whole OEvent... to disable alarms -zecke */ |
883 | handleAlarms( OTodo(), m_todoMgr.event( uid ) ); | 881 | handleAlarms( OPimTodo(), m_todoMgr.event( uid ) ); |
884 | 882 | ||
@@ -892,5 +890,5 @@ void MainWindow::beam( int uid) { | |||
892 | 890 | ||
893 | OTodo todo = event( uid ); | 891 | OPimTodo todo = event( uid ); |
894 | OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) ); | 892 | OPimTodoAccessVCal* cal = new OPimTodoAccessVCal(QString::fromLatin1(beamfile) ); |
895 | OTodoAccess acc( cal ); | 893 | OPimTodoAccess acc( cal ); |
896 | acc.load(); | 894 | acc.load(); |
@@ -915,6 +913,6 @@ void MainWindow::edit( int uid ) { | |||
915 | void MainWindow::add( const OPimRecord& rec) { | 913 | void MainWindow::add( const OPimRecord& rec) { |
916 | if ( rec.rtti() != OTodo::rtti() ) return; | 914 | if ( rec.rtti() != OPimTodo::rtti() ) return; |
917 | m_todoMgr.load(); // might not be loaded | 915 | m_todoMgr.load(); // might not be loaded |
918 | 916 | ||
919 | const OTodo& todo = static_cast<const OTodo&>(rec); | 917 | const OPimTodo& todo = static_cast<const OPimTodo&>(rec); |
920 | 918 | ||
@@ -971,3 +969,3 @@ namespace { | |||
971 | 969 | ||
972 | void MainWindow::handleAlarms( const OTodo& oldTodo, const OTodo& newTodo) { | 970 | void MainWindow::handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo) { |
973 | /* | 971 | /* |
@@ -999,3 +997,3 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) { | |||
999 | 997 | ||
1000 | OTodo todo = m_todoMgr.event( uid ); | 998 | OPimTodo todo = m_todoMgr.event( uid ); |
1001 | if (!todo.hasNotifiers() ) return; | 999 | 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 @@ | |||
33 | 33 | ||
34 | #include <opie/otodoaccess.h> | 34 | #include <opie2/otodoaccess.h> |
35 | #include <opie/otodo.h> | 35 | #include <opie2/opimtodo.h> |
36 | #include <opie/opimmainwindow.h> | 36 | #include <opie2/opimmainwindow.h> |
37 | #include <opie2/owidgetstack.h> | ||
37 | 38 | ||
@@ -46,3 +47,2 @@ class QToolBar; | |||
46 | class QAction; | 47 | class QAction; |
47 | class OWidgetStack; | ||
48 | class Ir; | 48 | class Ir; |
@@ -51,2 +51,4 @@ class QLineEdit; | |||
51 | 51 | ||
52 | using namespace Opie; | ||
53 | |||
52 | namespace Todo { | 54 | namespace Todo { |
@@ -71,3 +73,3 @@ namespace Todo { | |||
71 | 73 | ||
72 | /** return a context menu for an OTodo */ | 74 | /** return a context menu for an OPimTodo */ |
73 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); | 75 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); |
@@ -79,7 +81,7 @@ namespace Todo { | |||
79 | void updateList(); | 81 | void updateList(); |
80 | OTodoAccess::List list()const; | 82 | OPimTodoAccess::List list()const; |
81 | OTodoAccess::List sorted( bool asc, int sortOrder ); | 83 | OPimTodoAccess::List sorted( bool asc, int sortOrder ); |
82 | OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); | 84 | OPimTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); |
83 | 85 | ||
84 | OTodo event(int uid ); | 86 | OPimTodo event(int uid ); |
85 | 87 | ||
@@ -95,3 +97,3 @@ namespace Todo { | |||
95 | 97 | ||
96 | void updateTodo( const OTodo& ); | 98 | void updateTodo( const OPimTodo& ); |
97 | void populateTemplates(); | 99 | void populateTemplates(); |
@@ -110,3 +112,3 @@ private slots: | |||
110 | /* handle setting and removing alarms */ | 112 | /* handle setting and removing alarms */ |
111 | void handleAlarms( const OTodo& oldTodo, const OTodo& newTodo ); | 113 | void handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo ); |
112 | void receiveFile( const QString& filename ); | 114 | void receiveFile( const QString& filename ); |
@@ -167,3 +169,3 @@ private slots: | |||
167 | void slotComplete( int uid ); | 169 | void slotComplete( int uid ); |
168 | void slotComplete( const OTodo& ev ); | 170 | void slotComplete( const OPimTodo& ev ); |
169 | void slotNewFromTemplate(int id ); | 171 | 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> | |||
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, libopie1, opie-pics | 7 | Depends: task-opie-minimal, libopiecore2, libopieui2, libopiepim2, opie-pics |
8 | Description: Todo list manager | 8 | 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 @@ | |||
2 | 2 | ||
3 | #include <opie/orecurrancewidget.h> | ||
4 | |||
5 | #include "taskeditoroverview.h" | 3 | #include "taskeditoroverview.h" |
@@ -15,3 +13,3 @@ OTaskEditor::OTaskEditor(int cur) | |||
15 | } | 13 | } |
16 | OTaskEditor::OTaskEditor( const OTodo& to) | 14 | OTaskEditor::OTaskEditor( const OPimTodo& to) |
17 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 15 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
@@ -24,3 +22,3 @@ OTaskEditor::~OTaskEditor() { | |||
24 | void OTaskEditor::init( int cur ) { | 22 | void OTaskEditor::init( int cur ) { |
25 | OTodo to; | 23 | OPimTodo to; |
26 | to.setUid( 1 ); // generate a new uid | 24 | to.setUid( 1 ); // generate a new uid |
@@ -30,8 +28,8 @@ void OTaskEditor::init( int cur ) { | |||
30 | } | 28 | } |
31 | void OTaskEditor::init( const OTodo& to ) { | 29 | void OTaskEditor::init( const OPimTodo& to ) { |
32 | load( to ); | 30 | load( to ); |
33 | } | 31 | } |
34 | OTodo OTaskEditor::todo()const{ | 32 | OPimTodo OTaskEditor::todo()const{ |
35 | qWarning("saving!"); | 33 | qWarning("saving!"); |
36 | OTodo to ( m_todo ); | 34 | OPimTodo to ( m_todo ); |
37 | m_overView->save( to ); | 35 | m_overView->save( to ); |
@@ -43,3 +41,3 @@ OTodo OTaskEditor::todo()const{ | |||
43 | } | 41 | } |
44 | void OTaskEditor::load(const OTodo& to) { | 42 | void OTaskEditor::load(const OPimTodo& to) { |
45 | m_overView->load( to ); | 43 | m_overView->load( to ); |
@@ -48,3 +46,3 @@ void OTaskEditor::load(const OTodo& to) { | |||
48 | m_alarm->load( to ); | 46 | m_alarm->load( to ); |
49 | 47 | ||
50 | m_todo = to; | 48 | m_todo = to; |
@@ -77,3 +75,3 @@ void OTaskEditor::init() { | |||
77 | 75 | ||
78 | m_rec = new ORecurranceWidget( true, QDate::currentDate(), this ); | 76 | m_rec = new OPimRecurrenceWidget( true, QDate::currentDate(), this ); |
79 | m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); | 77 | 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 @@ | |||
5 | 5 | ||
6 | #include <opie/otodo.h> | 6 | #include <opie2/opimtodo.h> |
7 | #include <opie/otabwidget.h> | 7 | #include <opie2/otabwidget.h> |
8 | #include <opie2/opimrecurrencewidget.h> | ||
8 | 9 | ||
@@ -11,3 +12,2 @@ class TaskEditorStatus; | |||
11 | class TaskEditorAlarms; | 12 | class TaskEditorAlarms; |
12 | class ORecurranceWidget; | ||
13 | class QMultiLineEdit; | 13 | class QMultiLineEdit; |
@@ -18,3 +18,3 @@ public: | |||
18 | OTaskEditor(int cur); | 18 | OTaskEditor(int cur); |
19 | OTaskEditor( const OTodo& todo ); | 19 | OTaskEditor( const OPimTodo& todo ); |
20 | ~OTaskEditor(); | 20 | ~OTaskEditor(); |
@@ -26,7 +26,7 @@ public: | |||
26 | void init( int cur ); | 26 | void init( int cur ); |
27 | void init( const OTodo& todo ); | 27 | void init( const OPimTodo& todo ); |
28 | 28 | ||
29 | OTodo todo()const; | 29 | OPimTodo todo()const; |
30 | private: | 30 | private: |
31 | void load( const OTodo& ); | 31 | void load( const OPimTodo& ); |
32 | void init(); | 32 | void init(); |
@@ -38,4 +38,4 @@ private: | |||
38 | TaskEditorAlarms *m_remind; | 38 | TaskEditorAlarms *m_remind; |
39 | ORecurranceWidget *m_rec; | 39 | OPimRecurrenceWidget *m_rec; |
40 | OTodo m_todo; | 40 | OPimTodo m_todo; |
41 | }; | 41 | }; |
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 @@ | |||
6 | 6 | ||
7 | #include <opie/otodo.h> | 7 | #include <opie2/opimtodo.h> |
8 | |||
9 | using Opie::OPimTodo; | ||
8 | 10 | ||
@@ -11,3 +13,3 @@ namespace Todo{ | |||
11 | struct QuickEditBase { | 13 | struct QuickEditBase { |
12 | virtual OTodo todo()const = 0l; | 14 | virtual OPimTodo todo()const = 0l; |
13 | virtual QSignal* signal() = 0l; | 15 | virtual QSignal* signal() = 0l; |
@@ -25,3 +27,3 @@ namespace Todo{ | |||
25 | * Quick edit is meant to quickly enter | 27 | * Quick edit is meant to quickly enter |
26 | * OTodos in a fast way | 28 | * OPimTodos in a fast way |
27 | */ | 29 | */ |
@@ -31,3 +33,3 @@ namespace Todo{ | |||
31 | virtual ~QuickEdit(); | 33 | virtual ~QuickEdit(); |
32 | //OTodo todo()const; | 34 | //OPimTodo todo()const; |
33 | QSignal* signal(); | 35 | 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 @@ | |||
6 | 6 | ||
7 | #include <opie/oclickablelabel.h> | 7 | #include <opie2/oclickablelabel.h> |
8 | 8 | ||
@@ -64,3 +64,3 @@ QuickEditImpl::~QuickEditImpl() { | |||
64 | } | 64 | } |
65 | OTodo QuickEditImpl::todo()const { | 65 | OPimTodo QuickEditImpl::todo()const { |
66 | return m_todo; | 66 | return m_todo; |
@@ -71,3 +71,3 @@ QWidget* QuickEditImpl::widget() { | |||
71 | void QuickEditImpl::slotEnter() { | 71 | void QuickEditImpl::slotEnter() { |
72 | OTodo todo; | 72 | OPimTodo todo; |
73 | 73 | ||
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: | |||
17 | ~QuickEditImpl(); | 17 | ~QuickEditImpl(); |
18 | OTodo todo()const; | 18 | OPimTodo todo()const; |
19 | QWidget* widget(); | 19 | QWidget* widget(); |
@@ -32,3 +32,3 @@ private: | |||
32 | QPopupMenu* m_menu; | 32 | QPopupMenu* m_menu; |
33 | OTodo m_todo; | 33 | OPimTodo m_todo; |
34 | bool m_visible; | 34 | 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 { | |||
39 | * SmallTodo holds everything necessary | 39 | * SmallTodo holds everything necessary |
40 | * to represent a OTodo without holding | 40 | * to represent a OPimTodo without holding |
41 | * everything from a OTodo | 41 | * everything from a OPimTodo |
42 | */ | 42 | */ |
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 @@ | |||
39 | 39 | ||
40 | #include <opie/orecur.h> | 40 | #include <opie2/opimrecurrence.h> |
41 | 41 | ||
@@ -186,3 +186,3 @@ int TableView::prev() { | |||
186 | QString TableView::currentRepresentation() { | 186 | QString TableView::currentRepresentation() { |
187 | OTodo to = sorted()[currentRow()]; | 187 | OPimTodo to = sorted()[currentRow()]; |
188 | return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; | 188 | return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; |
@@ -206,3 +206,3 @@ void TableView::updateView( ) { | |||
206 | sort(); | 206 | sort(); |
207 | OTodoAccess::List::Iterator it, end; | 207 | OPimTodoAccess::List::Iterator it, end; |
208 | it = sorted().begin(); | 208 | it = sorted().begin(); |
@@ -229,3 +229,3 @@ void TableView::updateView( ) { | |||
229 | } | 229 | } |
230 | void TableView::setTodo( int, const OTodo&) { | 230 | void TableView::setTodo( int, const OPimTodo&) { |
231 | sort(); | 231 | sort(); |
@@ -235,3 +235,3 @@ void TableView::setTodo( int, const OTodo&) { | |||
235 | } | 235 | } |
236 | void TableView::addEvent( const OTodo&) { | 236 | void TableView::addEvent( const OPimTodo&) { |
237 | 237 | ||
@@ -244,3 +244,3 @@ void TableView::addEvent( const OTodo&) { | |||
244 | */ | 244 | */ |
245 | void TableView::replaceEvent( const OTodo& ev) { | 245 | void TableView::replaceEvent( const OPimTodo& ev) { |
246 | addEvent( ev ); | 246 | addEvent( ev ); |
@@ -390,3 +390,3 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool | |||
390 | 390 | ||
391 | OTodo task = sorted()[row]; | 391 | OPimTodo task = sorted()[row]; |
392 | 392 | ||
@@ -499,3 +499,3 @@ void TableView::setCellContentFromEditor(int row, int col ) { | |||
499 | int pri = ((QComboBox*)wid)->currentItem() + 1; | 499 | int pri = ((QComboBox*)wid)->currentItem() + 1; |
500 | OTodo todo = sorted()[row]; | 500 | OPimTodo todo = sorted()[row]; |
501 | if ( todo.priority() != pri ) { | 501 | if ( todo.priority() != pri ) { |
@@ -510,3 +510,3 @@ void TableView::setCellContentFromEditor(int row, int col ) { | |||
510 | QString text = ((QLineEdit*)wid)->text(); | 510 | QString text = ((QLineEdit*)wid)->text(); |
511 | OTodo todo = sorted()[row]; | 511 | OPimTodo todo = sorted()[row]; |
512 | if ( todo.summary() != text ) { | 512 | 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 { | |||
58 | void updateView(); | 58 | void updateView(); |
59 | void setTodo( int uid, const OTodo& ); | 59 | void setTodo( int uid, const OPimTodo& ); |
60 | void addEvent( const OTodo& event ); | 60 | void addEvent( const OPimTodo& event ); |
61 | void replaceEvent( const OTodo& ); | 61 | void replaceEvent( const OPimTodo& ); |
62 | void removeEvent( int uid ); | 62 | void removeEvent( int uid ); |
@@ -74,3 +74,3 @@ namespace Todo { | |||
74 | * 40.000 QTableItems for 10.000 | 74 | * 40.000 QTableItems for 10.000 |
75 | * OTodos where we only show 10 at a time! | 75 | * OPimTodos where we only show 10 at a time! |
76 | */ | 76 | */ |
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 @@ | |||
30 | 30 | ||
31 | #include <opie/otodo.h> | 31 | #include <opie2/opimnotifymanager.h> |
32 | #include <opie/opimnotifymanager.h> | 32 | #include <opie2/otimepicker.h> |
33 | #include <opie/otimepicker.h> | ||
34 | 33 | ||
@@ -124,3 +123,3 @@ void TaskEditorAlarms::slotDelete(){ | |||
124 | 123 | ||
125 | void TaskEditorAlarms::load( const OTodo& todo) { | 124 | void TaskEditorAlarms::load( const OPimTodo& todo) { |
126 | lstAlarms->clear(); | 125 | lstAlarms->clear(); |
@@ -138,3 +137,3 @@ void TaskEditorAlarms::load( const OTodo& todo) { | |||
138 | } | 137 | } |
139 | void TaskEditorAlarms::save( OTodo& todo ) { | 138 | void TaskEditorAlarms::save( OPimTodo& todo ) { |
140 | if (lstAlarms->childCount() <= 0 ) return; | 139 | 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 @@ | |||
31 | 31 | ||
32 | #include <opie2/opimtodo.h> | ||
33 | |||
32 | #include <qwidget.h> | 34 | #include <qwidget.h> |
@@ -35,3 +37,4 @@ class QListView; | |||
35 | class QListViewItem; | 37 | class QListViewItem; |
36 | class OTodo; | 38 | |
39 | using namespace Opie; | ||
37 | 40 | ||
@@ -50,4 +53,4 @@ public: | |||
50 | ~TaskEditorAlarms(); | 53 | ~TaskEditorAlarms(); |
51 | void load( const OTodo& ); | 54 | void load( const OPimTodo& ); |
52 | void save( OTodo& ); | 55 | void save( OPimTodo& ); |
53 | private: | 56 | 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 @@ | |||
30 | 30 | ||
31 | #include <opie/orecur.h> | 31 | //#include <opie2/opimrecurrence.h> |
32 | 32 | ||
@@ -129,3 +129,3 @@ TaskEditorOverView::~TaskEditorOverView() | |||
129 | 129 | ||
130 | void TaskEditorOverView::load( const OTodo& todo ) | 130 | void TaskEditorOverView::load( const OPimTodo& todo ) |
131 | { | 131 | { |
@@ -150,3 +150,3 @@ void TaskEditorOverView::load( const OTodo& todo ) | |||
150 | 150 | ||
151 | void TaskEditorOverView::save( OTodo &todo ) | 151 | void TaskEditorOverView::save( OPimTodo &todo ) |
152 | { | 152 | { |
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 @@ | |||
31 | 31 | ||
32 | #include <opie/otodo.h> | 32 | #include <opie2/opimtodo.h> |
33 | 33 | ||
@@ -41,4 +41,6 @@ class QMultiLineEdit; | |||
41 | 41 | ||
42 | using namespace Opie; | ||
43 | |||
42 | class TaskEditorOverView : public QWidget | 44 | class TaskEditorOverView : public QWidget |
43 | { | 45 | { |
44 | Q_OBJECT | 46 | Q_OBJECT |
@@ -55,4 +57,4 @@ public: | |||
55 | 57 | ||
56 | void load( const OTodo & ); | 58 | void load( const OPimTodo & ); |
57 | void save( OTodo & ); | 59 | void save( OPimTodo & ); |
58 | 60 | ||
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 @@ | |||
30 | 30 | ||
31 | #include <opie/otodo.h> | 31 | #include <opie2/opimmaintainer.h> |
32 | #include <opie/opimmaintainer.h> | 32 | #include <opie2/opimstate.h> |
33 | #include <opie/opimstate.h> | ||
34 | 33 | ||
@@ -173,3 +172,3 @@ TaskEditorStatus::~TaskEditorStatus() | |||
173 | 172 | ||
174 | void TaskEditorStatus::load( const OTodo &todo ) | 173 | void TaskEditorStatus::load( const OPimTodo &todo ) |
175 | { | 174 | { |
@@ -225,3 +224,3 @@ void TaskEditorStatus::load( const OTodo &todo ) | |||
225 | 224 | ||
226 | void TaskEditorStatus::save( OTodo &todo ) | 225 | void TaskEditorStatus::save( OPimTodo &todo ) |
227 | { | 226 | { |
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 @@ | |||
31 | 31 | ||
32 | #include <opie2/opimtodo.h> | ||
33 | |||
32 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
@@ -35,3 +37,2 @@ | |||
35 | class DateBookMonth; | 37 | class DateBookMonth; |
36 | class OTodo; | ||
37 | class QCheckBox; | 38 | class QCheckBox; |
@@ -42,2 +43,4 @@ class QToolButton; | |||
42 | 43 | ||
44 | using namespace Opie; | ||
45 | |||
43 | /** | 46 | /** |
@@ -49,3 +52,3 @@ class QToolButton; | |||
49 | class TaskEditorStatus : public QWidget | 52 | class TaskEditorStatus : public QWidget |
50 | { | 53 | { |
51 | Q_OBJECT | 54 | Q_OBJECT |
@@ -70,3 +73,3 @@ public: | |||
70 | * I could have a struct which returns a QWidget* | 73 | * I could have a struct which returns a QWidget* |
71 | * load and save to a OTodo | 74 | * load and save to a OPimTodo |
72 | * and use multiple inheretence with all other widgets | 75 | * and use multiple inheretence with all other widgets |
@@ -76,4 +79,4 @@ public: | |||
76 | */ | 79 | */ |
77 | void load( const OTodo & ); | 80 | void load( const OPimTodo & ); |
78 | void save( OTodo & ); | 81 | void save( OPimTodo & ); |
79 | 82 | ||
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 { | |||
17 | const QString& name, | 17 | const QString& name, |
18 | const OTodo& ); | 18 | const OPimTodo& ); |
19 | ~TemplateListItem(); | 19 | ~TemplateListItem(); |
20 | 20 | ||
21 | OTodo event()const; | 21 | OPimTodo event()const; |
22 | QString text()const; | 22 | QString text()const; |
23 | void setText(const QString& str ); | 23 | void setText(const QString& str ); |
24 | void setEvent( const OTodo& ); | 24 | void setEvent( const OPimTodo& ); |
25 | private: | 25 | private: |
26 | QString m_name; | 26 | QString m_name; |
27 | OTodo m_ev; | 27 | OPimTodo m_ev; |
28 | }; | 28 | }; |
@@ -32,3 +32,3 @@ namespace { | |||
32 | const QString& text, | 32 | const QString& text, |
33 | const OTodo& ev ) | 33 | const OPimTodo& ev ) |
34 | : QListViewItem( view ), m_name( text ), m_ev( ev ) | 34 | : QListViewItem( view ), m_name( text ), m_ev( ev ) |
@@ -38,3 +38,3 @@ namespace { | |||
38 | TemplateListItem::~TemplateListItem() {} | 38 | TemplateListItem::~TemplateListItem() {} |
39 | OTodo TemplateListItem::event() const { | 39 | OPimTodo TemplateListItem::event() const { |
40 | return m_ev; | 40 | return m_ev; |
@@ -48,3 +48,3 @@ namespace { | |||
48 | } | 48 | } |
49 | void TemplateListItem::setEvent( const OTodo& ev) { | 49 | void TemplateListItem::setEvent( const OPimTodo& ev) { |
50 | m_ev = ev; | 50 | m_ev = ev; |
@@ -74,3 +74,3 @@ void TemplateDialogImpl::slotAdd() { | |||
74 | QString str = QWidget::tr("New Template %1").arg( listView()->childCount() ); | 74 | QString str = QWidget::tr("New Template %1").arg( listView()->childCount() ); |
75 | OTodo ev; | 75 | OPimTodo ev; |
76 | m_man->addEvent(str, ev); | 76 | m_man->addEvent(str, ev); |
@@ -94,3 +94,3 @@ void TemplateDialogImpl::slotEdit() { | |||
94 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); | 94 | TemplateListItem* item = static_cast<TemplateListItem*>( listView()->currentItem() ); |
95 | OTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); | 95 | OPimTodo ev = m_win->currentEditor()->edit( m_win, item->event() ); |
96 | if ( m_win->currentEditor()->accepted() ) { | 96 | 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 @@ | |||
5 | 5 | ||
6 | #include <opie/otodo.h> | 6 | #include <opie2/opimtodo.h> |
7 | 7 | ||
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 { | |||
13 | } | 13 | } |
14 | void TextViewShow::slotShow( const OTodo& ev ) { | 14 | void TextViewShow::slotShow( const OPimTodo& ev ) { |
15 | setText( ev.toRichText() ); | 15 | 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 { | |||
12 | QString type()const; | 12 | QString type()const; |
13 | void slotShow( const OTodo& ev ); | 13 | void slotShow( const OPimTodo& ev ); |
14 | QWidget* widget(); | 14 | 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 | |||
46 | DEPENDPATH+= $(OPIEDIR)/include | 46 | DEPENDPATH+= $(OPIEDIR)/include |
47 | LIBS += -lqpe -lopie | 47 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopiepim2 |
48 | 48 | ||
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 @@ | |||
3 | 3 | ||
4 | #include <opie/otodo.h> | 4 | #include <opie2/opimtodo.h> |
5 | 5 | ||
@@ -11,4 +11,4 @@ namespace Todo { | |||
11 | 11 | ||
12 | ToDoEvent newEvent( const OTodo& ) = 0; | 12 | ToDoEvent newEvent( const OPimTodo& ) = 0; |
13 | ToDoEvent editEvent( const OTodo& ) = 0; | 13 | ToDoEvent editEvent( const OPimTodo& ) = 0; |
14 | }; | 14 | }; |
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() { | |||
16 | } | 16 | } |
17 | OTodo Editor::newTodo( int cur, | 17 | OPimTodo Editor::newTodo( int cur, |
18 | QWidget*) { | 18 | QWidget*) { |
@@ -30,3 +30,3 @@ OTodo Editor::newTodo( int cur, | |||
30 | 30 | ||
31 | OTodo ev = e->todo(); | 31 | OPimTodo ev = e->todo(); |
32 | qWarning("Todo uid"); | 32 | qWarning("Todo uid"); |
@@ -37,4 +37,4 @@ OTodo Editor::newTodo( int cur, | |||
37 | } | 37 | } |
38 | OTodo Editor::edit( QWidget *, | 38 | OPimTodo Editor::edit( QWidget *, |
39 | const OTodo& todo ) { | 39 | const OPimTodo& todo ) { |
40 | OTaskEditor *e = self(); | 40 | OTaskEditor *e = self(); |
@@ -45,3 +45,3 @@ OTodo Editor::edit( QWidget *, | |||
45 | 45 | ||
46 | OTodo ev = e->todo(); | 46 | OPimTodo ev = e->todo(); |
47 | if ( ret == QDialog::Accepted ) | 47 | 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 @@ | |||
3 | 3 | ||
4 | #include <opie/otodo.h> | 4 | #include <opie2/opimtodo.h> |
5 | 5 | ||
@@ -13,6 +13,6 @@ namespace Todo { | |||
13 | 13 | ||
14 | OTodo newTodo( int currentCatId, | 14 | OPimTodo newTodo( int currentCatId, |
15 | QWidget* par ); | 15 | QWidget* par ); |
16 | OTodo edit( QWidget* par, | 16 | OPimTodo edit( QWidget* par, |
17 | const OTodo& ev = OTodo() ); | 17 | const OPimTodo& ev = OPimTodo() ); |
18 | 18 | ||
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() { | |||
44 | } | 44 | } |
45 | OTodo TodoManager::event(int uid ) { | 45 | OPimTodo TodoManager::event(int uid ) { |
46 | return m_db->find( uid ); | 46 | return m_db->find( uid ); |
@@ -51,9 +51,9 @@ void TodoManager::updateList() { | |||
51 | } | 51 | } |
52 | OTodoAccess::List TodoManager::list() const{ | 52 | OPimTodoAccess::List TodoManager::list() const{ |
53 | return m_list; | 53 | return m_list; |
54 | } | 54 | } |
55 | OTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { | 55 | OPimTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { |
56 | return m_db->sorted( asc, so, f, cat ); | 56 | return m_db->sorted( asc, so, f, cat ); |
57 | } | 57 | } |
58 | OTodoAccess::List::Iterator TodoManager::overDue() { | 58 | OPimTodoAccess::List::Iterator TodoManager::overDue() { |
59 | int filter = 2 | 1; | 59 | int filter = 2 | 1; |
@@ -63,3 +63,3 @@ OTodoAccess::List::Iterator TodoManager::overDue() { | |||
63 | } | 63 | } |
64 | OTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, | 64 | OPimTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, |
65 | const QDate& end ) { | 65 | const QDate& end ) { |
@@ -69,3 +69,3 @@ OTodoAccess::List::Iterator TodoManager::fromTo( const QDate& start, | |||
69 | } | 69 | } |
70 | OTodoAccess::List::Iterator TodoManager::query( const OTodo& ev, int query ) { | 70 | OPimTodoAccess::List::Iterator TodoManager::query( const OPimTodo& ev, int query ) { |
71 | m_list = m_db->queryByExample( ev, query ); | 71 | m_list = m_db->queryByExample( ev, query ); |
@@ -74,6 +74,6 @@ OTodoAccess::List::Iterator TodoManager::query( const OTodo& ev, int query ) { | |||
74 | } | 74 | } |
75 | OTodoAccess* TodoManager::todoDB() { | 75 | OPimTodoAccess* TodoManager::todoDB() { |
76 | return m_db; | 76 | return m_db; |
77 | } | 77 | } |
78 | void TodoManager::add( const OTodo& ev ) { | 78 | void TodoManager::add( const OPimTodo& ev ) { |
79 | m_db->add( ev ); | 79 | m_db->add( ev ); |
@@ -83,3 +83,3 @@ void TodoManager::update( int, const SmallTodo& ) { | |||
83 | } | 83 | } |
84 | void TodoManager::update( int, const OTodo& ev) { | 84 | void TodoManager::update( int, const OPimTodo& ev) { |
85 | m_db->replace( ev ); | 85 | m_db->replace( ev ); |
@@ -123,3 +123,3 @@ void TodoManager::load() { | |||
123 | if (!m_db) { | 123 | if (!m_db) { |
124 | m_db = new OTodoAccess(); | 124 | m_db = new OPimTodoAccess(); |
125 | m_db->load(); | 125 | 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 @@ | |||
31 | 31 | ||
32 | #include <qarray.h> | 32 | #include <opie2/opimtodo.h> |
33 | #include <qobject.h> | 33 | #include <opie2/otodoaccess.h> |
34 | #include <qstring.h> | ||
35 | 34 | ||
@@ -37,4 +36,5 @@ | |||
37 | 36 | ||
38 | #include <opie/otodo.h> | 37 | #include <qarray.h> |
39 | #include <opie/otodoaccess.h> | 38 | #include <qobject.h> |
39 | #include <qstring.h> | ||
40 | 40 | ||
@@ -42,2 +42,4 @@ | |||
42 | 42 | ||
43 | using Opie::OPimTodo; | ||
44 | using Opie::OPimTodoAccess; | ||
43 | 45 | ||
@@ -54,3 +56,3 @@ namespace Todo { | |||
54 | int catId(const QString&); | 56 | int catId(const QString&); |
55 | OTodo event(int uid ); | 57 | OPimTodo event(int uid ); |
56 | 58 | ||
@@ -58,9 +60,9 @@ namespace Todo { | |||
58 | /** returns the iterator sorted if set sorted*/ | 60 | /** returns the iterator sorted if set sorted*/ |
59 | OTodoAccess::List list()const; | 61 | OPimTodoAccess::List list()const; |
60 | OTodoAccess::List sorted( bool asc, int so, int f, int cat ); | 62 | OPimTodoAccess::List sorted( bool asc, int so, int f, int cat ); |
61 | 63 | ||
62 | OTodoAccess::List::Iterator overDue(); | 64 | OPimTodoAccess::List::Iterator overDue(); |
63 | OTodoAccess::List::Iterator fromTo( const QDate& start, | 65 | OPimTodoAccess::List::Iterator fromTo( const QDate& start, |
64 | const QDate& end ); | 66 | const QDate& end ); |
65 | OTodoAccess::List::Iterator query( const OTodo& ev, int query ); | 67 | OPimTodoAccess::List::Iterator query( const OPimTodo& ev, int query ); |
66 | 68 | ||
@@ -72,3 +74,3 @@ namespace Todo { | |||
72 | 74 | ||
73 | OTodoAccess* todoDB(); | 75 | OPimTodoAccess* todoDB(); |
74 | bool saveAll(); | 76 | bool saveAll(); |
@@ -81,5 +83,5 @@ namespace Todo { | |||
81 | public slots: | 83 | public slots: |
82 | void add( const OTodo& ); | 84 | void add( const OPimTodo& ); |
83 | void update( int uid, const SmallTodo& ); | 85 | void update( int uid, const SmallTodo& ); |
84 | void update( int uid, const OTodo& ); | 86 | void update( int uid, const OPimTodo& ); |
85 | bool remove( int uid ); | 87 | bool remove( int uid ); |
@@ -96,6 +98,6 @@ namespace Todo { | |||
96 | private: | 98 | private: |
97 | OTodoAccess* m_db; | 99 | OPimTodoAccess* m_db; |
98 | OTodoAccess::List m_list; | 100 | OPimTodoAccess::List m_list; |
99 | OTodoAccess::List::Iterator m_it; | 101 | OPimTodoAccess::List::Iterator m_it; |
100 | OTodoAccess::List m_sorted; | 102 | OPimTodoAccess::List m_sorted; |
101 | Categories m_cat; | 103 | 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 @@ | |||
33 | 33 | ||
34 | #include <opie/otodo.h> | 34 | #include <opie2/opimtodo.h> |
35 | |||
36 | using Opie::OPimTodo; | ||
35 | 37 | ||
@@ -48,3 +50,3 @@ namespace Todo { | |||
48 | virtual QString type()const = 0; | 50 | virtual QString type()const = 0; |
49 | virtual void slotShow( const OTodo& ev ) = 0; | 51 | virtual void slotShow( const OPimTodo& ev ) = 0; |
50 | virtual QWidget* widget() = 0; | 52 | 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 @@ | |||
1 | #include <opie2/otodoaccess.h> | ||
2 | #include <opie2/otodoaccessxml.h> | ||
3 | |||
1 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
@@ -3,5 +6,2 @@ | |||
3 | 6 | ||
4 | #include <opie/otodoaccess.h> | ||
5 | #include <opie/otodoaccessxml.h> | ||
6 | |||
7 | #include "todotemplatemanager.h" | 7 | #include "todotemplatemanager.h" |
@@ -19,11 +19,11 @@ void TemplateManager::load() { | |||
19 | Config conf("todolist_templates"); | 19 | Config conf("todolist_templates"); |
20 | OTodoAccessXML *xml = new OTodoAccessXML( QString::fromLatin1("template"), | 20 | OPimTodoAccessXML *xml = new OPimTodoAccessXML( QString::fromLatin1("template"), |
21 | m_path ); | 21 | m_path ); |
22 | OTodoAccess todoDB(xml ); | 22 | OPimTodoAccess todoDB(xml ); |
23 | todoDB.load(); | 23 | todoDB.load(); |
24 | 24 | ||
25 | OTodoAccess::List::Iterator it; | 25 | OPimTodoAccess::List::Iterator it; |
26 | OTodoAccess::List list = todoDB.allRecords(); | 26 | OPimTodoAccess::List list = todoDB.allRecords(); |
27 | for ( it = list.begin(); it != list.end(); ++it ) { | 27 | for ( it = list.begin(); it != list.end(); ++it ) { |
28 | OTodo ev = (*it); | 28 | OPimTodo ev = (*it); |
29 | conf.setGroup( QString::number( ev.uid() ) ); | 29 | conf.setGroup( QString::number( ev.uid() ) ); |
@@ -40,5 +40,5 @@ void TemplateManager::save() { | |||
40 | 40 | ||
41 | OTodoAccessXML *res = new OTodoAccessXML( "template", | 41 | OPimTodoAccessXML *res = new OPimTodoAccessXML( "template", |
42 | m_path ); | 42 | m_path ); |
43 | OTodoAccess db(res); | 43 | OPimTodoAccess db(res); |
44 | db.load(); | 44 | db.load(); |
@@ -47,5 +47,5 @@ void TemplateManager::save() { | |||
47 | 47 | ||
48 | QMap<QString, OTodo>::Iterator it; | 48 | QMap<QString, OPimTodo>::Iterator it; |
49 | for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { | 49 | for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { |
50 | OTodo ev = it.data(); | 50 | OPimTodo ev = it.data(); |
51 | conf.setGroup( QString::number( ev.uid() ) ); | 51 | conf.setGroup( QString::number( ev.uid() ) ); |
@@ -58,8 +58,8 @@ void TemplateManager::save() { | |||
58 | void TemplateManager::addEvent( const QString& str, | 58 | void TemplateManager::addEvent( const QString& str, |
59 | const OTodo& ev) { | 59 | const OPimTodo& ev) { |
60 | qWarning("AddEvent"+ str ); | 60 | qWarning("AddEvent"+ str ); |
61 | OTodo todo = ev; | 61 | OPimTodo todo = ev; |
62 | if( ev.uid() == 0 ) | 62 | if( ev.uid() == 0 ) |
63 | todo.setUid(1); // generate a new uid | 63 | todo.setUid(1); // generate a new uid |
64 | 64 | ||
65 | m_templates.replace( str, todo ); | 65 | m_templates.replace( str, todo ); |
@@ -71,3 +71,3 @@ QStringList TemplateManager::templates() const { | |||
71 | QStringList list; | 71 | QStringList list; |
72 | QMap<QString, OTodo>::ConstIterator it; | 72 | QMap<QString, OPimTodo>::ConstIterator it; |
73 | for (it = m_templates.begin(); it != m_templates.end(); ++it ) { | 73 | for (it = m_templates.begin(); it != m_templates.end(); ++it ) { |
@@ -78,3 +78,3 @@ QStringList TemplateManager::templates() const { | |||
78 | } | 78 | } |
79 | OTodo TemplateManager::templateEvent( const QString& templateName ) { | 79 | OPimTodo TemplateManager::templateEvent( const QString& templateName ) { |
80 | return m_templates[templateName]; | 80 | 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 @@ | |||
3 | 3 | ||
4 | #include <opie2/opimtodo.h> | ||
5 | |||
4 | #include <qstring.h> | 6 | #include <qstring.h> |
@@ -6,4 +8,3 @@ | |||
6 | 8 | ||
7 | #include <opie/otodo.h> | 9 | using namespace Opie; |
8 | |||
9 | 10 | ||
@@ -17,6 +18,6 @@ namespace Todo { | |||
17 | QStringList templates()const; | 18 | QStringList templates()const; |
18 | OTodo templateEvent( const QString& templateName ); | 19 | OPimTodo templateEvent( const QString& templateName ); |
19 | 20 | ||
20 | /* also replaces one */ | 21 | /* also replaces one */ |
21 | void addEvent( const QString&, const OTodo& ); | 22 | void addEvent( const QString&, const OPimTodo& ); |
22 | void removeEvent( const QString& ); | 23 | void removeEvent( const QString& ); |
@@ -24,3 +25,3 @@ namespace Todo { | |||
24 | QString m_path; | 25 | QString m_path; |
25 | QMap<QString, OTodo> m_templates; | 26 | QMap<QString, OPimTodo> m_templates; |
26 | 27 | ||
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() { | |||
21 | 21 | ||
22 | OTodo TodoView::event(int uid ) { | 22 | OPimTodo TodoView::event(int uid ) { |
23 | return m_main->event( uid ); | 23 | return m_main->event( uid ); |
24 | } | 24 | } |
25 | OTodoAccess::List TodoView::list(){ | 25 | OPimTodoAccess::List TodoView::list(){ |
26 | todoWindow()->updateList(); | 26 | todoWindow()->updateList(); |
@@ -28,3 +28,3 @@ OTodoAccess::List TodoView::list(){ | |||
28 | } | 28 | } |
29 | OTodoAccess::List TodoView::sorted()const{ | 29 | OPimTodoAccess::List TodoView::sorted()const{ |
30 | return m_sort; | 30 | return m_sort; |
@@ -48,3 +48,3 @@ void TodoView::update(int, const SmallTodo& ) { | |||
48 | } | 48 | } |
49 | void TodoView::update(int , const OTodo& ev ) { | 49 | void TodoView::update(int , const OPimTodo& ev ) { |
50 | m_main->updateTodo( ev ); | 50 | m_main->updateTodo( ev ); |
@@ -63,3 +63,3 @@ void TodoView::complete( int uid ) { | |||
63 | } | 63 | } |
64 | void TodoView::complete( const OTodo& ev ) { | 64 | void TodoView::complete( const OPimTodo& ev ) { |
65 | m_main->slotComplete( ev ); | 65 | 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 @@ | |||
36 | 36 | ||
37 | #include <opie/otodoaccess.h> | 37 | #include <opie2/otodoaccess.h> |
38 | 38 | ||
@@ -40,2 +40,4 @@ | |||
40 | 40 | ||
41 | using Opie::OPimTodo; | ||
42 | using Opie::OPimTodoAccess; | ||
41 | 43 | ||
@@ -70,4 +72,4 @@ namespace Todo { | |||
70 | 72 | ||
71 | virtual void addEvent( const OTodo& ) = 0; | 73 | virtual void addEvent( const OPimTodo& ) = 0; |
72 | virtual void replaceEvent( const OTodo& ) = 0; | 74 | virtual void replaceEvent( const OPimTodo& ) = 0; |
73 | virtual void removeEvent( int uid ) = 0; | 75 | virtual void removeEvent( int uid ) = 0; |
@@ -106,5 +108,5 @@ namespace Todo { | |||
106 | MainWindow* todoWindow(); | 108 | MainWindow* todoWindow(); |
107 | OTodo event(int uid ); | 109 | OPimTodo event(int uid ); |
108 | OTodoAccess::List list(); | 110 | OPimTodoAccess::List list(); |
109 | OTodoAccess::List sorted()const; | 111 | OPimTodoAccess::List sorted()const; |
110 | void sort(); | 112 | void sort(); |
@@ -121,3 +123,3 @@ namespace Todo { | |||
121 | void update(int uid, const SmallTodo& to ); | 123 | void update(int uid, const SmallTodo& to ); |
122 | void update(int uid, const OTodo& ev); | 124 | void update(int uid, const OPimTodo& ev); |
123 | void remove( int uid ); | 125 | void remove( int uid ); |
@@ -126,6 +128,6 @@ namespace Todo { | |||
126 | void complete( int uid ); | 128 | void complete( int uid ); |
127 | void complete( const OTodo& ev ); | 129 | void complete( const OPimTodo& ev ); |
128 | private: | 130 | private: |
129 | MainWindow *m_main; | 131 | MainWindow *m_main; |
130 | OTodoAccess::List m_sort; | 132 | OPimTodoAccess::List m_sort; |
131 | bool m_asc : 1; | 133 | bool m_asc : 1; |