Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QwtCompass Class Reference

A Compass Widget. More...

#include <qwt_compass.h>

Inheritance diagram for QwtCompass:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Member Functions

 QwtCompass (QWidget *parent=NULL)
 Constructor. More...
 
const QwtCompassRoserose () const
 
QwtCompassRoserose ()
 
void setRose (QwtCompassRose *rose)
 
virtual ~QwtCompass ()
 Destructor. More...
 
- Public Member Functions inherited from QwtDial
QRect boundingRect () const
 
Shadow frameShadow () const
 
QRect innerRect () const
 
int lineWidth () const
 
double maxScaleArc () const
 
virtual QSize minimumSizeHint () const QWT_OVERRIDE
 
double minScaleArc () const
 
Mode mode () const
 
const QwtDialNeedleneedle () const
 
QwtDialNeedleneedle ()
 
double origin () const
 
 QwtDial (QWidget *parent=NULL)
 Constructor. More...
 
QwtRoundScaleDrawscaleDraw ()
 
const QwtRoundScaleDrawscaleDraw () const
 
virtual QRect scaleInnerRect () const
 
void setFrameShadow (Shadow)
 
void setLineWidth (int)
 
void setMaxScaleArc (double)
 
void setMinScaleArc (double)
 
void setMode (Mode)
 Change the mode of the dial. More...
 
void setNeedle (QwtDialNeedle *)
 
virtual void setOrigin (double)
 Change the origin. More...
 
void setScaleArc (double minArc, double maxArc)
 
void setScaleDraw (QwtRoundScaleDraw *)
 
virtual QSize sizeHint () const QWT_OVERRIDE
 
virtual ~QwtDial ()
 Destructor. More...
 
- Public Member Functions inherited from QwtAbstractSlider
bool invertedControls () const
 
bool isReadOnly () const
 
bool isTracking () const
 
bool isValid () const
 
uint pageSteps () const
 
 QwtAbstractSlider (QWidget *parent=NULL)
 Constructor. More...
 
void setInvertedControls (bool)
 
void setPageSteps (uint)
 Set the number of steps for a page increment. More...
 
void setReadOnly (bool)
 
void setSingleSteps (uint)
 Set the number of steps for a single increment. More...
 
void setStepAlignment (bool)
 Enable step alignment. More...
 
void setTotalSteps (uint)
 Set the number of steps. More...
 
void setTracking (bool)
 Enables or disables tracking. More...
 
void setValid (bool)
 
void setWrapping (bool)
 
uint singleSteps () const
 
bool stepAlignment () const
 
uint totalSteps () const
 
double value () const
 
bool wrapping () const
 
virtual ~QwtAbstractSlider ()
 Destructor. More...
 
- Public Member Functions inherited from QwtAbstractScale
double invTransform (int) const
 
bool isInverted () const
 
double lowerBound () const
 
double maximum () const
 
double minimum () const
 
 QwtAbstractScale (QWidget *parent=NULL)
 
const QwtScaleDivscaleDiv () const
 
const QwtScaleEnginescaleEngine () const
 
QwtScaleEnginescaleEngine ()
 
const QwtScaleMapscaleMap () const
 
int scaleMaxMajor () const
 
int scaleMaxMinor () const
 
double scaleStepSize () const
 
void setLowerBound (double value)
 
void setScale (double lowerBound, double upperBound)
 Specify a scale. More...
 
void setScale (const QwtInterval &)
 Specify a scale. More...
 
void setScale (const QwtScaleDiv &)
 Specify a scale. More...
 
void setScaleEngine (QwtScaleEngine *)
 Set a scale engine. More...
 
void setScaleMaxMajor (int ticks)
 Set the maximum number of major tick intervals. More...
 
void setScaleMaxMinor (int ticks)
 Set the maximum number of minor tick intervals. More...
 
void setScaleStepSize (double stepSize)
 Set the step size used for calculating a scale division. More...
 
void setUpperBound (double value)
 
int transform (double) const
 
double upperBound () const
 
virtual ~QwtAbstractScale ()
 Destructor. More...
 

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 QWT_OVERRIDE
 
virtual void keyPressEvent (QKeyEvent *) QWT_OVERRIDE
 
- Protected Member Functions inherited from QwtDial
virtual void changeEvent (QEvent *) QWT_OVERRIDE
 
virtual void drawContents (QPainter *) const
 Draw the contents inside the frame. More...
 
virtual void drawFocusIndicator (QPainter *) const
 
virtual void drawFrame (QPainter *)
 
virtual void drawNeedle (QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) const
 
virtual void drawScale (QPainter *, const QPointF &center, double radius) const
 
void invalidateCache ()
 
virtual bool isScrollPosition (const QPoint &) const QWT_OVERRIDE
 Determine what to do when the user presses a mouse button. More...
 
virtual void paintEvent (QPaintEvent *) QWT_OVERRIDE
 
virtual void scaleChange () QWT_OVERRIDE
 
virtual double scrolledTo (const QPoint &) const QWT_OVERRIDE
 Determine the value for a new position of the slider handle. More...
 
virtual void sliderChange () QWT_OVERRIDE
 Calling update() More...
 
virtual void wheelEvent (QWheelEvent *) QWT_OVERRIDE
 
- Protected Member Functions inherited from QwtAbstractSlider
double incrementedValue (double value, int stepCount) const
 
void incrementValue (int stepCount)
 
virtual void mouseMoveEvent (QMouseEvent *) QWT_OVERRIDE
 
virtual void mousePressEvent (QMouseEvent *) QWT_OVERRIDE
 
virtual void mouseReleaseEvent (QMouseEvent *) QWT_OVERRIDE
 
- Protected Member Functions inherited from QwtAbstractScale
const QwtAbstractScaleDrawabstractScaleDraw () const
 
QwtAbstractScaleDrawabstractScaleDraw ()
 
void rescale (double lowerBound, double upperBound, double stepSize)
 
void setAbstractScaleDraw (QwtAbstractScaleDraw *)
 Set a scale draw. More...
 
void updateScaleDraw ()
 

Private Attributes

PrivateDatad_data
 

Additional Inherited Members

- Public Types inherited from QwtDial
enum  Mode { RotateNeedle, RotateScale }
 Mode controlling whether the needle or the scale is rotating. More...
 
enum  Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken }
 Frame shadow. More...
 
- Public Slots inherited from QwtAbstractSlider
void setValue (double value)
 
- Signals inherited from QwtAbstractSlider
void sliderMoved (double value)
 
void sliderPressed ()
 
void sliderReleased ()
 
void valueChanged (double value)
 Notify a change of value. More...
 
- Properties inherited from QwtDial
Shadow frameShadow
 
int lineWidth
 
double maxScaleArc
 
double minScaleArc
 
Mode mode
 
double origin
 
- Properties inherited from QwtAbstractSlider
bool invertedControls
 
uint pageSteps
 
bool readOnly
 
uint singleSteps
 
bool stepAlignment
 
uint totalSteps
 
bool tracking
 
double value
 Returns the current value. More...
 
bool wrapping
 
- Properties inherited from QwtAbstractScale
double lowerBound
 
int scaleMaxMajor
 
int scaleMaxMinor
 
double scaleStepSize
 
double upperBound
 

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 61 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 158 of file qwt_compass.cpp.

QwtCompass::~QwtCompass ( )
virtual

Destructor.

Definition at line 176 of file qwt_compass.cpp.

Member Function Documentation

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

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 218 of file qwt_compass.cpp.

void QwtCompass::drawScaleContents ( QPainter *  painter,
const QPointF &  center,
double  radius 
) const
protectedvirtual

Draw the contents of the scale

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

Reimplemented from QwtDial.

Definition at line 189 of file qwt_compass.cpp.

void QwtCompass::keyPressEvent ( QKeyEvent *  kev)
protectedvirtual

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 271 of file qwt_compass.cpp.

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

Definition at line 248 of file qwt_compass.cpp.

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

Definition at line 257 of file qwt_compass.cpp.

void QwtCompass::setRose ( QwtCompassRose rose)

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 232 of file qwt_compass.cpp.

Member Data Documentation

PrivateData* QwtCompass::d_data
private

Definition at line 83 of file qwt_compass.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:50