QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
QwtSimpleCompassRose类 参考

A simple rose for QwtCompass 更多...

#include <qwt_compass_rose.h>

类 QwtSimpleCompassRose 继承关系图:
QwtCompassRose

class  PrivateData
 

Public 成员函数

 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 &center, double radius, double north, QPalette::ColorGroup=QPalette::Active) const override
 Draw the rose
 
- Public 成员函数 继承自 QwtCompassRose
 QwtCompassRose ()
 Constructor
 
virtual ~QwtCompassRose ()
 Destructor
 
virtual void setPalette (const QPalette &)
 Assign a palette
 
const QPalette & palette () const
 Get the current palette
 

静态 Public 成员函数

static void drawRose (QPainter *, const QPalette &, const QPointF &center, double radius, double north, double width, int numThorns, int numThornLevels, double shrinkFactor, bool flatStyle=true)
 Static helper to draw a rose with specified parameters
 

详细描述

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

参数
[in]numThornsNumber of thorns
[in]numThornLevelsNumber 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

参数
[in]painterPainter
[in]centerCenter point
[in]radiusRadius of the rose
[in]northPosition pointing north
[in]cgColor group

实现了 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

参数
[in]painterPainter
[in]palettePalette for drawing
[in]centerCenter of the rose
[in]radiusRadius of the rose
[in]northPosition pointing to north
[in]widthWidth of the rose heads
[in]numThornsNumber of thorns
[in]numThornLevelsNumber of thorn levels
[in]shrinkFactorFactor to shrink the thorns with each level

◆ flatStyle()

bool QwtSimpleCompassRose::flatStyle ( ) const

Return whether flat style is enabled

参见
setFlatStyle()

◆ numThornLevels()

int QwtSimpleCompassRose::numThornLevels ( ) const

Get the number of thorn levels

返回
Number of thorn levels
参见
setNumThorns(), setNumThornLevels()

◆ numThorns()

int QwtSimpleCompassRose::numThorns ( ) const

Get the number of thorns

返回
Number of thorns
参见
setNumThorns(), setNumThornLevels()

◆ 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.

参数
ontrue for flat style, false for classic 3D style
参见
flatStyle()

◆ setNumThornLevels()

void QwtSimpleCompassRose::setNumThornLevels ( int  numThornLevels)

Set the number of thorn levels

参数
[in]numThornLevelsNumber of thorn levels
参见
setNumThorns(), numThornLevels()

◆ setNumThorns()

void QwtSimpleCompassRose::setNumThorns ( int  numThorns)

Set the number of thorns on one level

参数
[in]numThornsNumber of thorns (aligned to multiple of 4, minimum 4)
参见
numThorns(), setNumThornLevels()

◆ setShrinkFactor()

void QwtSimpleCompassRose::setShrinkFactor ( double  factor)

Set the shrink factor for thorns with each level

参数
[in]factorShrink factor (default: 0.9)
参见
shrinkFactor()

◆ setWidth()

void QwtSimpleCompassRose::setWidth ( double  width)

Set the width of the rose heads

参数
[in]widthWidth (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

返回
Shrink factor
参见
setShrinkFactor()

◆ width()

double QwtSimpleCompassRose::width ( ) const

Get the width of the rose heads

返回
Width of the rose heads
参见
setWidth()

该类的文档由以下文件生成: