Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QwtDialNeedle Class Referenceabstract

Base class for needles that can be used in a QwtDial. More...

#include <qwt_dial_needle.h>

Inheritance diagram for QwtDialNeedle:
Inheritance graph
[legend]

Public Member Functions

virtual void draw (QPainter *painter, const QPointF &center, double length, double direction, QPalette::ColorGroup=QPalette::Active) const
 
const QPalette & palette () const
 
 QwtDialNeedle ()
 Constructor. More...
 
virtual void setPalette (const QPalette &)
 
virtual ~QwtDialNeedle ()
 Destructor. More...
 

Protected Member Functions

virtual void drawKnob (QPainter *, double width, const QBrush &, bool sunken) const
 Draw the knob. More...
 
virtual void drawNeedle (QPainter *painter, double length, QPalette::ColorGroup colorGroup) const =0
 Draw the needle. More...
 

Private Attributes

QPalette d_palette
 

Detailed Description

Base class for needles that can be used in a QwtDial.

QwtDialNeedle is a pointer that indicates a value by pointing to a specific direction.

See also
QwtDial, QwtCompass

Definition at line 28 of file qwt_dial_needle.h.

Constructor & Destructor Documentation

QwtDialNeedle::QwtDialNeedle ( )

Constructor.

Definition at line 188 of file qwt_dial_needle.cpp.

QwtDialNeedle::~QwtDialNeedle ( )
virtual

Destructor.

Definition at line 194 of file qwt_dial_needle.cpp.

Member Function Documentation

void QwtDialNeedle::draw ( QPainter *  painter,
const QPointF &  center,
double  length,
double  direction,
QPalette::ColorGroup  colorGroup = QPalette::Active 
) const
virtual

Draw the needle

Parameters
painterPainter
centerCenter of the dial, start position for the needle
lengthLength of the needle
directionDirection of the needle, in degrees counter clockwise
colorGroupColor group, used for painting

Definition at line 225 of file qwt_dial_needle.cpp.

void QwtDialNeedle::drawKnob ( QPainter *  painter,
double  width,
const QBrush &  brush,
bool  sunken 
) const
protectedvirtual

Draw the knob.

Definition at line 240 of file qwt_dial_needle.cpp.

virtual void QwtDialNeedle::drawNeedle ( QPainter *  painter,
double  length,
QPalette::ColorGroup  colorGroup 
) const
protectedpure virtual

Draw the needle.

The origin of the needle is at position (0.0, 0.0 ) pointing in direction 0.0 ( = east ).

The painter is already initialized with translation and rotation.

Parameters
painterPainter
lengthLength of the needle
colorGroupColor group, used for painting
See also
setPalette(), palette()

Implemented in QwtCompassWindArrow, QwtCompassMagnetNeedle, and QwtDialSimpleNeedle.

const QPalette & QwtDialNeedle::palette ( ) const
Returns
the palette of the needle.

Definition at line 211 of file qwt_dial_needle.cpp.

void QwtDialNeedle::setPalette ( const QPalette &  palette)
virtual

Sets the palette for the needle.

Parameters
paletteNew Palette

Definition at line 203 of file qwt_dial_needle.cpp.

Member Data Documentation

QPalette QwtDialNeedle::d_palette
private

Definition at line 66 of file qwt_dial_needle.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18