-rw-r--r-- | noncore/tools/clock/clock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h index fa12b61..00d097d 100644 --- a/noncore/tools/clock/clock.h +++ b/noncore/tools/clock/clock.h | |||
@@ -21,73 +21,76 @@ | |||
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 | #include <qpixmap.h> | 25 | #include <qpixmap.h> |
26 | 26 | ||
27 | class QLCDNumber; | 27 | class QLCDNumber; |
28 | class QLabel; | 28 | class QLabel; |
29 | class QTimer; | 29 | class QTimer; |
30 | class QRadioButton; | 30 | class QRadioButton; |
31 | class QPushButton; | 31 | class QPushButton; |
32 | class QDateTime; | 32 | class QDateTime; |
33 | 33 | ||
34 | class AnalogClock : public QFrame | 34 | class AnalogClock : public QFrame |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | 37 | ||
38 | public: | 38 | public: |
39 | AnalogClock( QWidget * parent = 0, const char * name = 0 ); | 39 | AnalogClock( QWidget * parent = 0, const char * name = 0 ); |
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 | |||
45 | protected: | 46 | protected: |
46 | void drawContents( QPainter *p ); | 47 | void drawContents( QPainter *p ); |
47 | 48 | ||
48 | private: | 49 | private: |
49 | 50 | ||
50 | QPixmap bg; | 51 | QPixmap bg; |
51 | QTime currTime; | 52 | QTime currTime; |
52 | QTime prevTime; | 53 | QTime prevTime; |
53 | bool clear; | 54 | bool clear; |
54 | 55 | ||
55 | QPoint rotate( QPoint center, QPoint p, int angle ); | 56 | QPoint rotate( QPoint center, QPoint p, int angle ); |
56 | void drawPointers ( QPainter *, const QRect &r, const QColor &c, const QTime &t, const QTime *t2 = 0 ); | 57 | void drawPointers ( QPainter *, const QRect &r, const QColor &c, const QTime &t, const QTime *t2 = 0 ); |
57 | 58 | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | class Clock : public QVBox | 61 | class Clock : public QVBox |
61 | { | 62 | { |
62 | Q_OBJECT | 63 | Q_OBJECT |
63 | 64 | ||
64 | public: | 65 | public: |
65 | Clock( QWidget * parent = 0, const char * name = 0, WFlags f=0 ); | 66 | Clock( QWidget * parent = 0, const char * name = 0, WFlags f=0 ); |
66 | ~Clock(); | 67 | ~Clock(); |
67 | QDateTime when; | 68 | QDateTime when; |
68 | bool bSound; | 69 | bool bSound; |
69 | int hour, minute, snoozeTime; | 70 | int hour, minute, snoozeTime; |
71 | static QString appName() { return QString::fromLatin1("clock"); } | ||
72 | |||
70 | private slots: | 73 | private slots: |
71 | void slotSet(); | 74 | void slotSet(); |
72 | void slotReset(); | 75 | void slotReset(); |
73 | void modeSelect(int); | 76 | void modeSelect(int); |
74 | void updateClock(); | 77 | void updateClock(); |
75 | void changeClock( bool ); | 78 | void changeClock( bool ); |
76 | void slotSetAlarm(); | 79 | void slotSetAlarm(); |
77 | void slotSnooze(); | 80 | void slotSnooze(); |
78 | void slotToggleAlarm(); | 81 | void slotToggleAlarm(); |
79 | void alarmOn(); | 82 | void alarmOn(); |
80 | void alarmOff(); | 83 | void alarmOff(); |
81 | void appMessage(const QCString& msg, const QByteArray& data); | 84 | void appMessage(const QCString& msg, const QByteArray& data); |
82 | void timerEvent( QTimerEvent *e ); | 85 | void timerEvent( QTimerEvent *e ); |
83 | void slotAdjustTime(); | 86 | void slotAdjustTime(); |
84 | 87 | ||
85 | void slotStartTimer(); | 88 | void slotStartTimer(); |
86 | void slotStopTimer(); | 89 | void slotStopTimer(); |
87 | void slotResetTimer(); | 90 | void slotResetTimer(); |
88 | void setSwatchMode( int ); | 91 | void setSwatchMode( int ); |
89 | private: | 92 | private: |
90 | bool alarmBool; | 93 | bool alarmBool; |
91 | QTimer *t; | 94 | QTimer *t; |
92 | QLCDNumber *lcd; | 95 | QLCDNumber *lcd; |
93 | QLabel *date; | 96 | QLabel *date; |