A magnet needle for compass widgets
更多...
#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)
- 参见
- QwtDial, QwtCompass
◆ QwtCompassMagnetNeedle()
| QwtCompassMagnetNeedle::QwtCompassMagnetNeedle |
( |
Style |
style = TriangleStyle, |
|
|
const QColor & |
light = Qt::white, |
|
|
const QColor & |
dark = Qt::red |
|
) |
| |
Constructor
- 参数
-
| [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
- 参数
-
| painter | Painter |
| length | Length of the needle |
| colorGroup | Color group, used for painting |
实现了 QwtDialNeedle.
该类的文档由以下文件生成:
- /home/runner/work/QWT/QWT/src/plot/qwt_dial_needle.h
- /home/runner/work/QWT/QWT/src/plot/qwt_dial_needle.cpp