A simple rose for QwtCompass.
More...
#include <qwt_compass_rose.h>
|
| | QwtSimpleCompassRose (int numThorns=8, int numThornLevels=-1) |
| | Constructor.
|
| |
| void | setWidth (double) |
| | Set the width of the rose heads.
|
| |
| double | width () const |
| | Get the width of the rose heads.
|
| |
| void | setNumThorns (int) |
| | Set the number of thorns on one level.
|
| |
| int | numThorns () const |
| | Get the number of thorns.
|
| |
| void | setNumThornLevels (int) |
| | Set the number of thorn levels.
|
| |
| int | numThornLevels () const |
| | Get the number of thorn levels.
|
| |
| void | setShrinkFactor (double factor) |
| | Set the shrink factor for thorns with each level.
|
| |
| double | shrinkFactor () const |
| | Get the shrink factor for thorns with each level.
|
| |
| void | setFlatStyle (bool) |
| | Set flat style.
|
| |
| bool | flatStyle () const |
| | Return whether flat style is enabled.
|
| |
| virtual void | draw (QPainter *, const QPointF ¢er, double radius, double north, QPalette::ColorGroup=QPalette::Active) const override |
| | Draw the rose.
|
| |
|
| QwtCompassRose () |
| | Constructor.
|
| |
|
virtual | ~QwtCompassRose () |
| | Destructor.
|
| |
| virtual void | setPalette (const QPalette &) |
| | Assign a palette.
|
| |
| const QPalette & | palette () const |
| | Get the current palette.
|
| |
A simple rose for QwtCompass.
QwtSimpleCompassRose provides a simple compass rose implementation with configurable thorn count and levels.
◆ QwtSimpleCompassRose()
| QwtSimpleCompassRose::QwtSimpleCompassRose |
( |
int |
numThorns = 8, |
|
|
int |
numThornLevels = -1 |
|
) |
| |
Constructor.
- Parameters
-
| [in] | numThorns | Number of thorns |
| [in] | numThornLevels | Number of thorn levels (-1 means auto) |
Destructor
◆ draw()
| void QwtSimpleCompassRose::draw |
( |
QPainter * |
painter, |
|
|
const QPointF & |
center, |
|
|
double |
radius, |
|
|
double |
north, |
|
|
QPalette::ColorGroup |
cg = QPalette::Active |
|
) |
| const |
|
overridevirtual |
Draw the rose.
- Parameters
-
| [in] | painter | Painter |
| [in] | center | Center point |
| [in] | radius | Radius of the rose |
| [in] | north | Position pointing north |
| [in] | cg | Color group |
Implements QwtCompassRose.
◆ drawRose()
| void QwtSimpleCompassRose::drawRose |
( |
QPainter * |
painter, |
|
|
const QPalette & |
palette, |
|
|
const QPointF & |
center, |
|
|
double |
radius, |
|
|
double |
north, |
|
|
double |
width, |
|
|
int |
numThorns, |
|
|
int |
numThornLevels, |
|
|
double |
shrinkFactor, |
|
|
bool |
flatStyle = true |
|
) |
| |
|
static |
Static helper to draw a rose with specified parameters.
- Parameters
-
| [in] | painter | Painter |
| [in] | palette | Palette for drawing |
| [in] | center | Center of the rose |
| [in] | radius | Radius of the rose |
| [in] | north | Position pointing to north |
| [in] | width | Width of the rose heads |
| [in] | numThorns | Number of thorns |
| [in] | numThornLevels | Number of thorn levels |
| [in] | shrinkFactor | Factor to shrink the thorns with each level |
◆ flatStyle()
| bool QwtSimpleCompassRose::flatStyle |
( |
| ) |
const |
◆ numThornLevels()
| int QwtSimpleCompassRose::numThornLevels |
( |
| ) |
const |
◆ numThorns()
| int QwtSimpleCompassRose::numThorns |
( |
| ) |
const |
◆ setFlatStyle()
| void QwtSimpleCompassRose::setFlatStyle |
( |
bool |
on | ) |
|
Set flat style.
When enabled (default), thorns are drawn with a single solid color instead of the two-tone Light/Dark 3D effect.
- Parameters
-
| on | true for flat style, false for classic 3D style |
- See also
- flatStyle()
◆ setNumThornLevels()
| void QwtSimpleCompassRose::setNumThornLevels |
( |
int |
numThornLevels | ) |
|
◆ setNumThorns()
| void QwtSimpleCompassRose::setNumThorns |
( |
int |
numThorns | ) |
|
Set the number of thorns on one level.
- Parameters
-
| [in] | numThorns | Number of thorns (aligned to multiple of 4, minimum 4) |
- See also
- numThorns(), setNumThornLevels()
◆ setShrinkFactor()
| void QwtSimpleCompassRose::setShrinkFactor |
( |
double |
factor | ) |
|
Set the shrink factor for thorns with each level.
- Parameters
-
| [in] | factor | Shrink factor (default: 0.9) |
- See also
- shrinkFactor()
◆ setWidth()
| void QwtSimpleCompassRose::setWidth |
( |
double |
width | ) |
|
Set the width of the rose heads.
- Parameters
-
| [in] | width | Width (range: 0.03 to 0.4, lower values make thinner heads) |
◆ shrinkFactor()
| double QwtSimpleCompassRose::shrinkFactor |
( |
| ) |
const |
Get the shrink factor for thorns with each level.
- Returns
- Shrink factor
- See also
- setShrinkFactor()
◆ width()
| double QwtSimpleCompassRose::width |
( |
| ) |
const |
Get the width of the rose heads.
- Returns
- Width of the rose heads
- See also
- setWidth()
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot/qwt_compass_rose.h
- /home/runner/work/QWT/QWT/src/plot/qwt_compass_rose.cpp