|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
A class for drawing markers. More...
#include <qwt_polar_marker.h>
Classes | |
| class | PrivateData |
Public Member Functions | |
| QwtPolarMarker () | |
| Constructor. | |
| ~QwtPolarMarker () override | |
| Destructor. | |
| virtual int | rtti () const override |
| Get the runtime type information. | |
| void | setPosition (const QwtPointPolar &) |
| Set the position. | |
| QwtPointPolar | position () const |
| Get the position. | |
| void | setSymbol (const QwtSymbol *s) |
| Set the symbol. | |
| const QwtSymbol * | symbol () const |
| Get the symbol. | |
| void | setLabel (const QwtText &) |
| Set the label. | |
| QwtText | label () const |
| Get the label. | |
| void | setLabelAlignment (Qt::Alignment) |
| Set the label alignment. | |
| Qt::Alignment | labelAlignment () const |
| Get the label alignment. | |
| virtual void | draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const override |
| Draw the marker. | |
| virtual QwtInterval | boundingInterval (int scaleId) const override |
| Get the bounding interval for a scale. | |
Public Member Functions inherited from 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. | |
| 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. | |
| 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 | 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. | |
Additional Inherited Members | |
Public Types inherited from QwtPolarItem | |
| enum | RttiValues { Rtti_PolarItem = 0 , Rtti_PolarGrid , Rtti_PolarMarker , Rtti_PolarCurve , Rtti_PolarSpectrogram , Rtti_PolarUserItem = 1000 } |
| Runtime type information. More... | |
| enum | ItemAttribute { Legend = 0x01 , AutoScale = 0x02 } |
| Plot Item Attributes. More... | |
| enum | RenderHint { RenderAntialiased = 0x01 } |
| Render hints. More... | |
A class for drawing markers.
A marker can be a a symbol, a label or a combination of them, which can be drawn around a center point inside a bounding rectangle.
The setSymbol() member assigns a symbol to the marker. The symbol is drawn at the specified point.
With setLabel(), a label can be assigned to the marker. The setLabelAlignment() member specifies where the label is drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) are valid. The alignment refers to the center point of the marker, which means, for example, that the label would be painted left above the center point if the alignment was set to AlignLeft|AlignTop.
|
explicit |
Constructor.
Sets alignment to Qt::AlignCenter, and style to NoLine.
Destructor
|
overridevirtual |
Get the bounding interval for a scale.
Get the bounding interval necessary to display the item.
| scaleId | Scale index |
This interval can be useful for operations like clipping or autoscaling.
Reimplemented from QwtPolarItem.
|
overridevirtual |
Draw the marker.
| painter | Painter |
| azimuthMap | Maps azimuth values to values related to 0.0, M_2PI |
| radialMap | Maps radius values into painter coordinates |
| pole | Position of the pole in painter coordinates |
| radius | Radius of the complete plot area in painter coordinates |
| canvasRect | Contents rect of the canvas in painter coordinates |
Implements QwtPolarItem.
| QwtText QwtPolarMarker::label | ( | ) | const |
| Qt::Alignment QwtPolarMarker::labelAlignment | ( | ) | const |
| QwtPointPolar QwtPolarMarker::position | ( | ) | const |
Get the position.
Get the position of the marker.
|
overridevirtual |
Get the runtime type information.
Reimplemented from QwtPolarItem.
| void QwtPolarMarker::setLabel | ( | const QwtText & | label | ) |
| void QwtPolarMarker::setLabelAlignment | ( | Qt::Alignment | align | ) |
Set the label alignment.
Set the alignment of the label.
| align | Alignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlignHCenter, AlignVCenter. |
The alignment determines where the label is drawn relative to the marker's position.
| void QwtPolarMarker::setPosition | ( | const QwtPointPolar & | pos | ) |
Set the position.
Set the position of the marker.
| pos | New position of the marker |
| void QwtPolarMarker::setSymbol | ( | const QwtSymbol * | symbol | ) |
| const QwtSymbol * QwtPolarMarker::symbol | ( | ) | const |