QWT 7.0.1
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
QwtPolarMarker Class Reference

A class for drawing markers. More...

#include <qwt_polar_marker.h>

Inheritance diagram for QwtPolarMarker:
QwtPolarItem

Classes

class  PrivateData
 

Public Member Functions

 QwtPolarMarker ()
 Sets alignment to Qt::AlignCenter, and style to NoLine.
 
virtual ~QwtPolarMarker ()
 Destructor.
 
virtual int rtti () const QWT_OVERRIDE
 
void setPosition (const QwtPointPolar &)
 Change the position of the marker.
 
QwtPointPolar position () const
 
void setSymbol (const QwtSymbol *s)
 Assign a symbol.
 
const QwtSymbolsymbol () const
 
void setLabel (const QwtText &)
 Set the label.
 
QwtText label () const
 
void setLabelAlignment (Qt::Alignment)
 Set the alignment of the label.
 
Qt::Alignment labelAlignment () const
 
virtual void draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const QWT_OVERRIDE
 Draw the marker.
 
virtual QwtInterval boundingInterval (int scaleId) const QWT_OVERRIDE
 Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling.
 
- Public Member Functions inherited from QwtPolarItem
 QwtPolarItem (const QwtText &title=QwtText())
 Constructor.
 
virtual ~QwtPolarItem ()
 Destroy the QwtPolarItem.
 
void attach (QwtPolarPlot *plot)
 Attach the item to a plot.
 
void detach ()
 This method detaches a QwtPolarItem from the QwtPolarPlot it has been associated with.
 
QwtPolarPlotplot () const
 
void setTitle (const QString &title)
 Set a new title.
 
void setTitle (const QwtText &title)
 Set a new title.
 
const QwtTexttitle () const
 
void setItemAttribute (ItemAttribute, bool on=true)
 Toggle an item attribute.
 
bool testItemAttribute (ItemAttribute) const
 Test an item attribute.
 
void setRenderHint (RenderHint, bool on=true)
 Toggle an render hint.
 
bool testRenderHint (RenderHint) const
 Test a render hint.
 
void setRenderThreadCount (uint numThreads)
 On multi core systems rendering of certain plot item ( f.e QwtPolarSpectrogram ) can be done in parallel in several threads.
 
uint renderThreadCount () const
 
double z () const
 Plot items are painted in increasing z-order.
 
void setZ (double z)
 Set the z value.
 
void show ()
 Show the item.
 
void hide ()
 Hide the item.
 
virtual void setVisible (bool)
 Show/Hide the item.
 
bool isVisible () const
 
virtual void itemChanged ()
 Update the legend and call QwtPolarPlot::autoRefresh for the parent plot.
 
virtual void legendChanged ()
 Update the legend of the parent plot.
 
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &)
 Update the item to changes of the axes scale division.
 
virtual int marginHint () const
 Some items like to display something (f.e.
 
void setLegendIconSize (const QSize &)
 Set the size of the legend icon.
 
QSize legendIconSize () const
 
virtual QList< QwtLegendDatalegendData () const
 Return all information, that is needed to represent the item on the legend.
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const
 

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...
 

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.

Member Function Documentation

◆ boundingInterval()

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.

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

Reimplemented from QwtPolarItem.

◆ draw()

void QwtPolarMarker::draw ( QPainter *  painter,
const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
double  radius,
const QRectF &  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.

◆ label()

QwtText QwtPolarMarker::label ( ) const
Returns
the label
See also
setLabel()

◆ labelAlignment()

Qt::Alignment QwtPolarMarker::labelAlignment ( ) const
Returns
the label alignment
See also
setLabelAlignment()

◆ position()

QwtPointPolar QwtPolarMarker::position ( ) const
Returns
Position of the marker

◆ rtti()

int QwtPolarMarker::rtti ( ) const
virtual
Returns
QwtPolarItem::Rtti_PlotMarker

Reimplemented from QwtPolarItem.

◆ setLabel()

void QwtPolarMarker::setLabel ( const QwtText label)

Set the label.

Parameters
labellabel text
See also
label()

◆ setLabelAlignment()

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()

◆ setSymbol()

void QwtPolarMarker::setSymbol ( const QwtSymbol symbol)

Assign a symbol.

Parameters
symbolNew symbol
See also
symbol()

◆ symbol()

const QwtSymbol * QwtPolarMarker::symbol ( ) const
Returns
the symbol
See also
setSymbol(), QwtSymbol

The documentation for this class was generated from the following files: