|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
A plotting widget, displaying a polar coordinate system. More...
#include <qwt_polar_plot.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | LegendPosition { LeftLegend , RightLegend , BottomLegend , TopLegend , ExternalLegend } |
| Position of the legend, relative to the canvas. More... | |
Public Slots | |
| virtual void | replot () |
| Replot the plot. | |
| void | autoRefresh () |
| Auto refresh the plot. | |
| void | setAzimuthOrigin (double) |
| Set the azimuth origin. | |
Signals | |
| 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 Member Functions | |
| 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 Member Functions inherited from 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 Member Functions | |
| 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 Member Functions inherited from QwtPolarItemDict | |
| void | insertItem (QwtPolarItem *) |
| Insert an item. | |
| void | removeItem (QwtPolarItem *) |
| Remove an item. | |
Properties | |
| QBrush | plotBackground |
| double | azimuthOrigin |
Friends | |
| class | QwtPolarItem |
A plotting widget, displaying a polar coordinate system.
Position of the legend, relative to the canvas.
| Enumerator | |
|---|---|
| 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 | External means that only the content of the legend will be handled by QwtPlot, but not its geometry. This might be interesting if an application wants to have a legend in an external window ( or on the canvas ).
|
|
explicit |
Constructor.
| QwtPolarPlot::QwtPolarPlot | ( | const QwtText & | title, |
| QWidget * | parent = nullptr |
||
| ) |
Constructor with title.
|
virtual |
Destructor.
Destructor
.
|
slot |
| bool QwtPolarPlot::autoReplot | ( | ) | const |
Get auto replot.
Check if autoReplot option is set.
| double QwtPolarPlot::azimuthOrigin | ( | ) | const |
Get the azimuth origin.
Get the origin of the azimuth scale.
| QwtPolarCanvas * QwtPolarPlot::canvas | ( | ) |
Get the canvas.
Get the plot's canvas.
| const QwtPolarCanvas * QwtPolarPlot::canvas | ( | ) | const |
Get the canvas (const version)
Get the plot's canvas (const version)
|
virtual |
Draw the canvas.
Redraw the canvas.
|
protectedvirtual |
Draw items.
Redraw the canvas items.
|
overrideprotectedvirtual |
Handle events.
Qt event handler.
| bool QwtPolarPlot::hasAutoScale | ( | int | scaleId | ) | const |
Check if a scale has auto scale.
Check if autoscaling is enabled.
|
virtual |
Convert info to an item.
Identify the plot item according to an item info object.
| 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.
Build an information object to identify a plot item on the legend.
| QwtAbstractLegend * QwtPolarPlot::legend | ( | ) |
Get the legend.
Get the plot's legend.
| const QwtAbstractLegend * QwtPolarPlot::legend | ( | ) | const |
Get the legend (const version)
Get the plot's 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.
Get the plot background brush.
| QwtPolarLayout * QwtPolarPlot::plotLayout | ( | ) |
Get the plot layout.
Get the layout responsible for geometry of plot components.
| const QwtPolarLayout * QwtPolarPlot::plotLayout | ( | ) | const |
Get the plot layout (const version)
Get the layout responsible for geometry of plot components (const version)
| int QwtPolarPlot::plotMarginHint | ( | ) | const |
Get the plot margin hint.
Get the maximum of all item margin hints.
| QRectF QwtPolarPlot::plotRect | ( | ) | const |
Get the plot rectangle.
Get the bounding rect of the plot area.
| QRectF QwtPolarPlot::plotRect | ( | const QRectF & | canvasRect | ) | const |
Get the plot rectangle for a given rectangle.
Calculate the bounding rect of the plot area.
|
virtualslot |
Replot the plot.
Redraw the plot.
|
overrideprotectedvirtual |
Handle resize events.
Resize and update internal layout.
| QwtScaleDiv * QwtPolarPlot::scaleDiv | ( | int | scaleId | ) |
Get the scale division for a scale.
Return the scale division of a specified scale.
| const QwtScaleDiv * QwtPolarPlot::scaleDiv | ( | int | scaleId | ) | const |
Get the scale division for a scale (const version)
Return the scale division of a specified scale.
| QwtScaleEngine * QwtPolarPlot::scaleEngine | ( | int | scaleId | ) |
Get the scale engine for a scale.
Get scale engine for a specific scale.
| const QwtScaleEngine * QwtPolarPlot::scaleEngine | ( | int | scaleId | ) | const |
Get the scale engine for a scale (const version)
Get scale engine for a specific scale (const version)
| QwtScaleMap QwtPolarPlot::scaleMap | ( | int | scaleId | ) | const |
Get the scale map for a scale.
Build a scale map.
| QwtScaleMap QwtPolarPlot::scaleMap | ( | int | scaleId, |
| double | radius | ||
| ) | const |
Get the scale map for a scale with radius.
Build a scale map with specified radius.
| int QwtPolarPlot::scaleMaxMajor | ( | int | scaleId | ) | const |
Get the maximum number of major ticks for a scale.
Get the maximum number of major ticks for a specified axis.
| int QwtPolarPlot::scaleMaxMinor | ( | int | scaleId | ) | const |
Get the maximum number of minor ticks for a scale.
Get the maximum number of minor ticks for a specified axis.
| void QwtPolarPlot::setAutoReplot | ( | bool | enable = true | ) |
Set auto replot.
Set or reset the autoReplot option.
| void QwtPolarPlot::setAutoScale | ( | int | scaleId | ) |
Set auto scale for a scale.
Enable autoscaling.
|
slot |
Set the azimuth origin.
Change the origin of the azimuth scale.
| void QwtPolarPlot::setPlotBackground | ( | const QBrush & | brush | ) |
Set the plot background.
Set the background of the plot area.
| void QwtPolarPlot::setScale | ( | int | scaleId, |
| double | min, | ||
| double | max, | ||
| double | stepSize = 0 |
||
| ) |
Set the scale for a scale.
Disable autoscaling and specify a fixed scale for a selected scale.
| void QwtPolarPlot::setScaleDiv | ( | int | scaleId, |
| const QwtScaleDiv & | scaleDiv | ||
| ) |
Set the scale division for a scale.
Disable autoscaling and specify a fixed scale for a selected scale.
| void QwtPolarPlot::setScaleEngine | ( | int | scaleId, |
| QwtScaleEngine * | scaleEngine | ||
| ) |
Set the scale engine for a scale.
Change the scale engine for an axis.
| void QwtPolarPlot::setScaleMaxMajor | ( | int | scaleId, |
| int | maxMajor | ||
| ) |
Set the maximum number of major ticks for a scale.
Set the maximum number of major scale intervals for a specified scale.
| void QwtPolarPlot::setScaleMaxMinor | ( | int | scaleId, |
| int | maxMinor | ||
| ) |
Set the maximum number of minor ticks for a scale.
Set the maximum number of minor scale intervals for a specified scale.
| void QwtPolarPlot::setTitle | ( | const QString & | title | ) |
Set the title.
Change the plot's title.
| void QwtPolarPlot::setTitle | ( | const QwtText & | title | ) |
Set the title.
Change the plot's title.
| QwtText QwtPolarPlot::title | ( | ) | const |
Get the title.
Get the plot's title.
| QwtTextLabel * QwtPolarPlot::titleLabel | ( | ) |
Get the title label.
Get the title label widget.
| const QwtTextLabel * QwtPolarPlot::titleLabel | ( | ) | const |
Get the title label (const version)
Get the title label widget (const version)
| void QwtPolarPlot::unzoom | ( | ) |
Unzoom the plot.
|
protectedvirtual |
Update the layout.
Rebuild the layout
.
| void QwtPolarPlot::updateLegend | ( | ) |
Update the legend.
Emit legendDataChanged() for all plot items.
| void QwtPolarPlot::updateLegend | ( | const QwtPolarItem * | plotItem | ) |
Update the legend for an item.
Emit legendDataChanged() for a plot item.
| void QwtPolarPlot::updateScale | ( | int | scaleId | ) |
Update a scale.
Rebuild the scale.
| QwtInterval QwtPolarPlot::visibleInterval | ( | ) | const |
Get the visible interval.
Get the bounding interval of the radial scale visible on canvas.
| void QwtPolarPlot::zoom | ( | const QwtPointPolar & | zoomPos, |
| double | zoomFactor | ||
| ) |
Zoom to a position with a factor.
Translate and in/decrease the zoom factor.
| double QwtPolarPlot::zoomFactor | ( | ) | const |
Get the zoom factor.
| QwtPointPolar QwtPolarPlot::zoomPos | ( | ) | const |
Get the zoom position.