QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
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 ()
 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 QwtSymbolsymbol () 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.
 
QwtPolarPlotplot () 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 QwtTexttitle () 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< QwtLegendDatalegendData () 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...
 

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::QwtPolarMarker ( )
explicit

Constructor.

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

Destructor

Member Function Documentation

◆ boundingInterval()

QwtInterval QwtPolarMarker::boundingInterval ( int  scaleId) const
overridevirtual

Get the bounding interval for a scale.

Get the bounding interval necessary to display the item.

Parameters
scaleIdScale index
Returns
Bounding interval (equals position)

This interval can be useful for operations like clipping or autoscaling.

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
overridevirtual

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

Get the label.

Get the label text.

Returns
The label text
See also
setLabel()

◆ labelAlignment()

Qt::Alignment QwtPolarMarker::labelAlignment ( ) const

Get the label alignment.

Returns
The label alignment
See also
setLabelAlignment()

◆ position()

QwtPointPolar QwtPolarMarker::position ( ) const

Get the position.

Get the position of the marker.

Returns
Position of the marker
See also
setPosition()

◆ rtti()

int QwtPolarMarker::rtti ( ) const
overridevirtual

Get the runtime type information.

Returns
QwtPolarItem::Rtti_PolarMarker

Reimplemented from QwtPolarItem.

◆ setLabel()

void QwtPolarMarker::setLabel ( const QwtText label)

Set the label.

Set the label text.

Parameters
labelLabel text
See also
label()

◆ setLabelAlignment()

void QwtPolarMarker::setLabelAlignment ( Qt::Alignment  align)

Set the label alignment.

Set the alignment of the label.

Parameters
alignAlignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlignHCenter, AlignVCenter.

The alignment determines where the label is drawn relative to the marker's position.

See also
labelAlignment()

◆ setPosition()

void QwtPolarMarker::setPosition ( const QwtPointPolar pos)

Set the position.

Set the position of the marker.

Parameters
posNew position of the marker
See also
position()

◆ setSymbol()

void QwtPolarMarker::setSymbol ( const QwtSymbol symbol)

Set the symbol.

Assign a symbol.

Parameters
symbolNew symbol (ownership is transferred)
See also
symbol(), QwtSymbol

◆ symbol()

const QwtSymbol * QwtPolarMarker::symbol ( ) const

Get the symbol.

Get the current symbol.

Returns
The current symbol
See also
setSymbol(), QwtSymbol

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