summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonimpl.h
Unidiff
Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h
index cbdba47..9b7de94 100644
--- a/kalarmd/simplealarmdaemonimpl.h
+++ b/kalarmd/simplealarmdaemonimpl.h
@@ -23,96 +23,97 @@
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
31class QLabel; 31class QLabel;
32class QTimer; 32class QTimer;
33class QPopupMenu; 33class QPopupMenu;
34class AlarmDialog; 34class AlarmDialog;
35class SimpleAlarmDaemonImpl : public QLabel 35class 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 confTimer( int ); 60 void confTimer( int );
61 void saveSlot( int ); 61 void saveSlot( int );
62 void confSuspend( int ); 62 void confSuspend( int );
63 void confSound( int num ); 63 void confSound( int num );
64 void startAlarm(QString mess, QString fn ); 64 void startAlarm(QString mess, QString fn );
65 65
66 protected: 66 protected:
67 void mousePressEvent( QMouseEvent * ); 67 void mousePressEvent( QMouseEvent * );
68 68
69 private: 69 private:
70 AlarmDialog *mAlarmDialog; 70 AlarmDialog *mAlarmDialog;
71 QLabel * mTimerStartLabel;
71 int mPlayBeeps; 72 int mPlayBeeps;
72 int mPausePlay; 73 int mPausePlay;
73 int mSuspend; 74 int mSuspend;
74 QString mAlarmMessage; 75 QString mAlarmMessage;
75 int mTimerTime; 76 int mTimerTime;
76 int getFileNameLen( QString ); 77 int getFileNameLen( QString );
77 QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp; 78 QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp;
78 QDateTime mRunningTimer; 79 QDateTime mRunningTimer;
79 void fillTimerPopUp(); 80 void fillTimerPopUp();
80 QString timerMesssage; 81 QString timerMesssage;
81 QString mCustomText; 82 QString mCustomText;
82 QString mRunningTimerText; 83 QString mRunningTimerText;
83 int mCustomMinutes; 84 int mCustomMinutes;
84 int mTimerPopupConf; 85 int mTimerPopupConf;
85 bool wavAlarm; 86 bool wavAlarm;
86}; 87};
87class KODateLabel : public QLabel 88class KODateLabel : public QLabel
88{ 89{
89 Q_OBJECT 90 Q_OBJECT
90 public: 91 public:
91 KODateLabel( QWidget *parent=0, const char *name=0 ) : 92 KODateLabel( QWidget *parent=0, const char *name=0 ) :
92 QLabel( parent, name ) 93 QLabel( parent, name )
93 { 94 {
94 hour = 0; 95 hour = 0;
95 minutes = 0; 96 minutes = 0;
96 QTimer * ti = new QTimer( this ); 97 QTimer * ti = new QTimer( this );
97 connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() )); 98 connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() ));
98 ti->start( 1000 ); 99 ti->start( 1000 );
99 100
100 } 101 }
101public slots: 102public slots:
102 void slot_minutes( int m ) 103 void slot_minutes( int m )
103 { 104 {
104 minutes = m; updateText(); 105 minutes = m; updateText();
105 } 106 }
106 void slot_hours( int h ) 107 void slot_hours( int h )
107 { 108 {
108 hour = h; updateText(); 109 hour = h; updateText();
109 } 110 }
110private slots: 111private slots:
111 void updateText() 112 void updateText()
112 { 113 {
113 QDateTime dt = QDateTime::currentDateTime(); 114 QDateTime dt = QDateTime::currentDateTime();
114 dt = dt.addSecs( minutes * 60 + hour * 3600 ); 115 dt = dt.addSecs( minutes * 60 + hour * 3600 );
115 setText( dt.time().toString() ); 116 setText( dt.time().toString() );
116 } 117 }
117 int hour, minutes; 118 int hour, minutes;
118}; 119};