A class for drawing markers. More...
#include <qwt_polar_marker.h>
Classes | |
class | PrivateData |
Public Member Functions | |
virtual QwtInterval | boundingInterval (int scaleId) const QWT_OVERRIDE |
virtual void | draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const QWT_OVERRIDE |
QwtText | label () const |
Qt::Alignment | labelAlignment () const |
QwtPointPolar | position () const |
QwtPolarMarker () | |
Sets alignment to Qt::AlignCenter, and style to NoLine. More... | |
virtual int | rtti () const QWT_OVERRIDE |
void | setLabel (const QwtText &) |
Set the label. More... | |
void | setLabelAlignment (Qt::Alignment) |
Set the alignment of the label. More... | |
void | setPosition (const QwtPointPolar &) |
Change the position of the marker. More... | |
void | setSymbol (const QwtSymbol *s) |
Assign a symbol. More... | |
const QwtSymbol * | symbol () const |
virtual | ~QwtPolarMarker () |
Destructor. More... | |
Public Member Functions inherited from QwtPolarItem | |
void | attach (QwtPolarPlot *plot) |
Attach the item to a plot. More... | |
void | detach () |
This method detaches a QwtPolarItem from the QwtPolarPlot it has been associated with. More... | |
void | hide () |
Hide the item. More... | |
bool | isVisible () const |
virtual void | itemChanged () |
virtual void | legendChanged () |
virtual QList< QwtLegendData > | legendData () const |
Return all information, that is needed to represent the item on the legend. More... | |
virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
QSize | legendIconSize () const |
virtual int | marginHint () const |
QwtPolarPlot * | plot () const |
QwtPolarItem (const QwtText &title=QwtText()) | |
uint | renderThreadCount () const |
void | setItemAttribute (ItemAttribute, bool on=true) |
void | setLegendIconSize (const QSize &) |
void | setRenderHint (RenderHint, bool on=true) |
void | setRenderThreadCount (uint numThreads) |
void | setTitle (const QString &title) |
void | setTitle (const QwtText &title) |
virtual void | setVisible (bool) |
void | setZ (double z) |
Set the z value. More... | |
void | show () |
Show the item. More... | |
bool | testItemAttribute (ItemAttribute) const |
bool | testRenderHint (RenderHint) const |
const QwtText & | title () const |
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &) |
Update the item to changes of the axes scale division. More... | |
double | z () const |
virtual | ~QwtPolarItem () |
Destroy the QwtPolarItem. More... | |
Private Attributes | |
PrivateData * | m_data |
Additional Inherited Members | |
Public Types inherited from QwtPolarItem | |
enum | ItemAttribute { Legend = 0x01, AutoScale = 0x02 } |
Plot Item Attributes. More... | |
enum | RenderHint { RenderAntialiased = 0x01 } |
Render hints. More... | |
enum | RttiValues { Rtti_PolarItem = 0, Rtti_PolarGrid, Rtti_PolarMarker, Rtti_PolarCurve, Rtti_PolarSpectrogram, Rtti_PolarUserItem = 1000 } |
Runtime type information. 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.
Definition at line 36 of file qwt_polar_marker.h.
|
explicit |
Sets alignment to Qt::AlignCenter, and style to NoLine.
Definition at line 42 of file qwt_polar_marker.cpp.
|
virtual |
Destructor.
Definition at line 52 of file qwt_polar_marker.cpp.
|
virtual |
Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling
scaleId | Scale index |
Reimplemented from QwtPolarItem.
Definition at line 228 of file qwt_polar_marker.cpp.
|
virtual |
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.
Definition at line 89 of file qwt_polar_marker.cpp.
QwtText QwtPolarMarker::label | ( | ) | const |
Qt::Alignment QwtPolarMarker::labelAlignment | ( | ) | const |
Definition at line 214 of file qwt_polar_marker.cpp.
QwtPointPolar QwtPolarMarker::position | ( | ) | const |
Definition at line 64 of file qwt_polar_marker.cpp.
|
virtual |
Reimplemented from QwtPolarItem.
Definition at line 58 of file qwt_polar_marker.cpp.
void QwtPolarMarker::setLabel | ( | const QwtText & | label | ) |
Set the label.
label | label text |
Definition at line 172 of file qwt_polar_marker.cpp.
void QwtPolarMarker::setLabelAlignment | ( | Qt::Alignment | align | ) |
Set the alignment of the label.
The alignment determines where the label is drawn relative to the marker's position.
align | Alignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlgnHCenter, AlignVCenter. |
Definition at line 201 of file qwt_polar_marker.cpp.
void QwtPolarMarker::setPosition | ( | const QwtPointPolar & | pos | ) |
Change the position of the marker.
Definition at line 70 of file qwt_polar_marker.cpp.
void QwtPolarMarker::setSymbol | ( | const QwtSymbol * | symbol | ) |
Assign a symbol.
symbol | New symbol |
Definition at line 148 of file qwt_polar_marker.cpp.
const QwtSymbol * QwtPolarMarker::symbol | ( | ) | const |
Definition at line 162 of file qwt_polar_marker.cpp.
|
private |
Definition at line 64 of file qwt_polar_marker.h.