Base class for needles that can be used in a QwtDial. More...
#include <qwt_dial_needle.h>
Public Member Functions | |
virtual void | draw (QPainter *painter, const QPointF ¢er, 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 |
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.
Definition at line 28 of file qwt_dial_needle.h.
QwtDialNeedle::QwtDialNeedle | ( | ) |
Constructor.
Definition at line 188 of file qwt_dial_needle.cpp.
|
virtual |
Destructor.
Definition at line 194 of file qwt_dial_needle.cpp.
|
virtual |
Draw the needle
painter | Painter |
center | Center of the dial, start position for the needle |
length | Length of the needle |
direction | Direction of the needle, in degrees counter clockwise |
colorGroup | Color group, used for painting |
Definition at line 225 of file qwt_dial_needle.cpp.
|
protectedvirtual |
Draw the knob.
Definition at line 240 of file qwt_dial_needle.cpp.
|
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.
painter | Painter |
length | Length of the needle |
colorGroup | Color group, used for painting |
Implemented in QwtCompassWindArrow, QwtCompassMagnetNeedle, and QwtDialSimpleNeedle.
const QPalette & QwtDialNeedle::palette | ( | ) | const |
Definition at line 211 of file qwt_dial_needle.cpp.
|
virtual |
Sets the palette for the needle.
palette | New Palette |
Definition at line 203 of file qwt_dial_needle.cpp.
|
private |
Definition at line 66 of file qwt_dial_needle.h.