Qwt Polar User's Guide  0.1.0
Public Member Functions | List of all members
QwtPolarMarker Class Reference

#include <qwt_polar_marker.h>

Inheritance diagram for QwtPolarMarker:
Inheritance graph
[legend]

Public Member Functions

 QwtPolarMarker ()
virtual ~QwtPolarMarker ()
virtual int rtti () const
void setPosition (const QwtPolarPoint &)
QwtPolarPoint 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 QwtDoublePoint &pole, double radius, const QwtDoubleRect &canvasRect) const
virtual QwtDoubleInterval boundingInterval (int scaleId) const
- Public Member Functions inherited from QwtPolarItem
 QwtPolarItem (const QwtText &title=QwtText())
virtual ~QwtPolarItem ()
void attach (QwtPolarPlot *plot)
void detach ()
QwtPolarPlotplot () const
void setTitle (const QString &title)
void setTitle (const QwtText &title)
const QwtText & title () const
void setItemAttribute (ItemAttribute, bool on=true)
bool testItemAttribute (ItemAttribute) const
void setRenderHint (RenderHint, bool on=true)
bool testRenderHint (RenderHint) const
double z () const
void setZ (double z)
void show ()
void hide ()
virtual void setVisible (bool)
bool isVisible () const
virtual void itemChanged ()
virtual QWidget * legendItem () const
virtual void updateLegend (QwtLegend *) const
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtDoubleInterval &)
virtual int marginHint () const

Additional Inherited Members

- Public Types inherited from QwtPolarItem
enum  RttiValues {
  Rtti_PolarItem = 0,
  Rtti_PolarGrid,
  Rtti_PolarScale,
  Rtti_PolarMarker,
  Rtti_PolarCurve,
  Rtti_PolarSpectrogram,
  Rtti_PolarUserItem = 1000
}
enum  ItemAttribute {
  Legend = 1,
  AutoScale = 2
}
enum  RenderHint { RenderAntialiased = 1 }

Detailed Description

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.

Constructor & Destructor Documentation

QwtPolarMarker::QwtPolarMarker ( )
explicit

Sets alignment to Qt::AlignCenter, and style to NoLine.

QwtPolarMarker::~QwtPolarMarker ( )
virtual

Destructor.

Member Function Documentation

QwtDoubleInterval 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

Parameters
scaleIdScale index
Returns
bounding interval ( == position )
See Also
position()

Reimplemented from QwtPolarItem.

void QwtPolarMarker::draw ( QPainter *  painter,
const QwtScaleMap &  azimuthMap,
const QwtScaleMap &  radialMap,
const QwtDoublePoint &  pole,
double  radius,
const QwtDoubleRect &  canvasRect 
) const
virtual

Draw the marker

Parameters
painterPainter
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates.
polePosition of the pole in painter coordinates
radiusRadius of the complete plot area in painter coordinates
canvasRectContents rect of the canvas in painter coordinates

Implements QwtPolarItem.

QwtText QwtPolarMarker::label ( ) const
Returns
the label
See Also
setLabel()
Qt::Alignment QwtPolarMarker::labelAlignment ( ) const
Returns
the label alignment
See Also
setLabelAlignment()
QwtPolarPoint QwtPolarMarker::position ( ) const
Returns
Position of the marker
int QwtPolarMarker::rtti ( ) const
virtual
Returns
QwtPolarItem::Rtti_PlotMarker

Reimplemented from QwtPolarItem.

void QwtPolarMarker::setLabel ( const QwtText &  label)

Set the label.

Parameters
labellabel text
See Also
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.

Parameters
alignAlignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlgnHCenter, AlignVCenter.
See Also
labelAlignment()
void QwtPolarMarker::setPosition ( const QwtPolarPoint pos)

Change the position of the marker.

void QwtPolarMarker::setSymbol ( const QwtSymbol &  s)

Assign a symbol.

Parameters
sNew symbol
See Also
symbol()
const QwtSymbol & QwtPolarMarker::symbol ( ) const
Returns
the symbol
See Also
setSymbol(), QwtSymbol