Qwt User's Guide  6.1.2
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | 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

Public Member Functions

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

Protected Member Functions

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

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

Member Function Documentation

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

Draw the needle

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
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.

lengthLength of the needle
colorGroupColor group, used for painting
See Also
setPalette(), palette()

Implemented in QwtCompassWindArrow, QwtCompassMagnetNeedle, and QwtDialSimpleNeedle.

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

Sets the palette for the needle.

paletteNew Palette