Diffstat (limited to 'libopie/pim/opimmainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/opimmainwindow.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/pim/opimmainwindow.h b/libopie/pim/opimmainwindow.h index 34b8a71..dca3c82 100644 --- a/libopie/pim/opimmainwindow.h +++ b/libopie/pim/opimmainwindow.h | |||
@@ -1,89 +1,89 @@ | |||
1 | #ifndef OPIE_PIM_MAINWINDOW_H | 1 | #ifndef OPIE_PIM_MAINWINDOW_H |
2 | #define OPIE_PIM_MAINWINDOW_H | 2 | #define OPIE_PIM_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | 5 | ||
6 | #include <opie/opimrecord.h> | 6 | #include <opie/opimrecord.h> |
7 | 7 | ||
8 | /** | 8 | /** |
9 | * This is a common Opie PIM MainWindow | 9 | * This is a common Opie PIM MainWindow |
10 | * it takes care of the QCOP internals | 10 | * it takes care of the QCOP internals |
11 | * and implements some functions | 11 | * and implements some functions |
12 | * for the URL scripting schema | 12 | * for the URL scripting schema |
13 | */ | 13 | */ |
14 | /* | 14 | /* |
15 | * due Qt and Templates with signal and slots | 15 | * due Qt and Templates with signal and slots |
16 | * do not work that good :( | 16 | * do not work that good :( |
17 | * (Ok how to moc a template ;) ) | 17 | * (Ok how to moc a template ;) ) |
18 | * We will have the mainwindow which calls a struct which | 18 | * We will have the mainwindow which calls a struct which |
19 | * is normally reimplemented as a template ;) | 19 | * is normally reimplemented as a template ;) |
20 | */ | 20 | */ |
21 | 21 | ||
22 | class QCopChannel; | 22 | class QCopChannel; |
23 | class OPimMainWindow : public QMainWindow { | 23 | class OPimMainWindow : public QMainWindow { |
24 | Q_OBJECT | 24 | Q_OBJECT |
25 | public: | 25 | public: |
26 | enum TransPort { BlueTooth=0, | 26 | enum TransPort { BlueTooth=0, |
27 | IrDa }; | 27 | IrDa }; |
28 | 28 | ||
29 | OPimMainWindow( const QString& service, QWidget *parent = 0, const char* name = 0, | 29 | OPimMainWindow( const QString& service, QWidget *parent = 0, const char* name = 0, |
30 | WFlags f = WType_TopLevel); | 30 | WFlags f = WType_TopLevel); |
31 | virtual ~OPimMainWindow(); | 31 | virtual ~OPimMainWindow(); |
32 | 32 | ||
33 | 33 | ||
34 | protected slots: | 34 | protected slots: |
35 | /* | 35 | /* |
36 | * called when a setDocument | 36 | * called when a setDocument |
37 | * couldn't be handled by this window | 37 | * couldn't be handled by this window |
38 | */ | 38 | */ |
39 | virtual void doSetDocument( const QString& ); | 39 | virtual void doSetDocument( const QString& ); |
40 | /* for syncing */ | 40 | /* for syncing */ |
41 | virtual void flush() = 0; | 41 | virtual void flush() = 0; |
42 | virtual void reload() = 0; | 42 | virtual void reload() = 0; |
43 | 43 | ||
44 | /** create a new Records and return the uid */ | 44 | /** create a new Records and return the uid */ |
45 | virtual int create() = 0; | 45 | virtual int create() = 0; |
46 | /** remove a record with UID == uid */ | 46 | /** remove a record with UID == uid */ |
47 | virtual bool remove( int uid ) = 0; | 47 | virtual bool remove( int uid ) = 0; |
48 | /** beam the record with UID = uid */ | 48 | /** beam the record with UID = uid */ |
49 | virtual void beam( int uid , int transport = IrDa) = 0; | 49 | virtual void beam( int uid ) = 0; |
50 | 50 | ||
51 | /** show the record with UID == uid */ | 51 | /** show the record with UID == uid */ |
52 | virtual void show( int uid ) = 0; | 52 | virtual void show( int uid ) = 0; |
53 | /** edit the record */ | 53 | /** edit the record */ |
54 | virtual void edit( int uid ) = 0; | 54 | virtual void edit( int uid ) = 0; |
55 | 55 | ||
56 | /** make a copy of it! */ | 56 | /** make a copy of it! */ |
57 | virtual void add( const OPimRecord& ) = 0; | 57 | virtual void add( const OPimRecord& ) = 0; |
58 | 58 | ||
59 | 59 | ||
60 | QCopChannel* channel(); | 60 | QCopChannel* channel(); |
61 | 61 | ||
62 | private slots: | 62 | private slots: |
63 | void appMessage( const QCString&, const QByteArray& ); | 63 | void appMessage( const QCString&, const QByteArray& ); |
64 | void setDocument( const QString& ); | 64 | void setDocument( const QString& ); |
65 | 65 | ||
66 | 66 | ||
67 | private: | 67 | private: |
68 | class Private; | 68 | class Private; |
69 | Private* d; | 69 | Private* d; |
70 | 70 | ||
71 | int m_rtti; | 71 | int m_rtti; |
72 | QCopChannel* m_channel; | 72 | QCopChannel* m_channel; |
73 | QString m_service; | 73 | QString m_service; |
74 | QCString m_str; | 74 | QCString m_str; |
75 | OPimRecord* m_fallBack; | 75 | OPimRecord* m_fallBack; |
76 | 76 | ||
77 | /* I would love to do this as a template | 77 | /* I would love to do this as a template |
78 | * but can't think of a right way | 78 | * but can't think of a right way |
79 | * because I need signal and slots -zecke | 79 | * because I need signal and slots -zecke |
80 | */ | 80 | */ |
81 | /* | 81 | /* |
82 | * the only pointer in the whole PIM API :( | 82 | * the only pointer in the whole PIM API :( |
83 | */ | 83 | */ |
84 | virtual OPimRecord* record( int rtti, const QByteArray& ) ; | 84 | virtual OPimRecord* record( int rtti, const QByteArray& ) ; |
85 | int service(); | 85 | int service(); |
86 | }; | 86 | }; |
87 | 87 | ||
88 | 88 | ||
89 | #endif | 89 | #endif |