|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
显示极坐标系的绘图控件 更多...
#include <qwt_polar_plot.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | LegendPosition { LeftLegend , RightLegend , BottomLegend , TopLegend , ExternalLegend } |
| 图例相对于画布的位置 更多... | |
Public 槽 | |
| virtual void | replot () |
| Replot the plot | |
| void | autoRefresh () |
| Auto refresh the plot | |
| void | setAzimuthOrigin (double) |
| Set the azimuth origin | |
信号 | |
| void | itemAttached (QwtPolarItem *plotItem, bool on) |
| A signal indicating, that an item has been attached/detached 表示绘图项已附加/分离的信号 | |
| void | legendDataChanged (const QVariant &itemInfo, const QList< QwtLegendData > &data) |
| A signal with the attributes how to update the legend entries for a plot item 包含如何更新绘图项图例条目属性的信号 | |
| void | layoutChanged () |
| A signal that is emitted, whenever the layout of the plot has been recalculated 当绘图的布局重新计算时发出的信号 | |
Public 成员函数 | |
| QwtPolarPlot (QWidget *parent=nullptr) | |
| Constructor | |
| QwtPolarPlot (const QwtText &title, QWidget *parent=nullptr) | |
| Constructor with title | |
| virtual | ~QwtPolarPlot () |
| Destructor | |
| void | setTitle (const QString &) |
| Set the title | |
| void | setTitle (const QwtText &) |
| Set the title | |
| QwtText | title () const |
| Get the title | |
| QwtTextLabel * | titleLabel () |
| Get the title label | |
| const QwtTextLabel * | titleLabel () const |
| Get the title label (const version) | |
| void | setAutoReplot (bool tf=true) |
| Set auto replot | |
| bool | autoReplot () const |
| Get auto replot | |
| void | setAutoScale (int scaleId) |
| Set auto scale for a scale | |
| bool | hasAutoScale (int scaleId) const |
| Check if a scale has auto scale | |
| void | setScaleMaxMinor (int scaleId, int maxMinor) |
| Set the maximum number of minor ticks for a scale | |
| int | scaleMaxMinor (int scaleId) const |
| Get the maximum number of minor ticks for a scale | |
| int | scaleMaxMajor (int scaleId) const |
| Get the maximum number of major ticks for a scale | |
| void | setScaleMaxMajor (int scaleId, int maxMajor) |
| Set the maximum number of major ticks for a scale | |
| QwtScaleEngine * | scaleEngine (int scaleId) |
| Get the scale engine for a scale | |
| const QwtScaleEngine * | scaleEngine (int scaleId) const |
| Get the scale engine for a scale (const version) | |
| void | setScaleEngine (int scaleId, QwtScaleEngine *) |
| Set the scale engine for a scale | |
| void | setScale (int scaleId, double min, double max, double step=0) |
| Set the scale for a scale | |
| void | setScaleDiv (int scaleId, const QwtScaleDiv &) |
| Set the scale division for a scale | |
| const QwtScaleDiv * | scaleDiv (int scaleId) const |
| Get the scale division for a scale (const version) | |
| QwtScaleDiv * | scaleDiv (int scaleId) |
| Get the scale division for a scale | |
| QwtScaleMap | scaleMap (int scaleId, double radius) const |
| Get the scale map for a scale with radius | |
| QwtScaleMap | scaleMap (int scaleId) const |
| Get the scale map for a scale | |
| void | updateScale (int scaleId) |
| Update a scale | |
| double | azimuthOrigin () const |
| Get the azimuth origin | |
| void | zoom (const QwtPointPolar &, double factor) |
| Zoom to a position with a factor | |
| void | unzoom () |
| Unzoom the plot | |
| QwtPointPolar | zoomPos () const |
| Get the zoom position | |
| double | zoomFactor () const |
| Get the zoom factor | |
| QwtPolarCanvas * | canvas () |
| Get the canvas | |
| const QwtPolarCanvas * | canvas () const |
| Get the canvas (const version) | |
| void | setPlotBackground (const QBrush &c) |
| Set the plot background | |
| const QBrush & | plotBackground () const |
| Get the plot background | |
| virtual void | drawCanvas (QPainter *, const QRectF &) const |
| Draw the canvas | |
| void | insertLegend (QwtAbstractLegend *, LegendPosition=RightLegend, double ratio=-1.0) |
| Insert a legend | |
| QwtAbstractLegend * | legend () |
| Get the legend | |
| const QwtAbstractLegend * | legend () const |
| Get the legend (const version) | |
| void | updateLegend () |
| Update the legend | |
| void | updateLegend (const QwtPolarItem *) |
| Update the legend for an item | |
| QwtPolarLayout * | plotLayout () |
| Get the plot layout | |
| const QwtPolarLayout * | plotLayout () const |
| Get the plot layout (const version) | |
| QwtInterval | visibleInterval () const |
| Get the visible interval | |
| QRectF | plotRect () const |
| Get the plot rectangle | |
| QRectF | plotRect (const QRectF &) const |
| Get the plot rectangle for a given rectangle | |
| int | plotMarginHint () const |
| Get the plot margin hint | |
| virtual QVariant | itemToInfo (QwtPolarItem *) const |
| Convert an item to info | |
| virtual QwtPolarItem * | infoToItem (const QVariant &) const |
| Convert info to an item | |
Public 成员函数 继承自 QwtPolarItemDict | |
| QwtPolarItemDict () | |
| Constructor | |
| ~QwtPolarItemDict () | |
| Destructor | |
| void | setAutoDelete (bool) |
| Set auto delete | |
| bool | autoDelete () const |
| Get auto delete | |
| const QwtPolarItemList & | itemList () const |
| Get the item list | |
| void | detachItems (int rtti=QwtPolarItem::Rtti_PolarItem, bool autoDelete=true) |
| Detach items | |
Protected 成员函数 | |
| virtual bool | event (QEvent *) override |
| Handle events | |
| virtual void | resizeEvent (QResizeEvent *) override |
| Handle resize events | |
| virtual void | updateLayout () |
| Update the layout | |
| virtual void | drawItems (QPainter *painter, const QwtScaleMap &radialMap, const QwtScaleMap &azimuthMap, const QPointF &pole, double radius, const QRectF &canvasRect) const |
| Draw items | |
Protected 成员函数 继承自 QwtPolarItemDict | |
| void | insertItem (QwtPolarItem *) |
| Insert an item | |
| void | removeItem (QwtPolarItem *) |
| Remove an item | |
属性 | |
| QBrush | plotBackground |
| double | azimuthOrigin |
友元 | |
| class | QwtPolarItem |
显示极坐标系的绘图控件
图例相对于画布的位置
| 枚举值 | |
|---|---|
| LeftLegend | The legend will be left from the canvas |
| RightLegend | The legend will be right from the canvas |
| BottomLegend | The legend will be below the canvas |
| TopLegend | The legend will be between canvas and title |
| ExternalLegend | 外部意味着只有图例的内容由 QwtPlot 处理,而不是其几何形状。 如果应用程序希望在外部窗口(或在画布上)放置图例,这可能很有用。
|
|
explicit |
Constructor
构造函数
| QwtPolarPlot::QwtPolarPlot | ( | const QwtText & | title, |
| QWidget * | parent = nullptr |
||
| ) |
Constructor with title
带标题的构造函数
|
virtual |
Destructor
析构函数
|
slot |
Auto refresh the plot
如果 autoReplot() 为 true 则重新绘制绘图
| bool QwtPolarPlot::autoReplot | ( | ) | const |
Get auto replot
检查是否设置了自动重绘选项
| double QwtPolarPlot::azimuthOrigin | ( | ) | const |
Get the azimuth origin
获取方位角刻度的原点
| QwtPolarCanvas * QwtPolarPlot::canvas | ( | ) |
Get the canvas
获取绘图的画布
| const QwtPolarCanvas * QwtPolarPlot::canvas | ( | ) | const |
Get the canvas (const version)
获取绘图的画布(常量版本)
|
virtual |
Draw the canvas
重绘画布
|
protectedvirtual |
Draw items
重绘画布项
|
overrideprotectedvirtual |
Handle events
Qt 事件处理器
| bool QwtPolarPlot::hasAutoScale | ( | int | scaleId | ) | const |
Check if a scale has auto scale
检查是否启用了自动缩放
|
virtual |
Convert info to an item
根据项信息对象标识绘图项
| void QwtPolarPlot::insertLegend | ( | QwtAbstractLegend * | legend, |
| QwtPolarPlot::LegendPosition | pos = RightLegend, |
||
| double | ratio = -1.0 |
||
| ) |
Insert a legend
插入图例
|
signal |
A signal indicating, that an item has been attached/detached 表示绘图项已附加/分离的信号
| plotItem | Plot item / 绘图项 |
| on | Attached/Detached / 附加/分离 |
|
virtual |
Convert an item to info
构建信息对象以在图例上标识绘图项
| QwtAbstractLegend * QwtPolarPlot::legend | ( | ) |
Get the legend
获取绘图的图例
| const QwtAbstractLegend * QwtPolarPlot::legend | ( | ) | const |
Get the legend (const version)
获取绘图的图例(常量版本)
|
signal |
A signal with the attributes how to update the legend entries for a plot item 包含如何更新绘图项图例条目属性的信号
| itemInfo | Info about a plot, build from itemToInfo() / 关于绘图的信息,由 itemToInfo() 构建 |
| data | Attributes of the entries ( usually <= 1 ) for the plot item / 绘图项的条目属性(通常 <= 1) |
| const QBrush & QwtPolarPlot::plotBackground | ( | ) | const |
Get the plot background
获取绘图背景画刷
| QwtPolarLayout * QwtPolarPlot::plotLayout | ( | ) |
Get the plot layout
获取负责绘图组件几何形状的布局
| const QwtPolarLayout * QwtPolarPlot::plotLayout | ( | ) | const |
Get the plot layout (const version)
获取负责绘图组件几何形状的布局(常量版本)
| int QwtPolarPlot::plotMarginHint | ( | ) | const |
Get the plot margin hint
获取所有项边距提示的最大值
| QRectF QwtPolarPlot::plotRect | ( | ) | const |
Get the plot rectangle
获取绘图区域的边界矩形
| QRectF QwtPolarPlot::plotRect | ( | const QRectF & | canvasRect | ) | const |
Get the plot rectangle for a given rectangle
计算绘图区域的边界矩形
|
virtualslot |
Replot the plot
重绘绘图
|
overrideprotectedvirtual |
Handle resize events
调整大小并更新内部布局
| QwtScaleDiv * QwtPolarPlot::scaleDiv | ( | int | scaleId | ) |
Get the scale division for a scale
返回指定刻度的刻度划分
| const QwtScaleDiv * QwtPolarPlot::scaleDiv | ( | int | scaleId | ) | const |
Get the scale division for a scale (const version)
返回指定刻度的刻度划分
| QwtScaleEngine * QwtPolarPlot::scaleEngine | ( | int | scaleId | ) |
Get the scale engine for a scale
获取特定刻度的刻度引擎
| const QwtScaleEngine * QwtPolarPlot::scaleEngine | ( | int | scaleId | ) | const |
Get the scale engine for a scale (const version)
获取特定刻度的刻度引擎(常量版本)
| QwtScaleMap QwtPolarPlot::scaleMap | ( | int | scaleId | ) | const |
Get the scale map for a scale
构建刻度映射
| QwtScaleMap QwtPolarPlot::scaleMap | ( | int | scaleId, |
| double | radius | ||
| ) | const |
Get the scale map for a scale with radius
构建带有指定半径的刻度映射
| int QwtPolarPlot::scaleMaxMajor | ( | int | scaleId | ) | const |
Get the maximum number of major ticks for a scale
获取指定轴的最大主要刻度数
| int QwtPolarPlot::scaleMaxMinor | ( | int | scaleId | ) | const |
Get the maximum number of minor ticks for a scale
获取指定轴的最大次要刻度数
| void QwtPolarPlot::setAutoReplot | ( | bool | enable = true | ) |
Set auto replot
设置或重置自动重绘选项
| void QwtPolarPlot::setAutoScale | ( | int | scaleId | ) |
Set auto scale for a scale
启用自动缩放
|
slot |
Set the azimuth origin
更改方位角刻度的原点
| void QwtPolarPlot::setPlotBackground | ( | const QBrush & | brush | ) |
Set the plot background
设置绘图区域的背景
| void QwtPolarPlot::setScale | ( | int | scaleId, |
| double | min, | ||
| double | max, | ||
| double | stepSize = 0 |
||
| ) |
Set the scale for a scale
禁用自动缩放并指定选定刻度的固定刻度
| void QwtPolarPlot::setScaleDiv | ( | int | scaleId, |
| const QwtScaleDiv & | scaleDiv | ||
| ) |
Set the scale division for a scale
禁用自动缩放并指定选定刻度的固定刻度
| void QwtPolarPlot::setScaleEngine | ( | int | scaleId, |
| QwtScaleEngine * | scaleEngine | ||
| ) |
Set the scale engine for a scale
更改轴的刻度引擎
| void QwtPolarPlot::setScaleMaxMajor | ( | int | scaleId, |
| int | maxMajor | ||
| ) |
Set the maximum number of major ticks for a scale
设置指定刻度的最大主要刻度间隔数
| void QwtPolarPlot::setScaleMaxMinor | ( | int | scaleId, |
| int | maxMinor | ||
| ) |
Set the maximum number of minor ticks for a scale
设置指定刻度的最大次要刻度间隔数
| void QwtPolarPlot::setTitle | ( | const QString & | title | ) |
Set the title
更改绘图的标题
| void QwtPolarPlot::setTitle | ( | const QwtText & | title | ) |
Set the title
更改绘图的标题
| QwtText QwtPolarPlot::title | ( | ) | const |
Get the title
获取绘图的标题
| QwtTextLabel * QwtPolarPlot::titleLabel | ( | ) |
Get the title label
获取标题标签控件
| const QwtTextLabel * QwtPolarPlot::titleLabel | ( | ) | const |
Get the title label (const version)
获取标题标签控件(常量版本)
| void QwtPolarPlot::unzoom | ( | ) |
Unzoom the plot
取消绘图的缩放
|
protectedvirtual |
Update the layout
重建布局
| void QwtPolarPlot::updateLegend | ( | ) |
Update the legend
为所有绘图项发出 legendDataChanged() 信号
| void QwtPolarPlot::updateLegend | ( | const QwtPolarItem * | plotItem | ) |
Update the legend for an item
为绘图项发出 legendDataChanged() 信号
| void QwtPolarPlot::updateScale | ( | int | scaleId | ) |
Update a scale
重建刻度
| QwtInterval QwtPolarPlot::visibleInterval | ( | ) | const |
Get the visible interval
获取画布上可见的径向刻度的边界区间
| void QwtPolarPlot::zoom | ( | const QwtPointPolar & | zoomPos, |
| double | zoomFactor | ||
| ) |
Zoom to a position with a factor
平移和增/减缩放因子
| double QwtPolarPlot::zoomFactor | ( | ) | const |
Get the zoom factor
获取缩放因子
| QwtPointPolar QwtPolarPlot::zoomPos | ( | ) | const |
Get the zoom position
获取缩放位置