-rw-r--r-- | examples/simple-pim/config.in | 2 | ||||
-rw-r--r-- | examples/simple-pim/example.pro | 2 | ||||
-rw-r--r-- | examples/simple-pim/simple.cpp | 39 | ||||
-rw-r--r-- | examples/simple-pim/simple.h | 26 |
4 files changed, 37 insertions, 32 deletions
diff --git a/examples/simple-pim/config.in b/examples/simple-pim/config.in index 5d80f21..aa1a426 100644 --- a/examples/simple-pim/config.in +++ b/examples/simple-pim/config.in | |||
@@ -3,2 +3,2 @@ | |||
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIEPIM2 |
diff --git a/examples/simple-pim/example.pro b/examples/simple-pim/example.pro index c3aab53..ebcdb2b 100644 --- a/examples/simple-pim/example.pro +++ b/examples/simple-pim/example.pro | |||
@@ -14,3 +14,3 @@ DEPENDPATH += $(OPIEDIR)/include | |||
14 | # we now also include opie | 14 | # we now also include opie |
15 | LIBS += -lqpe -lopie | 15 | LIBS += -lqpe -lopiepim2 -lopieui2 |
16 | 16 | ||
diff --git a/examples/simple-pim/simple.cpp b/examples/simple-pim/simple.cpp index 029e71b..50905bf 100644 --- a/examples/simple-pim/simple.cpp +++ b/examples/simple-pim/simple.cpp | |||
@@ -19,5 +19,5 @@ | |||
19 | 19 | ||
20 | #include <opie/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching | 20 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching |
21 | #include <opie/otabwidget.h> | 21 | #include <opie2/otabwidget.h> |
22 | #include <opie/owait.h> | 22 | #include <opie2/owait.h> |
23 | 23 | ||
@@ -37,2 +37,3 @@ | |||
37 | 37 | ||
38 | using namespace Opie::Core; | ||
38 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) | 39 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) |
@@ -52,3 +53,3 @@ MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) | |||
52 | */ | 53 | */ |
53 | m_tab = new OTabWidget(this); | 54 | m_tab = new Opie::Ui::OTabWidget(this); |
54 | 55 | ||
@@ -213,3 +214,3 @@ void MainWindow::slotLoad() { | |||
213 | /* we will provide a wait scrren */ | 214 | /* we will provide a wait scrren */ |
214 | m_loading = new OWait(this, "wait screen" ); | 215 | m_loading = new Opie::Ui::OWait(this, "wait screen" ); |
215 | } | 216 | } |
@@ -278,3 +279,3 @@ void MainWindow::slotShow() { | |||
278 | /* as answer this slot will be called */ | 279 | /* as answer this slot will be called */ |
279 | void MainWindow::slotShowRecord( const OPimRecord& rec) { | 280 | void MainWindow::slotShowRecord( const Opie::OPimRecord& rec) { |
280 | /* got a parent but still is a toplevel MODAL dialog */ | 281 | /* got a parent but still is a toplevel MODAL dialog */ |
@@ -346,3 +347,3 @@ namespace { | |||
346 | */ | 347 | */ |
347 | PIMListViewItem( QListView*, OPimRecord* record ); | 348 | PIMListViewItem( QListView*, Opie::OPimRecord* record ); |
348 | ~PIMListViewItem(); | 349 | ~PIMListViewItem(); |
@@ -352,9 +353,9 @@ namespace { | |||
352 | int rtti()const; | 353 | int rtti()const; |
353 | OPimRecord* record()const; | 354 | Opie::OPimRecord* record()const; |
354 | 355 | ||
355 | private: | 356 | private: |
356 | OPimRecord* m_record; | 357 | Opie::OPimRecord* m_record; |
357 | }; | 358 | }; |
358 | 359 | ||
359 | PIMListViewItem::PIMListViewItem( QListView *p, OPimRecord* rec ) | 360 | PIMListViewItem::PIMListViewItem( QListView *p, Opie::OPimRecord* rec ) |
360 | : QListViewItem(p), m_record( rec ) { | 361 | : QListViewItem(p), m_record( rec ) { |
@@ -367,3 +368,3 @@ namespace { | |||
367 | 368 | ||
368 | OPimRecord* PIMListViewItem::record()const { | 369 | Opie::OPimRecord* PIMListViewItem::record()const { |
369 | return m_record; | 370 | return m_record; |
@@ -384,3 +385,3 @@ PIMListView::~PIMListView() { | |||
384 | 385 | ||
385 | void PIMListView::set( OTodoAccess::List list ) { | 386 | void PIMListView::set( Opie::OPimTodoAccess::List list ) { |
386 | /* clear first and then add new items */ | 387 | /* clear first and then add new items */ |
@@ -388,3 +389,3 @@ void PIMListView::set( OTodoAccess::List list ) { | |||
388 | 389 | ||
389 | OTodoAccess::List::Iterator it; | 390 | Opie::OPimTodoAccess::List::Iterator it; |
390 | for (it = list.begin(); it != list.end(); ++it ) { | 391 | for (it = list.begin(); it != list.end(); ++it ) { |
@@ -392,5 +393,5 @@ void PIMListView::set( OTodoAccess::List list ) { | |||
392 | * make a new item which automatically gets added to the listview | 393 | * make a new item which automatically gets added to the listview |
393 | * and call the copy c'tor to create a new OTodo | 394 | * and call the copy c'tor to create a new OPimTodo |
394 | */ | 395 | */ |
395 | PIMListViewItem *i = new PIMListViewItem(this, new OTodo( *it ) ); | 396 | PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimTodo( *it ) ); |
396 | i->setText(0, (*it).summary() ); | 397 | i->setText(0, (*it).summary() ); |
@@ -399,3 +400,3 @@ void PIMListView::set( OTodoAccess::List list ) { | |||
399 | 400 | ||
400 | void PIMListView::set( const OEffectiveEvent::ValueList& lst ) { | 401 | void PIMListView::set( const Opie::OEffectiveEvent::ValueList& lst ) { |
401 | /* clear first and then add items */ | 402 | /* clear first and then add items */ |
@@ -403,5 +404,5 @@ void PIMListView::set( const OEffectiveEvent::ValueList& lst ) { | |||
403 | 404 | ||
404 | OEffectiveEvent::ValueList::ConstIterator it; | 405 | Opie::OEffectiveEvent::ValueList::ConstIterator it; |
405 | for ( it = lst.begin(); it != lst.end(); ++it ) { | 406 | for ( it = lst.begin(); it != lst.end(); ++it ) { |
406 | PIMListViewItem *i = new PIMListViewItem(this, new OEvent( (*it).event() ) ); | 407 | PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimEvent( (*it).event() ) ); |
407 | i->setText( 0, PIMListView::makeString( (*it) ) ); | 408 | i->setText( 0, PIMListView::makeString( (*it) ) ); |
@@ -427,3 +428,3 @@ void PIMListView::showCurrentRecord() { | |||
427 | 428 | ||
428 | QString PIMListView::makeString( const OEffectiveEvent& ev ) { | 429 | QString PIMListView::makeString( const Opie::OEffectiveEvent& ev ) { |
429 | QString str; | 430 | QString str; |
diff --git a/examples/simple-pim/simple.h b/examples/simple-pim/simple.h index bf9ede7..2a6e8ce 100644 --- a/examples/simple-pim/simple.h +++ b/examples/simple-pim/simple.h | |||
@@ -20,4 +20,4 @@ | |||
20 | 20 | ||
21 | #include <opie/otodoaccess.h> | 21 | #include <opie2/otodoaccess.h> |
22 | #include <opie/odatebookaccess.h> | 22 | #include <opie2/odatebookaccess.h> |
23 | 23 | ||
@@ -28,4 +28,8 @@ class QDate; | |||
28 | class QCopChannel; | 28 | class QCopChannel; |
29 | namespace Opie{ | ||
30 | namespace Ui { | ||
29 | class OWait; | 31 | class OWait; |
30 | class OTabWidget; | 32 | class OTabWidget; |
33 | } | ||
34 | } | ||
31 | 35 | ||
@@ -52,3 +56,3 @@ private slots: | |||
52 | void slotDate(); | 56 | void slotDate(); |
53 | void slotShowRecord( const OPimRecord& ); | 57 | void slotShowRecord( const Opie::OPimRecord& ); |
54 | 58 | ||
@@ -58,6 +62,6 @@ private: | |||
58 | QAction *m_dateAction; | 62 | QAction *m_dateAction; |
59 | OTabWidget* m_tab; | 63 | Opie::Ui::OTabWidget* m_tab; |
60 | 64 | ||
61 | OTodoAccess m_tb; | 65 | Opie::OPimTodoAccess m_tb; |
62 | ODateBookAccess m_db; | 66 | Opie::ODateBookAccess m_db; |
63 | PIMListView *m_todoView; | 67 | PIMListView *m_todoView; |
@@ -67,3 +71,3 @@ private: | |||
67 | QCopChannel *m_desktopChannel; | 71 | QCopChannel *m_desktopChannel; |
68 | OWait *m_loading; | 72 | Opie::Ui::OWait *m_loading; |
69 | }; | 73 | }; |
@@ -82,4 +86,4 @@ public: | |||
82 | 86 | ||
83 | void set( OTodoAccess::List ); | 87 | void set( Opie::OPimTodoAccess::List ); |
84 | void set( const OEffectiveEvent::ValueList& ); | 88 | void set( const Opie::OEffectiveEvent::ValueList& ); |
85 | void showCurrentRecord(); | 89 | void showCurrentRecord(); |
@@ -87,6 +91,6 @@ public: | |||
87 | signals: | 91 | signals: |
88 | void showRecord( const OPimRecord& ); | 92 | void showRecord( const Opie::OPimRecord& ); |
89 | 93 | ||
90 | private: | 94 | private: |
91 | static QString makeString( const OEffectiveEvent& ev ); | 95 | static QString makeString( const Opie::OEffectiveEvent& ev ); |
92 | 96 | ||