1
.TH "QwtAnalogClock" 3 "24 May 2008" "Version 5.1.1" "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::setHand (\fBHand\fP hand, \fBQwtDialNeedle\fP * needle)\fC [virtual]\fP"
138
\fIhand\fP Specifies the type of hand
145
\fBQwtAnalogClock::hand()\fP
150
Definition at line 104 of file qwt_analog_clock.cpp.
152
References QwtDial::needle().
153
.SS "const \fBQwtDialNeedle\fP * QwtAnalogClock::hand (\fBHand\fP hd) const"
162
\fIhd\fP Specifies the type of hand
167
\fBQwtAnalogClock::setHand\fP
172
Definition at line 131 of file qwt_analog_clock.cpp.
174
Referenced by drawHand().
175
.SS "\fBQwtDialNeedle\fP * QwtAnalogClock::hand (\fBHand\fP hd)"
184
\fIhd\fP Specifies the type of hand
189
\fBQwtAnalogClock::setHand\fP
194
Definition at line 118 of file qwt_analog_clock.cpp.
195
.SS "void QwtAnalogClock::setCurrentTime ()\fC [slot]\fP"
197
Set the current time.
199
This is the same as \fBQwtAnalogClock::setTime()\fP, but Qt < 3.0 can't handle default parameters for slots.
201
Definition at line 142 of file qwt_analog_clock.cpp.
203
References setTime().
204
.SS "void QwtAnalogClock::setTime (const QTime & time = \fCQTime::currentTime()\fP)\fC [slot]\fP"
210
\fItime\fP Time to display
215
Definition at line 151 of file qwt_analog_clock.cpp.
217
References QwtAbstractSlider::setValid(), and QwtAbstractSlider::setValue().
219
Referenced by setCurrentTime().
220
.SS "\fBQwtText\fP QwtAnalogClock::scaleLabel (double value) const\fC [protected, virtual]\fP"
222
Find the scale label for a given value
236
Reimplemented from \fBQwtDial\fP.
238
Definition at line 168 of file qwt_analog_clock.cpp.
239
.SS "void QwtAnalogClock::drawNeedle (QPainter * painter, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP"
243
A clock has no single needle but three hands instead. drawNeedle translates \fBvalue()\fP into directions for the hands and calls \fBdrawHand()\fP.
247
\fIpainter\fP Painter
249
\fIcenter\fP Center of the clock
251
\fIradius\fP Maximum length for the hands
253
\fIdirection\fP Dummy, not used.
260
\fBQwtAnalogClock::drawHand()\fP
265
Reimplemented from \fBQwtDial\fP.
267
Definition at line 191 of file qwt_analog_clock.cpp.
269
References drawHand(), QwtAbstractSlider::isValid(), QwtDial::origin(), and QwtDoubleRange::value().
270
.SS "void QwtAnalogClock::drawHand (QPainter * painter, \fBHand\fP hd, const QPoint & center, int radius, double direction, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP"
276
\fIpainter\fP Painter
278
\fIhd\fP Specify the type of hand
280
\fIcenter\fP Center of the clock
282
\fIradius\fP Maximum length for the hands
284
\fIdirection\fP Direction of the hand in degrees, counter clockwise
291
Definition at line 220 of file qwt_analog_clock.cpp.
293
References QwtDialNeedle::draw(), hand(), and QwtDial::needle().
295
Referenced by drawNeedle().
299
Generated automatically by Doxygen for Qwt User's Guide from the source code.