A needle for dial widgets
更多...
#include <qwt_dial_needle.h>
|
| enum | Style { Arrow
, Ray
} |
| | Style of the needle
|
| |
|
| | QwtDialSimpleNeedle (Style, bool hasKnob=true, const QColor &mid=Qt::gray, const QColor &base=Qt::darkGray) |
| | Constructor
|
| |
| void | setWidth (double width) |
| | Set the width of the needle
|
| |
| double | width () const |
| | Return the width of the needle
|
| |
|
| 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 needle for dial widgets
The following colors are used:
◆ QwtDialSimpleNeedle()
| QwtDialSimpleNeedle::QwtDialSimpleNeedle |
( |
Style |
style, |
|
|
bool |
hasKnob = true, |
|
|
const QColor & |
mid = Qt::gray, |
|
|
const QColor & |
base = Qt::darkGray |
|
) |
| |
Constructor
- 参数
-
| [in] | style | Style |
| [in] | hasKnob | With/Without knob |
| [in] | mid | Middle color |
| [in] | base | Base color |
◆ drawNeedle()
| void QwtDialSimpleNeedle::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.
◆ setWidth()
| void QwtDialSimpleNeedle::setWidth |
( |
double |
width | ) |
|
Set the width of the needle
- 参数
-
- 参见
- width()
◆ width()
| double QwtDialSimpleNeedle::width |
( |
| ) |
const |
Return the width of the needle
- 返回
- Width of the needle
- 参见
- setWidth()
该类的文档由以下文件生成:
- /home/runner/work/QWT/QWT/src/plot/qwt_dial_needle.h
- /home/runner/work/QWT/QWT/src/plot/qwt_dial_needle.cpp