summaryrefslogtreecommitdiff
path: root/examples/simple-pim/simple.h
Unidiff
Diffstat (limited to 'examples/simple-pim/simple.h') (more/less context) (show whitespace changes)
-rw-r--r--examples/simple-pim/simple.h26
1 files changed, 15 insertions, 11 deletions
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
@@ -15,22 +15,26 @@
15 15
16 16
17 17
18#include <qmainwindow.h> // from this class we will inherit 18#include <qmainwindow.h> // from this class we will inherit
19#include <qlistview.h> // A ListView for our PIM records 19#include <qlistview.h> // A ListView for our PIM records
20 20
21#include <opie/otodoaccess.h> 21#include <opie2/otodoaccess.h>
22#include <opie/odatebookaccess.h> 22#include <opie2/odatebookaccess.h>
23 23
24class QPushButton; // forward declaration to not include the header. This can save time when compiling 24class QPushButton; // forward declaration to not include the header. This can save time when compiling
25class QAction; 25class QAction;
26class PIMListView; 26class PIMListView;
27class QDate; 27class QDate;
28class QCopChannel; 28class QCopChannel;
29namespace Opie{
30namespace Ui {
29class OWait; 31class OWait;
30class OTabWidget; 32class OTabWidget;
33}
34}
31 35
32/* 36/*
33 * A mainwindow is a special QWidget it helps layouting 37 * A mainwindow is a special QWidget it helps layouting
34 * toolbar, statusbar, menubar. Got dockable areas 38 * toolbar, statusbar, menubar. Got dockable areas
35 * So in one sentence it is a MainWindow :) 39 * So in one sentence it is a MainWindow :)
36 */ 40 */
@@ -47,28 +51,28 @@ private slots:
47 void slotDesktopReceive( const QCString&, const QByteArray& ); 51 void slotDesktopReceive( const QCString&, const QByteArray& );
48 void slotLoad(); 52 void slotLoad();
49 void slotLoadForDay(int, int, int ); 53 void slotLoadForDay(int, int, int );
50 void slotLoadForDay(const QDate&); 54 void slotLoadForDay(const QDate&);
51 void slotShow(); 55 void slotShow();
52 void slotDate(); 56 void slotDate();
53 void slotShowRecord( const OPimRecord& ); 57 void slotShowRecord( const Opie::OPimRecord& );
54 58
55private: 59private:
56 void initUI(); 60 void initUI();
57 QAction *m_fire; 61 QAction *m_fire;
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;
64 PIMListView *m_dateView; 68 PIMListView *m_dateView;
65 69
66 int m_synced; // a counter for synced objects.. 70 int m_synced; // a counter for synced objects..
67 QCopChannel *m_desktopChannel; 71 QCopChannel *m_desktopChannel;
68 OWait *m_loading; 72 Opie::Ui::OWait *m_loading;
69}; 73};
70 74
71/* 75/*
72 * Instead of the simple QWidgets we will design 76 * Instead of the simple QWidgets we will design
73 * a new widget based on a QListView 77 * a new widget based on a QListView
74 * it should show either Todos or EffectiveEvents 78 * it should show either Todos or EffectiveEvents
@@ -77,19 +81,19 @@ class PIMListView : public QListView {
77 Q_OBJECT 81 Q_OBJECT
78public: 82public:
79 PIMListView( QWidget* parent, const char* name, WFlags fl= 0 ); 83 PIMListView( QWidget* parent, const char* name, WFlags fl= 0 );
80 ~PIMListView(); 84 ~PIMListView();
81 85
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();
86 90
87signals: 91signals:
88 void showRecord( const OPimRecord& ); 92 void showRecord( const Opie::OPimRecord& );
89 93
90private: 94private:
91 static QString makeString( const OEffectiveEvent& ev ); 95 static QString makeString( const Opie::OEffectiveEvent& ev );
92 96
93}; 97};
94 98
95#endif 99#endif