1
.TH "QwtAnalogClock" 3 "11 Jun 2007" "Version 5.0.2" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtDial\fP.
11
.SH "Detailed Description"
20
#include <qwt_analog_clock.h>
22
QwtAnalogClock *clock = new QwtAnalogClock(...);
23
clock->scaleDraw()->setPenWidth(3);
24
clock->setLineWidth(6);
25
clock->setFrameShadow(QwtDial::Sunken);
28
// update the clock every second
29
QTimer *timer = new QTimer(clock);
30
timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime()));
38
Qwt is missing a set of good looking hands. Contributions are very welcome.
42
The examples/dials example shows how to use \fBQwtAnalogClock\fP.
47
Definition at line 45 of file qwt_analog_clock.h.
52
.RI "enum \fBHand\fP { \fBSecondHand\fP, \fBMinuteHand\fP, \fBHourHand\fP, \fBNHands\fP }"
59
.RI "void \fBsetCurrentTime\fP ()"
62
.RI "void \fBsetTime\fP (const QTime &=QTime::currentTime())"
65
.SS "Public Member Functions"
69
.RI "\fBQwtAnalogClock\fP (QWidget *parent=NULL)"
72
.RI "virtual \fB~QwtAnalogClock\fP ()"
75
.RI "virtual void \fBsetHand\fP (\fBHand\fP, \fBQwtDialNeedle\fP *)"
78
.RI "const \fBQwtDialNeedle\fP * \fBhand\fP (\fBHand\fP) const "
81
.RI "\fBQwtDialNeedle\fP * \fBhand\fP (\fBHand\fP)"
84
.SS "Protected Member Functions"
88
.RI "virtual \fBQwtText\fP \fBscaleLabel\fP (double) const "
91
.RI "virtual void \fBdrawNeedle\fP (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const "
94
.RI "virtual void \fBdrawHand\fP (QPainter *, \fBHand\fP, const QPoint &, int radius, double direction, QPalette::ColorGroup) const "
97
.SH "Member Enumeration Documentation"
99
.SS "enum \fBQwtAnalogClock::Hand\fP"
105
\fBsetHand()\fP, \fBhand()\fP
110
Definition at line 55 of file qwt_analog_clock.h.
111
.SH "Constructor & Destructor Documentation"
113
.SS "QwtAnalogClock::QwtAnalogClock (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
119
\fIparent\fP Parent widget
124
Definition at line 16 of file qwt_analog_clock.cpp.
125
.SS "QwtAnalogClock::~QwtAnalogClock ()\fC [virtual]\fP"
129
Definition at line 82 of file qwt_analog_clock.cpp.
130
.SH "Member Function Documentation"
132
.SS "void QwtAnalogClock::drawHand (QPainter * painter, \fBHand\fP hd, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP"
138
\fIpainter\fP Painter
140
\fIhd\fP Specify the type of hand
142
\fIcenter\fP Center of the clock
144
\fIradius\fP Maximum length for the hands
146
\fIdirection\fP Direction of the hand in degrees, counter clockwise
153
Definition at line 220 of file qwt_analog_clock.cpp.
155
References QwtDialNeedle::draw(), hand(), and QwtDial::needle().
157
Referenced by drawNeedle().
158
.SS "void QwtAnalogClock::drawNeedle (QPainter * painter, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP"
162
A clock has no single needle but three hands instead. drawNeedle translates \fBvalue()\fP into directions for the hands and calls \fBdrawHand()\fP.
166
\fIpainter\fP Painter
168
\fIcenter\fP Center of the clock
170
\fIradius\fP Maximum length for the hands
172
\fIdirection\fP Dummy, not used.
179
\fBQwtAnalogClock::drawHand()\fP
184
Reimplemented from \fBQwtDial\fP.
186
Definition at line 191 of file qwt_analog_clock.cpp.
188
References drawHand(), QwtAbstractSlider::isValid(), QwtDial::origin(), and QwtDoubleRange::value().
189
.SS "\fBQwtDialNeedle\fP * QwtAnalogClock::hand (\fBHand\fP hd)"
198
\fIhd\fP Specifies the type of hand
203
\fBQwtAnalogClock::setHand\fP
208
Definition at line 118 of file qwt_analog_clock.cpp.
209
.SS "const \fBQwtDialNeedle\fP * QwtAnalogClock::hand (\fBHand\fP hd) const"
218
\fIhd\fP Specifies the type of hand
223
\fBQwtAnalogClock::setHand\fP
228
Definition at line 131 of file qwt_analog_clock.cpp.
230
Referenced by drawHand().
231
.SS "\fBQwtText\fP QwtAnalogClock::scaleLabel (double value) const\fC [protected, virtual]\fP"
233
Find the scale label for a given value
247
Reimplemented from \fBQwtDial\fP.
249
Definition at line 168 of file qwt_analog_clock.cpp.
250
.SS "void QwtAnalogClock::setCurrentTime ()\fC [slot]\fP"
252
Set the current time.
254
This is the same as \fBQwtAnalogClock::setTime()\fP, but Qt < 3.0 can't handle default parameters for slots.
256
Definition at line 142 of file qwt_analog_clock.cpp.
258
References setTime().
259
.SS "void QwtAnalogClock::setHand (\fBHand\fP hand, \fBQwtDialNeedle\fP * needle)\fC [virtual]\fP"
265
\fIhand\fP Specifies the type of hand
272
\fBQwtAnalogClock::hand()\fP
277
Definition at line 104 of file qwt_analog_clock.cpp.
279
References QwtDial::needle().
280
.SS "void QwtAnalogClock::setTime (const QTime & time = \fCQTime::currentTime()\fP)\fC [slot]\fP"
286
\fItime\fP Time to display
291
Definition at line 151 of file qwt_analog_clock.cpp.
293
References QwtAbstractSlider::setValue().
295
Referenced by setCurrentTime().
299
Generated automatically by Doxygen for Qwt User's Guide from the source code.