Classes | Public Member Functions | Protected Member Functions | Private Attributes
QwtCompass Class Reference

A Compass Widget. More...

#include <qwt_compass.h>

Inheritance diagram for QwtCompass:
Inheritance graph
[legend]

List of all members.

Classes

class  PrivateData

Public Member Functions

 QwtCompass (QWidget *parent=NULL)
 Constructor.
const QwtCompassRoserose () const
QwtCompassRoserose ()
void setRose (QwtCompassRose *rose)
virtual ~QwtCompass ()
 Destructor.

Protected Member Functions

virtual void drawRose (QPainter *, const QPointF &center, double radius, double north, QPalette::ColorGroup) const
virtual void drawScaleContents (QPainter *, const QPointF &center, double radius) const
virtual void keyPressEvent (QKeyEvent *)

Private Attributes

PrivateDatad_data

Detailed Description

A Compass Widget.

QwtCompass is a widget to display and enter directions. It consists of a scale, an optional needle and rose.

dials1.png
Note:
The examples/dials example shows how to use QwtCompass.

Definition at line 57 of file qwt_compass.h.


Constructor & Destructor Documentation

QwtCompass::QwtCompass ( QWidget *  parent = NULL) [explicit]

Constructor.

Parameters:
parentParent widget

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.

Definition at line 141 of file qwt_compass.cpp.

QwtCompass::~QwtCompass ( ) [virtual]

Destructor.

Definition at line 159 of file qwt_compass.cpp.


Member Function Documentation

void QwtCompass::drawRose ( QPainter *  painter,
const QPointF &  center,
double  radius,
double  north,
QPalette::ColorGroup  cg 
) const [protected, virtual]

Draw the compass rose

Parameters:
painterPainter
centerCenter of the compass
radiusof the circle, where to paint the rose
northDirection pointing north, in degrees counter clockwise
cgColor group

Definition at line 201 of file qwt_compass.cpp.

void QwtCompass::drawScaleContents ( QPainter *  painter,
const QPointF &  center,
double  radius 
) const [protected, virtual]

Draw the contents of the scale

Parameters:
painterPainter
centerCenter of the content circle
radiusRadius of the content circle

Reimplemented from QwtDial.

Definition at line 172 of file qwt_compass.cpp.

void QwtCompass::keyPressEvent ( QKeyEvent *  kev) [protected, virtual]

Handles key events

Beside the keys described in QwtDial::keyPressEvent numbers from 1-9 (without 5) set the direction according to their position on the num pad.

See also:
isReadOnly()

Reimplemented from QwtAbstractSlider.

Definition at line 254 of file qwt_compass.cpp.

const QwtCompassRose * QwtCompass::rose ( ) const
Returns:
rose
See also:
setRose()

Definition at line 231 of file qwt_compass.cpp.

Returns:
rose
See also:
setRose()

Definition at line 240 of file qwt_compass.cpp.

Set a rose for the compass

Parameters:
roseCompass rose
Warning:
The rose will be deleted, when a different rose is set or in ~QwtCompass
See also:
rose()

Definition at line 215 of file qwt_compass.cpp.


Member Data Documentation

Reimplemented from QwtDial.

Definition at line 79 of file qwt_compass.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:57