.TH "QwtCompass" 3 "Fri Apr 15 2011" "Version 6.0.0" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtCompass \- .PP A Compass Widget. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBQwtDial\fP. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtCompass\fP (QWidget *parent=NULL)" .br .ti -1c .RI "virtual \fB~QwtCompass\fP ()" .br .ti -1c .RI "void \fBsetRose\fP (\fBQwtCompassRose\fP *rose)" .br .ti -1c .RI "const \fBQwtCompassRose\fP * \fBrose\fP () const " .br .ti -1c .RI "\fBQwtCompassRose\fP * \fBrose\fP ()" .br .ti -1c .RI "const QMap< double, QString > & \fBlabelMap\fP () const " .br .ti -1c .RI "QMap< double, QString > & \fBlabelMap\fP ()" .br .ti -1c .RI "void \fBsetLabelMap\fP (const QMap< double, QString > &map)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fBQwtText\fP \fBscaleLabel\fP (double value) const " .br .ti -1c .RI "virtual void \fBdrawRose\fP (QPainter *, const QPointF ¢er, double radius, double north, QPalette::ColorGroup) const " .br .ti -1c .RI "virtual void \fBdrawScaleContents\fP (QPainter *, const QPointF ¢er, double radius) const " .br .ti -1c .RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *)" .br .in -1c .SH "Detailed Description" .PP A Compass Widget. \fBQwtCompass\fP is a widget to display and enter directions. It consists of a scale, an optional needle and rose. .PP .PP \fBNote:\fP .RS 4 The examples/dials example shows how to use \fBQwtCompass\fP. .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "QwtCompass::QwtCompass (QWidget *parent = \fCNULL\fP)\fC [explicit]\fP" .PP Constructor. \fBParameters:\fP .RS 4 \fIparent\fP Parent widget .RE .PP 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 \fBQwtDial::RotateNeedle\fP. .SS "QwtCompass::~QwtCompass ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "void QwtCompass::drawRose (QPainter *painter, const QPointF ¢er, doubleradius, doublenorth, QPalette::ColorGroupcg) const\fC [protected, virtual]\fP"Draw the compass rose .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter .br \fIcenter\fP Center of the compass .br \fIradius\fP of the circle, where to paint the rose .br \fInorth\fP Direction pointing north, in degrees counter clockwise .br \fIcg\fP Color group .RE .PP .SS "void QwtCompass::drawScaleContents (QPainter *painter, const QPointF ¢er, doubleradius) const\fC [protected, virtual]\fP"Draw the contents of the scale .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter .br \fIcenter\fP Center of the content circle .br \fIradius\fP Radius of the content circle .RE .PP .PP Reimplemented from \fBQwtDial\fP. .SS "void QwtCompass::keyPressEvent (QKeyEvent *kev)\fC [protected, virtual]\fP"Handles key events .PP 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. .PP \fBSee also:\fP .RS 4 \fBisReadOnly()\fP .RE .PP .PP Reimplemented from \fBQwtDial\fP. .SS "QMap< double, QString > & QwtCompass::labelMap ()"\fBReturns:\fP .RS 4 map, mapping values to labels .RE .PP \fBSee also:\fP .RS 4 \fBsetLabelMap()\fP .RE .PP .SS "const QMap< double, QString > & QwtCompass::labelMap () const"\fBReturns:\fP .RS 4 map, mapping values to labels .RE .PP \fBSee also:\fP .RS 4 \fBsetLabelMap()\fP .RE .PP .SS "const \fBQwtCompassRose\fP * QwtCompass::rose () const"\fBReturns:\fP .RS 4 rose .RE .PP \fBSee also:\fP .RS 4 \fBsetRose()\fP .RE .PP .SS "\fBQwtCompassRose\fP * QwtCompass::rose ()"\fBReturns:\fP .RS 4 rose .RE .PP \fBSee also:\fP .RS 4 \fBsetRose()\fP .RE .PP .SS "\fBQwtText\fP QwtCompass::scaleLabel (doublevalue) const\fC [protected, virtual]\fP"Map a value to a corresponding label .PP \fBParameters:\fP .RS 4 \fIvalue\fP Value that will be mapped .RE .PP \fBReturns:\fP .RS 4 Label, or QString::null .RE .PP label() looks in a map for a corresponding label for value or return an null text. .PP \fBSee also:\fP .RS 4 \fBlabelMap()\fP, \fBsetLabelMap()\fP .RE .PP .PP Reimplemented from \fBQwtDial\fP. .SS "void QwtCompass::setLabelMap (const QMap< double, QString > &map)" .PP Set a map, mapping values to labels. \fBParameters:\fP .RS 4 \fImap\fP value to label map .RE .PP 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. .PP \fBWarning:\fP .RS 4 The map will have no effect for values that are no major tick values. Major ticks can be changed by QwtScaleDraw::setScale .RE .PP \fBSee also:\fP .RS 4 \fBlabelMap()\fP, \fBscaleDraw()\fP, \fBsetScale()\fP .RE .PP .SS "void QwtCompass::setRose (\fBQwtCompassRose\fP *rose)"Set a rose for the compass .PP \fBParameters:\fP .RS 4 \fIrose\fP Compass rose .RE .PP \fBWarning:\fP .RS 4 The rose will be deleted, when a different rose is set or in ~QwtCompass .RE .PP \fBSee also:\fP .RS 4 \fBrose()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.