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

在极坐标图上绘制刻度和网格线的绘图项 更多...

#include <qwt_polar_grid.h>

类 QwtPolarGrid 继承关系图:
QwtPolarItem

class  PrivateData
 

Public 类型

enum  DisplayFlag {
  SmartOriginLabel = 1 , HideMaxRadiusLabel = 2 , ClipAxisBackground = 4 , SmartScaleDraw = 8 ,
  ClipGridLines = 16
}
 绘制刻度和网格线时避免冲突的显示标志 更多...
 
enum  GridAttribute { AutoScaling = 0x01 }
 网格属性 更多...
 
- Public 类型 继承自 QwtPolarItem
enum  RttiValues {
  Rtti_PolarItem = 0 , Rtti_PolarGrid , Rtti_PolarMarker , Rtti_PolarCurve ,
  Rtti_PolarSpectrogram , Rtti_PolarUserItem = 1000
}
 
enum  ItemAttribute { Legend = 0x01 , AutoScale = 0x02 }
 
enum  RenderHint { RenderAntialiased = 0x01 }
 

Public 成员函数

 QwtPolarGrid ()
 Constructor
 
virtual ~QwtPolarGrid ()
 Destructor
 
virtual int rtti () const override
 Get the runtime type information
 
void setDisplayFlag (DisplayFlag, bool on=true)
 Set a display flag
 
bool testDisplayFlag (DisplayFlag) const
 Test a display flag
 
void setGridAttribute (GridAttribute, bool on=true)
 Set a grid attribute
 
bool testGridAttribute (GridAttribute) const
 Test a grid attribute
 
void showGrid (int scaleId, bool show=true)
 Show/hide the grid for a scale
 
bool isGridVisible (int scaleId) const
 Check if the grid is visible for a scale
 
void showMinorGrid (int scaleId, bool show=true)
 Show/hide the minor grid for a scale
 
bool isMinorGridVisible (int scaleId) const
 Check if the minor grid is visible for a scale
 
void showAxis (int axisId, bool show=true)
 Show/hide an axis
 
bool isAxisVisible (int axisId) const
 Check if an axis is visible
 
void setPen (const QPen &p)
 Set the pen
 
void setFont (const QFont &)
 Set the font
 
void setMajorGridPen (const QPen &p)
 Set the major grid pen
 
void setMajorGridPen (int scaleId, const QPen &p)
 Set the major grid pen for a scale
 
QPen majorGridPen (int scaleId) const
 Get the major grid pen for a scale
 
void setMinorGridPen (const QPen &p)
 Set the minor grid pen
 
void setMinorGridPen (int scaleId, const QPen &p)
 Set the minor grid pen for a scale
 
QPen minorGridPen (int scaleId) const
 Get the minor grid pen for a scale
 
void setAxisPen (int axisId, const QPen &p)
 Set the axis pen
 
QPen axisPen (int axisId) const
 Get the axis pen
 
void setAxisFont (int axisId, const QFont &p)
 Set the axis font
 
QFont axisFont (int axisId) const
 Get the axis font
 
void setScaleDraw (int axisId, QwtScaleDraw *)
 Set the scale draw for an axis
 
const QwtScaleDrawscaleDraw (int axisId) const
 Get the scale draw for an axis (const version)
 
QwtScaleDrawscaleDraw (int axisId)
 Get the scale draw for an axis
 
void setAzimuthScaleDraw (QwtRoundScaleDraw *)
 Set the azimuth scale draw
 
const QwtRoundScaleDrawazimuthScaleDraw () const
 Get the azimuth scale draw (const version)
 
QwtRoundScaleDrawazimuthScaleDraw ()
 Get the azimuth scale draw
 
virtual void draw (QPainter *p, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &rect) const override
 Draw the grid
 
virtual void updateScaleDiv (const QwtScaleDiv &azimuthMap, const QwtScaleDiv &radialMap, const QwtInterval &) override
 Update the scale division
 
virtual int marginHint () const override
 Get the margin hint
 
- Public 成员函数 继承自 QwtPolarItem
 QwtPolarItem (const QwtText &title=QwtText())
 Constructor
 
virtual ~QwtPolarItem ()
 Destructor
 
void attach (QwtPolarPlot *plot)
 Attach the item to a plot
 
void detach ()
 Detach the item from its plot
 
QwtPolarPlotplot () const
 Get the attached plot
 
void setTitle (const QString &title)
 Set the title from a QString
 
void setTitle (const QwtText &title)
 Set the title from a QwtText
 
const QwtTexttitle () const
 Get the title
 
void setItemAttribute (ItemAttribute, bool on=true)
 Set an item attribute
 
bool testItemAttribute (ItemAttribute) const
 Test an item attribute
 
void setRenderHint (RenderHint, bool on=true)
 Set a render hint
 
bool testRenderHint (RenderHint) const
 Test a render hint
 
void setRenderThreadCount (uint numThreads)
 Set the number of render threads
 
uint renderThreadCount () const
 Get the number of render threads
 
double z () const
 Get the z value
 
void setZ (double z)
 Set the z value
 
void show ()
 Show the item
 
void hide ()
 Hide the item
 
virtual void setVisible (bool)
 Set the visibility
 
bool isVisible () const
 Get the visibility
 
virtual void itemChanged ()
 Update the item and trigger autoRefresh
 
virtual void legendChanged ()
 Update the legend
 
virtual QwtInterval boundingInterval (int scaleId) const
 Get the bounding interval for a scale
 
void setLegendIconSize (const QSize &)
 Set the legend icon size
 
QSize legendIconSize () const
 Get the legend icon size
 
virtual QList< QwtLegendDatalegendData () const
 Get the legend data
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const
 Get the legend icon
 

Protected 成员函数

void drawRays (QPainter *, const QRectF &, const QPointF &pole, double radius, const QwtScaleMap &azimuthMap, const QList< double > &) const
 Draw the rays
 
void drawCircles (QPainter *, const QRectF &, const QPointF &pole, const QwtScaleMap &radialMap, const QList< double > &) const
 Draw the circles
 
void drawAxis (QPainter *, int axisId) const
 Draw an axis
 

详细描述

在极坐标图上绘制刻度和网格线的绘图项

成员枚举类型说明

◆ DisplayFlag

绘制刻度和网格线时避免冲突的显示标志

枚举值
SmartOriginLabel 

尽量避免原点的标签绘制在另一个轴上的情况。

HideMaxRadiusLabel 

径向刻度的最外刻度通常靠近画布边界。启用 HideMaxRadiusLabel 后,它将不被绘制。

ClipAxisBackground 

当径向刻度的刻度标签绘制在径向网格线(或曲线/光谱图)上时,可能难以阅读。 使用 ClipAxisBackground 时,每个标签的边界矩形将添加到裁剪区域。

SmartScaleDraw 

当径向轴的骨干非常靠近方位角网格线时,不绘制它。

ClipGridLines 

所有网格线在绘制之前都针对绘图区域进行裁剪。 当绘图放大时,这将对绘制代码的性能产生显著影响。

◆ GridAttribute

网格属性

枚举值
AutoScaling 

启用自动缩放时,径向轴将调整为当前在画布绘图上可见的区间。

构造及析构函数说明

◆ QwtPolarGrid()

QwtPolarGrid::QwtPolarGrid ( )
explicit

Constructor

构造函数

◆ ~QwtPolarGrid()

QwtPolarGrid::~QwtPolarGrid ( )
virtual

Destructor

析构函数

成员函数说明

◆ axisFont()

QFont QwtPolarGrid::axisFont ( int  axisId) const

Get the axis font

获取特定轴的刻度标签字体

◆ axisPen()

QPen QwtPolarGrid::axisPen ( int  axisId) const

Get the axis pen

获取特定轴的画笔

◆ azimuthScaleDraw() [1/2]

QwtRoundScaleDraw * QwtPolarGrid::azimuthScaleDraw ( )

Get the azimuth scale draw

获取方位角刻度的刻度绘制器

◆ azimuthScaleDraw() [2/2]

const QwtRoundScaleDraw * QwtPolarGrid::azimuthScaleDraw ( ) const

Get the azimuth scale draw (const version)

获取方位角刻度的刻度绘制器

◆ draw()

void QwtPolarGrid::draw ( QPainter *  painter,
const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
double  radius,
const QRectF &  canvasRect 
) const
overridevirtual

Draw the grid

绘制网格和轴

实现了 QwtPolarItem.

◆ drawAxis()

void QwtPolarGrid::drawAxis ( QPainter *  painter,
int  axisId 
) const
protected

Draw an axis

Paint an axis

参数
painterPainter
axisIdAxis id (QwtPolar::Axis)

◆ drawCircles()

void QwtPolarGrid::drawCircles ( QPainter *  painter,
const QRectF &  canvasRect,
const QPointF &  pole,
const QwtScaleMap radialMap,
const QList< double > &  values 
) const
protected

Draw the circles

Draw circles

参数
painterPainter
canvasRectContents rect of the canvas in painter coordinates
polePosition of the pole in painter coordinates
radialMapMaps radius values into painter coordinates.
valuesRadial values, indicating the distances from the pole

◆ drawRays()

void QwtPolarGrid::drawRays ( QPainter *  painter,
const QRectF &  canvasRect,
const QPointF &  pole,
double  radius,
const QwtScaleMap azimuthMap,
const QList< double > &  values 
) const
protected

Draw the rays

Draw lines from the pole

参数
painterPainter
canvasRectContents rect of the canvas in painter coordinates
polePosition of the pole in painter coordinates
radiusLength of the lines in painter coordinates
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
valuesAzimuth values, indicating the direction of the lines

◆ isAxisVisible()

bool QwtPolarGrid::isAxisVisible ( int  axisId) const

Check if an axis is visible

检查轴是否可见

◆ isGridVisible()

bool QwtPolarGrid::isGridVisible ( int  scaleId) const

Check if the grid is visible for a scale

检查刻度的网格线是否可见

◆ isMinorGridVisible()

bool QwtPolarGrid::isMinorGridVisible ( int  scaleId) const

Check if the minor grid is visible for a scale

检查刻度的次网格线是否可见

◆ majorGridPen()

QPen QwtPolarGrid::majorGridPen ( int  scaleId) const

Get the major grid pen for a scale

获取特定刻度主网格线的画笔

◆ marginHint()

int QwtPolarGrid::marginHint ( ) const
overridevirtual

Get the margin hint

获取边距提示

重载 QwtPolarItem .

◆ minorGridPen()

QPen QwtPolarGrid::minorGridPen ( int  scaleId) const

Get the minor grid pen for a scale

获取特定刻度次网格线的画笔

◆ rtti()

int QwtPolarGrid::rtti ( ) const
overridevirtual

Get the runtime type information

获取运行时类型信息

重载 QwtPolarItem .

◆ scaleDraw() [1/2]

QwtScaleDraw * QwtPolarGrid::scaleDraw ( int  axisId)

Get the scale draw for an axis

获取指定轴的刻度绘制器

◆ scaleDraw() [2/2]

const QwtScaleDraw * QwtPolarGrid::scaleDraw ( int  axisId) const

Get the scale draw for an axis (const version)

获取指定轴的刻度绘制器

◆ setAxisFont()

void QwtPolarGrid::setAxisFont ( int  axisId,
const QFont &  font 
)

Set the axis font

为特定轴的刻度标签分配字体

◆ setAxisPen()

void QwtPolarGrid::setAxisPen ( int  axisId,
const QPen &  pen 
)

Set the axis pen

为绘制轴分配画笔

◆ setAzimuthScaleDraw()

void QwtPolarGrid::setAzimuthScaleDraw ( QwtRoundScaleDraw scaleDraw)

Set the azimuth scale draw

为方位角刻度设置刻度绘制器

◆ setDisplayFlag()

void QwtPolarGrid::setDisplayFlag ( DisplayFlag  flag,
bool  on = true 
)

Set a display flag

更改显示标志

◆ setFont()

void QwtPolarGrid::setFont ( const QFont &  font)

Set the font

为所有刻度标签分配字体

◆ setGridAttribute()

void QwtPolarGrid::setGridAttribute ( GridAttribute  attribute,
bool  on = true 
)

Set a grid attribute

指定网格的属性

◆ setMajorGridPen() [1/2]

void QwtPolarGrid::setMajorGridPen ( const QPen &  pen)

Set the major grid pen

为主网格线分配画笔

◆ setMajorGridPen() [2/2]

void QwtPolarGrid::setMajorGridPen ( int  scaleId,
const QPen &  pen 
)

Set the major grid pen for a scale

为特定刻度的主网格线分配画笔

◆ setMinorGridPen() [1/2]

void QwtPolarGrid::setMinorGridPen ( const QPen &  pen)

Set the minor grid pen

为次网格线分配画笔

◆ setMinorGridPen() [2/2]

void QwtPolarGrid::setMinorGridPen ( int  scaleId,
const QPen &  pen 
)

Set the minor grid pen for a scale

为特定刻度的次网格线分配画笔

◆ setPen()

void QwtPolarGrid::setPen ( const QPen &  pen)

Set the pen

为所有轴和网格线分配画笔

◆ setScaleDraw()

void QwtPolarGrid::setScaleDraw ( int  axisId,
QwtScaleDraw scaleDraw 
)

Set the scale draw for an axis

为指定轴设置刻度绘制器

◆ showAxis()

void QwtPolarGrid::showAxis ( int  axisId,
bool  show = true 
)

Show/hide an axis

显示/隐藏轴

◆ showGrid()

void QwtPolarGrid::showGrid ( int  scaleId,
bool  show = true 
)

Show/hide the grid for a scale

显示/隐藏刻度的网格线

◆ showMinorGrid()

void QwtPolarGrid::showMinorGrid ( int  scaleId,
bool  show = true 
)

Show/hide the minor grid for a scale

显示/隐藏刻度的次网格线

◆ testDisplayFlag()

bool QwtPolarGrid::testDisplayFlag ( DisplayFlag  flag) const

Test a display flag

测试显示标志

◆ testGridAttribute()

bool QwtPolarGrid::testGridAttribute ( GridAttribute  attribute) const

Test a grid attribute

测试网格属性

◆ updateScaleDiv()

void QwtPolarGrid::updateScaleDiv ( const QwtScaleDiv azimuthScaleDiv,
const QwtScaleDiv radialScaleDiv,
const QwtInterval interval 
)
overridevirtual

Update the scale division

更新项以响应轴刻度分度的变化

重载 QwtPolarItem .


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