|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
Base class for items on a polar plot. More...
#include <qwt_polar_item.h>
Classes | |
| class | PrivateData |
Public Types | |
| 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 Member Functions | |
| 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. | |
| QwtPolarPlot * | plot () 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 QwtText & | title () const |
| Get the title. | |
| virtual int | rtti () const |
| Get the runtime type information. | |
| 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 void | draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const =0 |
| virtual QwtInterval | boundingInterval (int scaleId) const |
| Get the bounding interval for a scale. | |
| virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &) |
| Update the scale division. | |
| virtual int | marginHint () const |
| Get the margin hint. | |
| void | setLegendIconSize (const QSize &) |
| Set the legend icon size. | |
| QSize | legendIconSize () const |
| Get the legend icon size. | |
| virtual QList< QwtLegendData > | legendData () const |
| Get the legend data. | |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
| Get the legend icon. | |
Base class for items on a polar plot.
Plot Item Attributes
| Enumerator | |
|---|---|
| Legend | The item is represented on the legend. |
| AutoScale | The boundingRect() of the item is included in the autoscaling calculation. |
Render hints
| Enumerator | |
|---|---|
| RenderAntialiased | Enable antialiasing. |
Runtime type information
RttiValues is used to cast plot items, without having to enable runtime type information of the compiler.
| Enumerator | |
|---|---|
| Rtti_PolarItem | Unspecific value, that can be used, when it doesn't matter. |
| Rtti_PolarGrid | For QwtPolarGrid. |
| Rtti_PolarMarker | For QwtPolarMarker. |
| Rtti_PolarCurve | For QwtPolarCurve. |
| Rtti_PolarSpectrogram | For QwtPolarSpectrogram. |
| Rtti_PolarUserItem | Values >= Rtti_PolarUserItem are reserved for plot items not implemented in the QwtPolar library. |
|
virtual |
Destructor.
Destructor
.
| void QwtPolarItem::attach | ( | QwtPolarPlot * | plot | ) |
Attach the item to a plot.
|
virtual |
Get the bounding interval for a scale.
Reimplemented in QwtPolarCurve, QwtPolarMarker, and QwtPolarSpectrogram.
| void QwtPolarItem::detach | ( | ) |
Detach the item from its plot.
Detach the item from its associated plot.
|
pure virtual |
Draw the item
| [in] | painter | Painter |
| [in] | azimuthMap | Maps azimuth values to values related to 0.0, M_2PI |
| [in] | radialMap | Maps radius values into painter coordinates |
| [in] | pole | Position of the pole in painter coordinates |
| [in] | radius | Radius of the complete plot area in painter coordinates |
| [in] | canvasRect | Contents rect of the canvas in painter coordinates |
Implemented in QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and QwtPolarSpectrogram.
| void QwtPolarItem::hide | ( | ) |
Hide the item.
Hide the item
| bool QwtPolarItem::isVisible | ( | ) | const |
Get the visibility.
Check if the item is visible.
|
virtual |
Update the item and trigger autoRefresh.
Update the legend and call QwtPolarPlot::autoRefresh for the parent plot.
|
virtual |
Update the legend.
Update the legend of the parent plot.
|
virtual |
Get the legend data.
Return all information that is needed to represent the item on the legend.
|
virtual |
| QSize QwtPolarItem::legendIconSize | ( | ) | const |
Get the legend icon size.
|
virtual |
Get the margin hint.
Reimplemented in QwtPolarGrid.
| QwtPolarPlot * QwtPolarItem::plot | ( | ) | const |
Get the attached plot.
| uint QwtPolarItem::renderThreadCount | ( | ) | const |
Get the number of render threads.
|
virtual |
Get the runtime type information.
Get runtime type information for the specific class represented.
Reimplemented in QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and QwtPolarSpectrogram.
| void QwtPolarItem::setItemAttribute | ( | ItemAttribute | attribute, |
| bool | on = true |
||
| ) |
Set an item attribute.
Toggle an item attribute.
| void QwtPolarItem::setLegendIconSize | ( | const QSize & | size | ) |
Set the legend icon size.
Set the size of the legend icon.
| void QwtPolarItem::setRenderHint | ( | RenderHint | hint, |
| bool | on = true |
||
| ) |
Set a render hint.
Toggle a render hint.
| void QwtPolarItem::setRenderThreadCount | ( | uint | numThreads | ) |
Set the number of render threads.
| void QwtPolarItem::setTitle | ( | const QString & | title | ) |
Set the title from a QString.
Set a new title.
|
virtual |
Set the visibility.
Show/Hide the item.
| void QwtPolarItem::setZ | ( | double | z | ) |
Set the z value.
| void QwtPolarItem::show | ( | ) |
Show the item.
Show the item
| bool QwtPolarItem::testItemAttribute | ( | ItemAttribute | attribute | ) | const |
Test an item attribute.
| bool QwtPolarItem::testRenderHint | ( | RenderHint | hint | ) | const |
Test a render hint.
| const QwtText & QwtPolarItem::title | ( | ) | const |
Get the title.
Get the title of the item.
|
virtual |
Update the scale division.
Update the item to changes of the axes scale division.
Reimplemented in QwtPolarGrid.
| double QwtPolarItem::z | ( | ) | const |
Get the z value.