Eneboo - Documentación para desarrolladores
|
#include <qwt_compass.h>
Clases | |
class | PrivateData |
Métodos públicos | |
QwtCompass (QWidget *parent=NULL) | |
Constructor. | |
QwtCompass (QWidget *parent, const char *name) | |
Constructor. | |
virtual | ~QwtCompass () |
Destructor. | |
void | setRose (QwtCompassRose *rose) |
const QwtCompassRose * | rose () const |
QwtCompassRose * | rose () |
const QMap< double, QString > & | labelMap () const |
QMap< double, QString > & | labelMap () |
void | setLabelMap (const QMap< double, QString > &map) |
Set a map, mapping values to labels. | |
Métodos protegidos | |
virtual QwtText | scaleLabel (double value) const |
virtual void | drawRose (QPainter *, const QPoint ¢er, int radius, double north, QPalette::ColorGroup) const |
virtual void | drawScaleContents (QPainter *, const QPoint ¢er, int radius) const |
Draw the contents of the scale. | |
virtual void | keyPressEvent (QKeyEvent *) |
A Compass Widget.
QwtCompass is a widget to display and enter directions. It consists of a scale, an optional needle and rose.
Constructor.
parent | Parent 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.
QwtCompass::QwtCompass | ( | QWidget * | parent, |
const char * | name | ||
) | [explicit] |
Constructor.
parent | Parent widget |
name | Object name |
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.
QwtCompass::~QwtCompass | ( | ) | [virtual] |
Destructor.
void QwtCompass::drawRose | ( | QPainter * | painter, |
const QPoint & | center, | ||
int | radius, | ||
double | north, | ||
QPalette::ColorGroup | cg | ||
) | const [protected, virtual] |
Draw the compass rose
painter | Painter |
center | Center of the compass |
radius | of the circle, where to paint the rose |
north | Direction pointing north, in degrees counter clockwise |
cg | Color group |
void QwtCompass::drawScaleContents | ( | QPainter * | painter, |
const QPoint & | center, | ||
int | radius | ||
) | const [protected, virtual] |
Draw the contents of the scale.
Reimplementado de QwtDial.
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.
Reimplementado de QwtDial.
const QwtCompassRose * QwtCompass::rose | ( | ) | const |
QwtCompassRose * QwtCompass::rose | ( | ) |
QwtText QwtCompass::scaleLabel | ( | double | value | ) | const [protected, virtual] |
Map a value to a corresponding label
value | Value that will be mapped |
label() looks in a map for a corresponding label for value or return an null text.
Reimplementado de QwtDial.
Set a map, mapping values to labels.
map | value to label map |
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.
void QwtCompass::setRose | ( | QwtCompassRose * | rose | ) |