1
.TH "QwtCompass" 3 "24 May 2008" "Version 5.1.1" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtDial\fP.
11
.SH "Detailed Description"
15
\fBQwtCompass\fP is a widget to display and enter directions. It consists of a scale, an optional needle and rose.
20
The examples/dials example shows how to use \fBQwtCompass\fP.
25
Definition at line 48 of file qwt_compass.h.
26
.SS "Public Member Functions"
30
.RI "\fBQwtCompass\fP (QWidget *parent=NULL)"
33
.RI "virtual \fB~QwtCompass\fP ()"
36
.RI "void \fBsetRose\fP (\fBQwtCompassRose\fP *rose)"
39
.RI "const \fBQwtCompassRose\fP * \fBrose\fP () const"
42
.RI "\fBQwtCompassRose\fP * \fBrose\fP ()"
45
.RI "const QMap< double, QString > & \fBlabelMap\fP () const"
48
.RI "QMap< double, QString > & \fBlabelMap\fP ()"
51
.RI "void \fBsetLabelMap\fP (const QMap< double, QString > &map)"
54
.SS "Protected Member Functions"
58
.RI "virtual \fBQwtText\fP \fBscaleLabel\fP (double value) const "
61
.RI "virtual void \fBdrawRose\fP (QPainter *, const QPoint ¢er, int radius, double north, QPalette::ColorGroup) const"
64
.RI "virtual void \fBdrawScaleContents\fP (QPainter *, const QPoint ¢er, int radius) const "
67
.RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *)"
70
.SH "Constructor & Destructor Documentation"
72
.SS "QwtCompass::QwtCompass (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
78
\fIparent\fP Parent widget
81
Create a compass widget with a scale, no needle and no rose. The default origin is 270.0 with no valid value. It accepts mouse and keyboard inputs and has no step size. The default mode is QwtDial::RotateNeedle.
83
Definition at line 50 of file qwt_compass.cpp.
84
.SS "QwtCompass::~QwtCompass ()\fC [virtual]\fP"
88
Definition at line 77 of file qwt_compass.cpp.
89
.SH "Member Function Documentation"
91
.SS "void QwtCompass::setRose (\fBQwtCompassRose\fP * rose)"
93
Set a rose for the compass
97
\fIrose\fP Compass rose
102
The rose will be deleted, when a different rose is set or in ~QwtCompass
112
Definition at line 157 of file qwt_compass.cpp.
115
.SS "const \fBQwtCompassRose\fP * QwtCompass::rose () const"
129
Definition at line 173 of file qwt_compass.cpp.
131
Referenced by setRose().
132
.SS "\fBQwtCompassRose\fP * QwtCompass::rose ()"
146
Definition at line 182 of file qwt_compass.cpp.
147
.SS "const QMap< double, QString > & QwtCompass::labelMap () const"
151
map, mapping values to labels
161
Definition at line 256 of file qwt_compass.cpp.
162
.SS "QMap< double, QString > & QwtCompass::labelMap ()"
166
map, mapping values to labels
176
Definition at line 265 of file qwt_compass.cpp.
177
.SS "void QwtCompass::setLabelMap (const QMap< double, QString > & map)"
179
Set a map, mapping values to labels.
183
\fImap\fP value to label map
186
The values of the major ticks are found by looking into this map. The default map consists of the labels N, NE, E, SE, S, SW, W, NW.
190
The map will have no effect for values that are no major tick values. Major ticks can be changed by QwtScaleDraw::setScale
195
\fBlabelMap()\fP, \fBscaleDraw()\fP, \fBsetScale()\fP
200
Definition at line 282 of file qwt_compass.cpp.
201
.SS "\fBQwtText\fP QwtCompass::scaleLabel (double value) const\fC [protected, virtual]\fP"
203
Map a value to a corresponding label
207
\fIvalue\fP Value that will be mapped
212
Label, or QString::null
215
label() looks in a map for a corresponding label for value or return an null text.
219
\fBlabelMap()\fP, \fBsetLabelMap()\fP
224
Reimplemented from \fBQwtDial\fP.
226
Definition at line 297 of file qwt_compass.cpp.
227
.SS "void QwtCompass::drawRose (QPainter * painter, const QPoint & center, int radius, double north, QPalette::ColorGroup cg) const\fC [protected, virtual]\fP"
229
Draw the compass rose
233
\fIpainter\fP Painter
235
\fIcenter\fP Center of the compass
237
\fIradius\fP of the circle, where to paint the rose
239
\fInorth\fP Direction pointing north, in degrees counter clockwise
246
Definition at line 143 of file qwt_compass.cpp.
248
Referenced by drawScaleContents().
249
.SS "void QwtCompass::drawScaleContents (QPainter *, const QPoint & center, int radius) const\fC [protected, virtual]\fP"
251
Draw the contents of the scale.
253
Reimplemented from \fBQwtDial\fP.
255
Definition at line 114 of file qwt_compass.cpp.
257
References drawRose(), QwtAbstractSlider::isValid(), QwtDial::mode(), QwtDial::origin(), and QwtDoubleRange::value().
258
.SS "void QwtCompass::keyPressEvent (QKeyEvent * kev)\fC [protected, virtual]\fP"
262
Beside the keys described in \fBQwtDial::keyPressEvent\fP numbers from 1-9 (without 5) set the direction according to their position on the num pad.
271
Reimplemented from \fBQwtDial\fP.
273
Definition at line 196 of file qwt_compass.cpp.
275
References QwtAbstractSlider::isReadOnly(), QwtDial::keyPressEvent(), QwtDial::mode(), QwtDial::origin(), QwtAbstractSlider::setValue(), and QwtDoubleRange::value().
279
Generated automatically by Doxygen for Qwt User's Guide from the source code.