Base class for needles that can be used in a QwtDial.
More...
#include <qwt_dial_needle.h>
|
|
| 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 *painter, double length, QPalette::ColorGroup colorGroup) const =0 |
| | Draw the needle.
|
| |
|
virtual void | drawKnob (QPainter *, double width, const QBrush &, bool sunken) const |
| | Draw the knob.
|
| |
|
|
QPalette | m_palette |
| |
|
bool | m_flatStyle |
| |
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.
- See also
- QwtDial, QwtCompass
◆ draw()
| void QwtDialNeedle::draw |
( |
QPainter * |
painter, |
|
|
const QPointF & |
center, |
|
|
double |
length, |
|
|
double |
direction, |
|
|
QPalette::ColorGroup |
colorGroup = QPalette::Active |
|
) |
| const |
|
virtual |
Draw the needle.
- Parameters
-
| [in] | painter | Painter |
| [in] | center | Center of the dial, start position for the needle |
| [in] | length | Length of the needle |
| [in] | direction | Direction of the needle, in degrees counter clockwise |
| [in] | colorGroup | Color group, used for painting |
◆ drawNeedle()
| virtual void QwtDialNeedle::drawNeedle |
( |
QPainter * |
painter, |
|
|
double |
length, |
|
|
QPalette::ColorGroup |
colorGroup |
|
) |
| const |
|
protectedpure virtual |
◆ flatStyle()
| bool QwtDialNeedle::flatStyle |
( |
| ) |
const |
Return flat style.
Return whether flat style is enabled.
- See also
- setFlatStyle()
◆ palette()
| const QPalette & QwtDialNeedle::palette |
( |
| ) |
const |
Return the palette of the needle.
- Returns
- Palette of the needle
◆ setFlatStyle()
| void QwtDialNeedle::setFlatStyle |
( |
bool |
on | ) |
|
Set flat style.
When enabled (default), needles and knobs are drawn with flat colors instead of 3D shaded effects (Light/Dark gradients).
- Parameters
-
| on | true for flat style, false for classic 3D style |
- See also
- flatStyle()
◆ setPalette()
| void QwtDialNeedle::setPalette |
( |
const QPalette & |
palette | ) |
|
|
virtual |
Set the palette for the needle.
Sets the palette for the needle.
- Parameters
-
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