Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 9b7de94..06ef91b 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h | |||
@@ -1,120 +1,122 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the KOrganizer alarm daemon. | 2 | This file is part of the KOrganizer alarm daemon. |
3 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef SIMPLEALARMDAEMONIMPL_H | 23 | #ifndef SIMPLEALARMDAEMONIMPL_H |
24 | #define SIMPLEALARMDAEMONIMPL_H | 24 | #define SIMPLEALARMDAEMONIMPL_H |
25 | 25 | ||
26 | //#include "simplealarmdaemon.h" | 26 | //#include "simplealarmdaemon.h" |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qtimer.h> | 29 | #include <qtimer.h> |
30 | 30 | ||
31 | class QLabel; | 31 | class QLabel; |
32 | class QTimer; | 32 | class QTimer; |
33 | class QPopupMenu; | 33 | class QPopupMenu; |
34 | class AlarmDialog; | 34 | class AlarmDialog; |
35 | class SimpleAlarmDaemonImpl : public QLabel | 35 | class SimpleAlarmDaemonImpl : public QLabel |
36 | { | 36 | { |
37 | Q_OBJECT | 37 | Q_OBJECT |
38 | public: | 38 | public: |
39 | SimpleAlarmDaemonImpl( QWidget *parent = 0 ); | 39 | SimpleAlarmDaemonImpl( QWidget *parent = 0 ); |
40 | 40 | ||
41 | ~SimpleAlarmDaemonImpl(); | 41 | ~SimpleAlarmDaemonImpl(); |
42 | 42 | ||
43 | protected slots: | 43 | protected slots: |
44 | void recieve( const QCString& msg, const QByteArray& data ); | 44 | void recieve( const QCString& msg, const QByteArray& data ); |
45 | void newTodo(); | 45 | void newTodo(); |
46 | void newEvent(); | 46 | void newEvent(); |
47 | void newCountdown(); | 47 | void newCountdown(); |
48 | void simulate(); | 48 | void simulate(); |
49 | void showKO(); | 49 | void showKO(); |
50 | void showWN(); | 50 | void showWN(); |
51 | void showAdd(); | 51 | void showAdd(); |
52 | void newMail(); | 52 | void newMail(); |
53 | void ringSync(); | 53 | void ringSync(); |
54 | void showTodo(); | 54 | void showTodo(); |
55 | void writeFile(); | 55 | void writeFile(); |
56 | void writeJournal(); | 56 | void writeJournal(); |
57 | void slotPlayBeep( int ); | 57 | void slotPlayBeep( int ); |
58 | void showTimer( ); | 58 | void showTimer( ); |
59 | void confPause( int ); | 59 | void confPause( int ); |
60 | void confFontSize( int ); | ||
60 | void confTimer( int ); | 61 | void confTimer( int ); |
61 | void saveSlot( int ); | 62 | void saveSlot( int ); |
62 | void confSuspend( int ); | 63 | void confSuspend( int ); |
63 | void confSound( int num ); | 64 | void confSound( int num ); |
64 | void startAlarm(QString mess, QString fn ); | 65 | void startAlarm(QString mess, QString fn ); |
65 | 66 | ||
66 | protected: | 67 | protected: |
67 | void mousePressEvent( QMouseEvent * ); | 68 | void mousePressEvent( QMouseEvent * ); |
68 | 69 | ||
69 | private: | 70 | private: |
70 | AlarmDialog *mAlarmDialog; | 71 | AlarmDialog *mAlarmDialog; |
71 | QLabel * mTimerStartLabel; | 72 | QLabel * mTimerStartLabel; |
72 | int mPlayBeeps; | 73 | int mPlayBeeps; |
73 | int mPausePlay; | 74 | int mPausePlay; |
74 | int mSuspend; | 75 | int mSuspend; |
75 | QString mAlarmMessage; | 76 | QString mAlarmMessage; |
76 | int mTimerTime; | 77 | int mTimerTime; |
77 | int getFileNameLen( QString ); | 78 | int getFileNameLen( QString ); |
78 | QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp; | 79 | QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; |
79 | QDateTime mRunningTimer; | 80 | QDateTime mRunningTimer; |
80 | void fillTimerPopUp(); | 81 | void fillTimerPopUp(); |
81 | QString timerMesssage; | 82 | QString timerMesssage; |
82 | QString mCustomText; | 83 | QString mCustomText; |
83 | QString mRunningTimerText; | 84 | QString mRunningTimerText; |
84 | int mCustomMinutes; | 85 | int mCustomMinutes; |
85 | int mTimerPopupConf; | 86 | int mTimerPopupConf; |
87 | int mPopupFontSize; | ||
86 | bool wavAlarm; | 88 | bool wavAlarm; |
87 | }; | 89 | }; |
88 | class KODateLabel : public QLabel | 90 | class KODateLabel : public QLabel |
89 | { | 91 | { |
90 | Q_OBJECT | 92 | Q_OBJECT |
91 | public: | 93 | public: |
92 | KODateLabel( QWidget *parent=0, const char *name=0 ) : | 94 | KODateLabel( QWidget *parent=0, const char *name=0 ) : |
93 | QLabel( parent, name ) | 95 | QLabel( parent, name ) |
94 | { | 96 | { |
95 | hour = 0; | 97 | hour = 0; |
96 | minutes = 0; | 98 | minutes = 0; |
97 | QTimer * ti = new QTimer( this ); | 99 | QTimer * ti = new QTimer( this ); |
98 | connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() )); | 100 | connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() )); |
99 | ti->start( 1000 ); | 101 | ti->start( 1000 ); |
100 | 102 | ||
101 | } | 103 | } |
102 | public slots: | 104 | public slots: |
103 | void slot_minutes( int m ) | 105 | void slot_minutes( int m ) |
104 | { | 106 | { |
105 | minutes = m; updateText(); | 107 | minutes = m; updateText(); |
106 | } | 108 | } |
107 | void slot_hours( int h ) | 109 | void slot_hours( int h ) |
108 | { | 110 | { |
109 | hour = h; updateText(); | 111 | hour = h; updateText(); |
110 | } | 112 | } |
111 | private slots: | 113 | private slots: |
112 | void updateText() | 114 | void updateText() |
113 | { | 115 | { |
114 | QDateTime dt = QDateTime::currentDateTime(); | 116 | QDateTime dt = QDateTime::currentDateTime(); |
115 | dt = dt.addSecs( minutes * 60 + hour * 3600 ); | 117 | dt = dt.addSecs( minutes * 60 + hour * 3600 ); |
116 | setText( dt.time().toString() ); | 118 | setText( dt.time().toString() ); |
117 | } | 119 | } |
118 | int hour, minutes; | 120 | int hour, minutes; |
119 | }; | 121 | }; |
120 | #endif | 122 | #endif |