Diffstat (limited to 'libopie2/opiepim/ui/opimmainwindow.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libopie2/opiepim/ui/opimmainwindow.h b/libopie2/opiepim/ui/opimmainwindow.h index dca3c82..855d364 100644 --- a/libopie2/opiepim/ui/opimmainwindow.h +++ b/libopie2/opiepim/ui/opimmainwindow.h | |||
@@ -17,12 +17,13 @@ | |||
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 | ||
@@ -53,15 +54,25 @@ protected slots: | |||
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: |
@@ -70,20 +81,19 @@ private: | |||
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 |