Qwt User's Guide
svn
|
#include <qwt_dial_needle.h>
Inherits QwtDialNeedle.
Public Types | |
enum | Style { TriangleStyle, ThinStyle } |
Public Member Functions | |
virtual void | draw (QPainter *painter, const QPointF ¢er, double length, double direction, QPalette::ColorGroup=QPalette::Active) const |
const QPalette & | palette () const |
QwtCompassMagnetNeedle (Style=TriangleStyle, const QColor &light=Qt::white, const QColor &dark=Qt::red) | |
virtual void | setPalette (const QPalette &) |
Protected Member Functions | |
virtual void | drawKnob (QPainter *, double width, const QBrush &, bool sunken) const |
virtual void | drawNeedle (QPainter *, double length, QPalette::ColorGroup) const |
A magnet needle for compass widgets.
A magnet needle points to two opposite directions indicating north and south.
The following colors are used:
QwtCompassMagnetNeedle::QwtCompassMagnetNeedle | ( | Style | style = TriangleStyle , |
const QColor & | light = Qt::white , |
||
const QColor & | dark = Qt::red |
||
) |
Constructor.
void QwtDialNeedle::draw | ( | QPainter * | painter, |
const QPointF & | center, | ||
double | length, | ||
double | direction, | ||
QPalette::ColorGroup | colorGroup = QPalette::Active |
||
) | const [virtual, inherited] |
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 |
void QwtDialNeedle::drawKnob | ( | QPainter * | painter, |
double | width, | ||
const QBrush & | brush, | ||
bool | sunken | ||
) | const [protected, virtual, inherited] |
Draw the knob.
void QwtCompassMagnetNeedle::drawNeedle | ( | QPainter * | painter, |
double | length, | ||
QPalette::ColorGroup | colorGroup | ||
) | const [protected, virtual] |
Draw the needle
painter | Painter |
length | Length of the needle |
colorGroup | Color group, used for painting |
Implements QwtDialNeedle.
const QPalette & QwtDialNeedle::palette | ( | ) | const [inherited] |
void QwtDialNeedle::setPalette | ( | const QPalette & | palette | ) | [virtual, inherited] |
Sets the palette for the needle.
palette | New Palette |