summaryrefslogtreecommitdiff
path: root/noncore/tools/clock/clock.h
Unidiff
Diffstat (limited to 'noncore/tools/clock/clock.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/clock.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h
index 23cc143..9b00e28 100644
--- a/noncore/tools/clock/clock.h
+++ b/noncore/tools/clock/clock.h
@@ -43,18 +43,20 @@ public:
43 void display( const QTime& time ); 43 void display( const QTime& time );
44 44
45protected: 45protected:
46 void drawContents( QPainter *p ); 46 void drawContents( QPainter *p );
47 47
48private: 48private:
49 QPoint rotate( QPoint center, QPoint p, int angle );
50 void drawPointers ( QPainter *, const QRect &r, const QColor &c, const QTime &t, const QTime *t2 = 0 );
51 49
52 QTime currTime; 50 QTime currTime;
53 QTime prevTime; 51 QTime prevTime;
54 bool clear; 52 bool clear;
53
54 QPoint rotate( QPoint center, QPoint p, int angle );
55 void drawPointers ( QPainter *, const QRect &r, const QColor &c, const QTime &t, const QTime *t2 = 0 );
56
55}; 57};
56 58
57class Clock : public QVBox 59class Clock : public QVBox
58{ 60{
59 Q_OBJECT 61 Q_OBJECT
60 62
@@ -75,25 +77,30 @@ private slots:
75 void slotToggleAlarm(); 77 void slotToggleAlarm();
76 void alarmOn(); 78 void alarmOn();
77 void alarmOff(); 79 void alarmOff();
78 void appMessage(const QCString& msg, const QByteArray& data); 80 void appMessage(const QCString& msg, const QByteArray& data);
79 void timerEvent( QTimerEvent *e ); 81 void timerEvent( QTimerEvent *e );
80 void slotAdjustTime(); 82 void slotAdjustTime();
83
84 void slotStartTimer();
85 void slotStopTimer();
86 void slotResetTimer();
87 void setSwatchMode( int );
81private: 88private:
82 void clearClock();
83 void clearTimer();
84 bool alarmBool; 89 bool alarmBool;
85 QTimer *t; 90 QTimer *t;
86 QLCDNumber *lcd; 91 QLCDNumber *lcd;
87 QLabel *date; 92 QLabel *date;
88 QLabel *ampmLabel; 93 QLabel *ampmLabel;
89 QPushButton *set, *reset, *alarmBtn, *snoozeBtn, *alarmOffBtn; 94 QPushButton *set, *reset, *alarmBtn, *snoozeBtn, *alarmOffBtn;
90 QRadioButton *clockRB, *swatchRB; 95 QRadioButton *clockRB, *swatchRB;
91 AnalogClock *aclock; 96 AnalogClock *aclock;
92 QTime swatch_start; 97 QTime swatch_start;
93 int swatch_totalms; 98 int swatch_totalms;
94 bool swatch_running; 99 bool swatch_running;
95 bool ampm; 100 bool ampm;
101 void clearClock();
102 void clearTimer();
96}; 103};
97 104
98#endif 105#endif
99 106