-rw-r--r-- | noncore/tools/clock/clock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h index 024dd28..e5ed13c 100644 --- a/noncore/tools/clock/clock.h +++ b/noncore/tools/clock/clock.h | |||
@@ -1,99 +1,99 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef CLOCK_H | 20 | #ifndef CLOCK_H |
21 | #define CLOCK_H | 21 | #define CLOCK_H |
22 | 22 | ||
23 | #include <qdatetime.h> | 23 | #include <qdatetime.h> |
24 | #include <qvbox.h> | 24 | #include <qvbox.h> |
25 | 25 | ||
26 | class QLCDNumber; | 26 | class QLCDNumber; |
27 | class QLabel; | 27 | class QLabel; |
28 | class QTimer; | 28 | class QTimer; |
29 | class QRadioButton; | 29 | class QRadioButton; |
30 | class QPushButton; | 30 | class QPushButton; |
31 | class QDateTime; | 31 | class QDateTime; |
32 | 32 | ||
33 | class AnalogClock : public QFrame | 33 | class AnalogClock : public QFrame |
34 | { | 34 | { |
35 | Q_OBJECT | 35 | Q_OBJECT |
36 | 36 | ||
37 | public: | 37 | public: |
38 | AnalogClock( QWidget * parent = 0, const char * name = 0 ) | 38 | AnalogClock( QWidget * parent = 0, const char * name = 0 ) |
39 | : QFrame( parent, name ), clear(false) {} | 39 | : QFrame( parent, name ), clear(false) {} |
40 | 40 | ||
41 | QSizePolicy sizePolicy() const; | 41 | QSizePolicy sizePolicy() const; |
42 | 42 | ||
43 | void display( const QTime& time ); | 43 | void display( const QTime& time ); |
44 | 44 | ||
45 | protected: | 45 | protected: |
46 | void drawContents( QPainter *p ); | 46 | void drawContents( QPainter *p ); |
47 | 47 | ||
48 | private: | 48 | private: |
49 | QPoint rotate( QPoint center, QPoint p, int angle ); | 49 | QPoint rotate( QPoint center, QPoint p, int angle ); |
50 | 50 | ||
51 | QTime currTime; | 51 | QTime currTime; |
52 | QTime prevTime; | 52 | QTime prevTime; |
53 | bool clear; | 53 | bool clear; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | class Clock : public QVBox | 56 | class Clock : public QVBox |
57 | { | 57 | { |
58 | Q_OBJECT | 58 | Q_OBJECT |
59 | 59 | ||
60 | public: | 60 | public: |
61 | Clock( QWidget * parent = 0, const char * name = 0, WFlags f=0 ); | 61 | Clock( QWidget * parent = 0, const char * name = 0, WFlags f=0 ); |
62 | ~Clock(); | 62 | ~Clock(); |
63 | QDateTime when; | 63 | QDateTime when; |
64 | bool bSound; | 64 | bool bSound; |
65 | int hour, minute, snoozeTime; | 65 | int hour, minute, snoozeTime; |
66 | private slots: | 66 | private slots: |
67 | void slotSet(); | 67 | void slotSet(); |
68 | void slotReset(); | 68 | void slotReset(); |
69 | void modeSelect(int); | 69 | void modeSelect(int); |
70 | void updateClock(); | 70 | void updateClock(); |
71 | void changeClock( bool ); | 71 | void changeClock( bool ); |
72 | void slotSetAlarm(); | 72 | void slotSetAlarm(); |
73 | void slotSnooze(); | 73 | void slotSnooze(); |
74 | void slotToggleAlarm(); | 74 | void slotToggleAlarm(); |
75 | void alarmOn(); | 75 | void alarmOn(); |
76 | void alarmOff(); | 76 | void alarmOff(); |
77 | void appMessage(const QCString& msg, const QByteArray& data); | 77 | void appMessage(const QCString& msg, const QByteArray& data); |
78 | void timerEvent( QTimerEvent *e ); | 78 | void timerEvent( QTimerEvent *e ); |
79 | void slotAdjustTime(); | 79 | // void slotAdjustTime(); |
80 | 80 | ||
81 | private: | 81 | private: |
82 | void clearClock(); | 82 | void clearClock(); |
83 | 83 | ||
84 | bool alarmBool; | 84 | bool alarmBool; |
85 | QTimer *t; | 85 | QTimer *t; |
86 | QLCDNumber *lcd; | 86 | QLCDNumber *lcd; |
87 | QLabel *date; | 87 | QLabel *date; |
88 | QLabel *ampmLabel; | 88 | QLabel *ampmLabel; |
89 | QPushButton *set, *reset, *alarmBtn, *snoozeBtn, *alarmOffBtn; | 89 | QPushButton *set, *reset, *alarmBtn, *snoozeBtn, *alarmOffBtn; |
90 | QRadioButton *clockRB, *swatchRB; | 90 | QRadioButton *clockRB, *swatchRB; |
91 | AnalogClock *aclock; | 91 | AnalogClock *aclock; |
92 | QTime swatch_start; | 92 | QTime swatch_start; |
93 | int swatch_totalms; | 93 | int swatch_totalms; |
94 | bool swatch_running; | 94 | bool swatch_running; |
95 | bool ampm; | 95 | bool ampm; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | #endif | 98 | #endif |
99 | 99 | ||