summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonimpl.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kalarmd/simplealarmdaemonimpl.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h
index 06ef91b..ac65797 100644
--- a/kalarmd/simplealarmdaemonimpl.h
+++ b/kalarmd/simplealarmdaemonimpl.h
@@ -1,122 +1,121 @@
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
31class QLabel; 31class QLabel;
32class QTimer; 32class QTimer;
33class QPopupMenu;
34class AlarmDialog; 33class AlarmDialog;
35class SimpleAlarmDaemonImpl : public QLabel 34class SimpleAlarmDaemonImpl : public QLabel
36{ 35{
37 Q_OBJECT 36 Q_OBJECT
38 public: 37 public:
39 SimpleAlarmDaemonImpl( QWidget *parent = 0 ); 38 SimpleAlarmDaemonImpl( QWidget *parent = 0 );
40 39
41 ~SimpleAlarmDaemonImpl(); 40 ~SimpleAlarmDaemonImpl();
42 41
43 protected slots: 42 protected slots:
44 void recieve( const QCString& msg, const QByteArray& data ); 43 void recieve( const QCString& msg, const QByteArray& data );
45 void newTodo(); 44 void newTodo();
46 void newEvent(); 45 void newEvent();
47 void newCountdown(); 46 void newCountdown();
48 void simulate(); 47 void simulate();
49 void showKO(); 48 void showKO();
50 void showWN(); 49 void showWN();
51 void showAdd(); 50 void showAdd();
52 void newMail(); 51 void newMail();
53 void ringSync(); 52 void ringSync();
54 void showTodo(); 53 void showTodo();
55 void writeFile(); 54 void writeFile();
56 void writeJournal(); 55 void writeJournal();
57 void slotPlayBeep( int ); 56 void slotPlayBeep( int );
58 void showTimer( ); 57 void showTimer( );
59 void confPause( int ); 58 void confPause( int );
60 void confFontSize( int ); 59 void confFontSize( int );
61 void confTimer( int ); 60 void confTimer( int );
62 void saveSlot( int ); 61 void saveSlot( int );
63 void confSuspend( int ); 62 void confSuspend( int );
64 void confSound( int num ); 63 void confSound( int num );
65 void startAlarm(QString mess, QString fn ); 64 void startAlarm(QString mess, QString fn );
66 65
67 protected: 66 protected:
68 void mousePressEvent( QMouseEvent * ); 67 void mousePressEvent( QMouseEvent * );
69 68
70 private: 69 private:
71 AlarmDialog *mAlarmDialog; 70 AlarmDialog *mAlarmDialog;
72 QLabel * mTimerStartLabel; 71 QLabel * mTimerStartLabel;
73 int mPlayBeeps; 72 int mPlayBeeps;
74 int mPausePlay; 73 int mPausePlay;
75 int mSuspend; 74 int mSuspend;
76 QString mAlarmMessage; 75 QString mAlarmMessage;
77 int mTimerTime; 76 int mTimerTime;
78 int getFileNameLen( QString ); 77 int getFileNameLen( QString );
79 QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; 78 Q3PopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup;
80 QDateTime mRunningTimer; 79 QDateTime mRunningTimer;
81 void fillTimerPopUp(); 80 void fillTimerPopUp();
82 QString timerMesssage; 81 QString timerMesssage;
83 QString mCustomText; 82 QString mCustomText;
84 QString mRunningTimerText; 83 QString mRunningTimerText;
85 int mCustomMinutes; 84 int mCustomMinutes;
86 int mTimerPopupConf; 85 int mTimerPopupConf;
87 int mPopupFontSize; 86 int mPopupFontSize;
88 bool wavAlarm; 87 bool wavAlarm;
89}; 88};
90class KODateLabel : public QLabel 89class KODateLabel : public QLabel
91{ 90{
92 Q_OBJECT 91 Q_OBJECT
93 public: 92 public:
94 KODateLabel( QWidget *parent=0, const char *name=0 ) : 93 KODateLabel( QWidget *parent=0, const char *name=0 ) :
95 QLabel( parent, name ) 94 QLabel( parent, name )
96 { 95 {
97 hour = 0; 96 hour = 0;
98 minutes = 0; 97 minutes = 0;
99 QTimer * ti = new QTimer( this ); 98 QTimer * ti = new QTimer( this );
100 connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() )); 99 connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() ));
101 ti->start( 1000 ); 100 ti->start( 1000 );
102 101
103 } 102 }
104public slots: 103public slots:
105 void slot_minutes( int m ) 104 void slot_minutes( int m )
106 { 105 {
107 minutes = m; updateText(); 106 minutes = m; updateText();
108 } 107 }
109 void slot_hours( int h ) 108 void slot_hours( int h )
110 { 109 {
111 hour = h; updateText(); 110 hour = h; updateText();
112 } 111 }
113private slots: 112private slots:
114 void updateText() 113 void updateText()
115 { 114 {
116 QDateTime dt = QDateTime::currentDateTime(); 115 QDateTime dt = QDateTime::currentDateTime();
117 dt = dt.addSecs( minutes * 60 + hour * 3600 ); 116 dt = dt.addSecs( minutes * 60 + hour * 3600 );
118 setText( dt.time().toString() ); 117 setText( dt.time().toString() );
119 } 118 }
120 int hour, minutes; 119 int hour, minutes;
121}; 120};
122#endif 121#endif