author | zecke <zecke> | 2003-05-12 13:17:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-05-12 13:17:48 (UTC) |
commit | d6e4c1a54185b1aa4443cb79a36acc637acf84ac (patch) (unidiff) | |
tree | bff7f62a0a06cbcd3d1492b37c297e9133dacff4 /libopie/pim/opimmainwindow.h | |
parent | abfe4c66be60075a518d4918d603bb8033bc5ac4 (diff) | |
download | opie-d6e4c1a54185b1aa4443cb79a36acc637acf84ac.zip opie-d6e4c1a54185b1aa4443cb79a36acc637acf84ac.tar.gz opie-d6e4c1a54185b1aa4443cb79a36acc637acf84ac.tar.bz2 |
Add handling of alarm() message
play and killAlarm... added as well
Diffstat (limited to 'libopie/pim/opimmainwindow.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/opimmainwindow.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libopie/pim/opimmainwindow.h b/libopie/pim/opimmainwindow.h index dca3c82..855d364 100644 --- a/libopie/pim/opimmainwindow.h +++ b/libopie/pim/opimmainwindow.h | |||
@@ -11,24 +11,25 @@ | |||
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 QDateTime; | ||
23 | class OPimMainWindow : public QMainWindow { | 24 | class OPimMainWindow : public QMainWindow { |
24 | Q_OBJECT | 25 | Q_OBJECT |
25 | public: | 26 | public: |
26 | enum TransPort { BlueTooth=0, | 27 | enum TransPort { BlueTooth=0, |
27 | IrDa }; | 28 | IrDa }; |
28 | 29 | ||
29 | OPimMainWindow( const QString& service, QWidget *parent = 0, const char* name = 0, | 30 | OPimMainWindow( const QString& service, QWidget *parent = 0, const char* name = 0, |
30 | WFlags f = WType_TopLevel); | 31 | WFlags f = WType_TopLevel); |
31 | virtual ~OPimMainWindow(); | 32 | virtual ~OPimMainWindow(); |
32 | 33 | ||
33 | 34 | ||
34 | protected slots: | 35 | protected slots: |
@@ -47,43 +48,52 @@ protected slots: | |||
47 | virtual bool remove( int uid ) = 0; | 48 | virtual bool remove( int uid ) = 0; |
48 | /** beam the record with UID = uid */ | 49 | /** beam the record with UID = uid */ |
49 | virtual void beam( int uid ) = 0; | 50 | virtual void beam( int uid ) = 0; |
50 | 51 | ||
51 | /** show the record with UID == uid */ | 52 | /** show the record with UID == uid */ |
52 | virtual void show( int uid ) = 0; | 53 | virtual void show( int uid ) = 0; |
53 | /** edit the record */ | 54 | /** edit the record */ |
54 | virtual void edit( int uid ) = 0; | 55 | virtual void edit( int uid ) = 0; |
55 | 56 | ||
56 | /** make a copy of it! */ | 57 | /** make a copy of it! */ |
57 | virtual void add( const OPimRecord& ) = 0; | 58 | virtual void add( const OPimRecord& ) = 0; |
58 | 59 | ||
60 | virtual void doAlarm( const QDateTime&, int uid ); | ||
59 | 61 | ||
60 | QCopChannel* channel(); | 62 | QCopChannel* channel(); |
61 | 63 | ||
64 | protected: | ||
65 | /** | ||
66 | * start to play soundAlarm() | ||
67 | * @param count How many times the alarm is played | ||
68 | */ | ||
69 | void startAlarm(int count = 10); | ||
70 | void killAlarm(); | ||
71 | void timerEvent( QTimerEvent* ); | ||
72 | |||
62 | private slots: | 73 | private slots: |
63 | void appMessage( const QCString&, const QByteArray& ); | 74 | void appMessage( const QCString&, const QByteArray& ); |
64 | void setDocument( const QString& ); | 75 | void setDocument( const QString& ); |
65 | 76 | ||
66 | 77 | ||
67 | private: | 78 | private: |
68 | class Private; | 79 | class Private; |
69 | Private* d; | 80 | Private* d; |
70 | 81 | ||
71 | int m_rtti; | 82 | int m_rtti; |
72 | QCopChannel* m_channel; | 83 | QCopChannel* m_channel; |
73 | QString m_service; | 84 | QString m_service; |
74 | QCString m_str; | 85 | QCString m_str; |
75 | OPimRecord* m_fallBack; | 86 | OPimRecord* m_fallBack; |
76 | 87 | int m_alarmCount; | |
88 | int m_playedCount; | ||
89 | int m_timerId; | ||
77 | /* I would love to do this as a template | 90 | /* I would love to do this as a template |
78 | * but can't think of a right way | 91 | * but can't think of a right way |
79 | * because I need signal and slots -zecke | 92 | * because I need signal and slots -zecke |
80 | */ | 93 | */ |
81 | /* | ||
82 | * the only pointer in the whole PIM API :( | ||
83 | */ | ||
84 | virtual OPimRecord* record( int rtti, const QByteArray& ) ; | 94 | virtual OPimRecord* record( int rtti, const QByteArray& ) ; |
85 | int service(); | 95 | int service(); |
86 | }; | 96 | }; |
87 | 97 | ||
88 | 98 | ||
89 | #endif | 99 | #endif |