A magnet needle for compass widgets.
More...
#include <qwt_dial_needle.h>
|
| enum | Style { TriangleStyle
, ThinStyle
} |
| | Style of the needle.
|
| |
|
| | QwtCompassMagnetNeedle (Style=TriangleStyle, const QColor &light=Qt::white, const QColor &dark=Qt::red) |
| | Constructor.
|
| |
|
| QwtDialNeedle () |
| | Constructor.
|
| |
|
virtual | ~QwtDialNeedle () |
| | Destructor.
|
| |
| virtual void | setPalette (const QPalette &) |
| | Set the palette for the needle.
|
| |
| const QPalette & | palette () const |
| | Return the palette of the needle.
|
| |
| void | setFlatStyle (bool) |
| | Set flat style.
|
| |
| bool | flatStyle () const |
| | Return flat style.
|
| |
| virtual void | draw (QPainter *, const QPointF ¢er, double length, double direction, QPalette::ColorGroup=QPalette::Active) const |
| | Draw the needle.
|
| |
|
| virtual void | drawNeedle (QPainter *, double length, QPalette::ColorGroup) const override |
| | Draw the needle.
|
| |
|
virtual void | drawKnob (QPainter *, double width, const QBrush &, bool sunken) const |
| | Draw the knob.
|
| |
|
|
QPalette | m_palette |
| |
|
bool | m_flatStyle |
| |
A magnet needle for compass widgets.
A magnet needle points to two opposite directions indicating north and south. The following colors are used:
- QPalette::Light: Used for pointing south
- QPalette::Dark: Used for pointing north
- QPalette::Base: Knob (ThinStyle only)
- See also
- QwtDial, QwtCompass
◆ QwtCompassMagnetNeedle()
| QwtCompassMagnetNeedle::QwtCompassMagnetNeedle |
( |
Style |
style = TriangleStyle, |
|
|
const QColor & |
light = Qt::white, |
|
|
const QColor & |
dark = Qt::red |
|
) |
| |
Constructor.
- Parameters
-
| [in] | style | Style |
| [in] | light | Light color |
| [in] | dark | Dark color |
◆ drawNeedle()
| void QwtCompassMagnetNeedle::drawNeedle |
( |
QPainter * |
painter, |
|
|
double |
length, |
|
|
QPalette::ColorGroup |
colorGroup |
|
) |
| const |
|
overrideprotectedvirtual |
Draw the needle.
- Parameters
-
| painter | Painter |
| length | Length of the needle |
| colorGroup | Color group, used for painting |
Implements QwtDialNeedle.
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot/qwt_dial_needle.h
- /home/runner/work/QWT/QWT/src/plot/qwt_dial_needle.cpp