Qwt Polar User's Guide
1.0.1
|
#include <qwt_polar_marker.h>
Public Member Functions | |
QwtPolarMarker () | |
virtual | ~QwtPolarMarker () |
virtual int | rtti () const |
void | setPosition (const QwtPointPolar &) |
QwtPointPolar | position () const |
void | setSymbol (const QwtSymbol *s) |
const QwtSymbol * | symbol () const |
void | setLabel (const QwtText &) |
QwtText | label () const |
void | setLabelAlignment (Qt::Alignment) |
Qt::Alignment | labelAlignment () const |
virtual void | draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const |
virtual QwtInterval | boundingInterval (int scaleId) const |
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.
QwtPolarMarker::QwtPolarMarker | ( | ) | [explicit] |
Sets alignment to Qt::AlignCenter, and style to NoLine.
QwtPolarMarker::~QwtPolarMarker | ( | ) | [virtual] |
Destructor.
QwtInterval QwtPolarMarker::boundingInterval | ( | int | scaleId | ) | const [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.
void QwtPolarMarker::draw | ( | QPainter * | painter, |
const QwtScaleMap & | azimuthMap, | ||
const QwtScaleMap & | radialMap, | ||
const QPointF & | pole, | ||
double | radius, | ||
const QRectF & | canvasRect | ||
) | const [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.
QwtText QwtPolarMarker::label | ( | ) | const |
Qt::Alignment QwtPolarMarker::labelAlignment | ( | ) | const |
QwtPointPolar QwtPolarMarker::position | ( | ) | const |
int QwtPolarMarker::rtti | ( | ) | const [virtual] |
Reimplemented from QwtPolarItem.
void QwtPolarMarker::setLabel | ( | const QwtText & | label | ) |
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. |
void QwtPolarMarker::setPosition | ( | const QwtPointPolar & | pos | ) |
Change the position of the marker.
void QwtPolarMarker::setSymbol | ( | const QwtSymbol * | symbol | ) |
const QwtSymbol * QwtPolarMarker::symbol | ( | ) | const |