Eneboo - Documentación para desarrolladores
Clases | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtCompass

A Compass Widget. Más...

#include <qwt_compass.h>

Diagrama de herencias de QwtCompass
QwtDial QwtAbstractSlider QWidget QwtDoubleRange QObject QPaintDevice QObject QPaintDevice Qt Qt Qt Qt

Lista de todos los miembros.

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 QwtCompassRoserose () const
QwtCompassRoserose ()
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 &center, int radius, double north, QPalette::ColorGroup) const
virtual void drawScaleContents (QPainter *, const QPoint &center, int radius) const
 Draw the contents of the scale.
virtual void keyPressEvent (QKeyEvent *)

Descripción detallada

A Compass Widget.

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

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

Documentación del constructor y destructor

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

Constructor.

Parámetros:
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.

QwtCompass::QwtCompass ( QWidget parent,
const char *  name 
) [explicit]

Constructor.

Parámetros:
parentParent widget
nameObject 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.


Documentación de las funciones miembro

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

Draw the compass rose

Parámetros:
painterPainter
centerCenter of the compass
radiusof the circle, where to paint the rose
northDirection pointing north, in degrees counter clockwise
cgColor 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.

Ver también:
isReadOnly()

Reimplementado de QwtDial.

QMap< double, QString > & QwtCompass::labelMap ( )
Devuelve:
map, mapping values to labels
Ver también:
setLabelMap()
const QMap< double, QString > & QwtCompass::labelMap ( ) const
Devuelve:
map, mapping values to labels
Ver también:
setLabelMap()
const QwtCompassRose * QwtCompass::rose ( ) const
Devuelve:
rose
Ver también:
setRose()
QwtCompassRose * QwtCompass::rose ( )
Devuelve:
rose
Ver también:
setRose()
QwtText QwtCompass::scaleLabel ( double  value) const [protected, virtual]

Map a value to a corresponding label

Parámetros:
valueValue that will be mapped
Devuelve:
Label, or QString::null

label() looks in a map for a corresponding label for value or return an null text.

Ver también:
labelMap(), setLabelMap()

Reimplementado de QwtDial.

void QwtCompass::setLabelMap ( const QMap< double, QString > &  map)

Set a map, mapping values to labels.

Parámetros:
mapvalue 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.

Atención:
The map will have no effect for values that are no major tick values. Major ticks can be changed by QwtScaleDraw::setScale
Ver también:
labelMap(), scaleDraw(), setScale()
void QwtCompass::setRose ( QwtCompassRose rose)

Set a rose for the compass

Parámetros:
roseCompass rose
Atención:
The rose will be deleted, when a different rose is set or in ~QwtCompass
Ver también:
rose()

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'