QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
QwtPolarItem Class Referenceabstract

Base class for items on a polar plot. More...

#include <qwt_polar_item.h>

Inheritance diagram for QwtPolarItem:
QwtPolarCurve QwtPolarGrid QwtPolarMarker QwtPolarSpectrogram

Classes

class  PrivateData
 

Public Types

enum  RttiValues {
  Rtti_PolarItem = 0 , Rtti_PolarGrid , Rtti_PolarMarker , Rtti_PolarCurve ,
  Rtti_PolarSpectrogram , Rtti_PolarUserItem = 1000
}
 
enum  ItemAttribute { Legend = 0x01 , AutoScale = 0x02 }
 
enum  RenderHint { RenderAntialiased = 0x01 }
 

Public Member Functions

 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.
 
virtual int rtti () const
 Get the runtime type information.
 
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 draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const =0
 
virtual QwtInterval boundingInterval (int scaleId) const
 Get the bounding interval for a scale.
 
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.
 

Detailed Description

Base class for items on a polar plot.

Member Enumeration Documentation

◆ ItemAttribute

Plot Item Attributes

See also
setItemAttribute(), testItemAttribute()
Enumerator
Legend 

The item is represented on the legend.

AutoScale 

The boundingRect() of the item is included in the autoscaling calculation.

◆ RenderHint

Render hints

See also
setRenderHint(), testRenderHint()
Enumerator
RenderAntialiased 

Enable antialiasing.

◆ RttiValues

Runtime type information

RttiValues is used to cast plot items, without having to enable runtime type information of the compiler.

Enumerator
Rtti_PolarItem 

Unspecific value, that can be used, when it doesn't matter.

Rtti_PolarGrid 

For QwtPolarGrid.

Rtti_PolarMarker 

For QwtPolarMarker.

Rtti_PolarCurve 

For QwtPolarCurve.

Rtti_PolarSpectrogram 

For QwtPolarSpectrogram.

Rtti_PolarUserItem 

Values >= Rtti_PolarUserItem are reserved for plot items not implemented in the QwtPolar library.

Constructor & Destructor Documentation

◆ QwtPolarItem()

QwtPolarItem::QwtPolarItem ( const QwtText title = QwtText())
explicit

Constructor.

◆ ~QwtPolarItem()

QwtPolarItem::~QwtPolarItem ( )
virtual

Destructor.

Destructor

.

Member Function Documentation

◆ attach()

void QwtPolarItem::attach ( QwtPolarPlot plot)

Attach the item to a plot.

◆ boundingInterval()

QwtInterval QwtPolarItem::boundingInterval ( int  scaleId) const
virtual

Get the bounding interval for a scale.

Reimplemented in QwtPolarCurve, QwtPolarMarker, and QwtPolarSpectrogram.

◆ detach()

void QwtPolarItem::detach ( )

Detach the item from its plot.

Detach the item from its associated plot.

◆ draw()

virtual void QwtPolarItem::draw ( QPainter *  painter,
const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
double  radius,
const QRectF &  canvasRect 
) const
pure virtual

Draw the item

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

Implemented in QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and QwtPolarSpectrogram.

◆ hide()

void QwtPolarItem::hide ( )

Hide the item.

Hide the item

◆ isVisible()

bool QwtPolarItem::isVisible ( ) const

Get the visibility.

Check if the item is visible.

◆ itemChanged()

void QwtPolarItem::itemChanged ( )
virtual

Update the item and trigger autoRefresh.

Update the legend and call QwtPolarPlot::autoRefresh for the parent plot.

◆ legendChanged()

void QwtPolarItem::legendChanged ( )
virtual

Update the legend.

Update the legend of the parent plot.

◆ legendData()

QList< QwtLegendData > QwtPolarItem::legendData ( ) const
virtual

Get the legend data.

Return all information that is needed to represent the item on the legend.

◆ legendIcon()

QwtGraphic QwtPolarItem::legendIcon ( int  index,
const QSizeF &  size 
) const
virtual

Get the legend icon.

Get icon representing the item on the legend.

Reimplemented in QwtPolarCurve.

◆ legendIconSize()

QSize QwtPolarItem::legendIconSize ( ) const

Get the legend icon size.

◆ marginHint()

int QwtPolarItem::marginHint ( ) const
virtual

Get the margin hint.

Reimplemented in QwtPolarGrid.

◆ plot()

QwtPolarPlot * QwtPolarItem::plot ( ) const

Get the attached plot.

◆ renderThreadCount()

uint QwtPolarItem::renderThreadCount ( ) const

Get the number of render threads.

◆ rtti()

int QwtPolarItem::rtti ( ) const
virtual

Get the runtime type information.

Get runtime type information for the specific class represented.

Reimplemented in QwtPolarCurve, QwtPolarGrid, QwtPolarMarker, and QwtPolarSpectrogram.

◆ setItemAttribute()

void QwtPolarItem::setItemAttribute ( ItemAttribute  attribute,
bool  on = true 
)

Set an item attribute.

Toggle an item attribute.

◆ setLegendIconSize()

void QwtPolarItem::setLegendIconSize ( const QSize &  size)

Set the legend icon size.

Set the size of the legend icon.

◆ setRenderHint()

void QwtPolarItem::setRenderHint ( RenderHint  hint,
bool  on = true 
)

Set a render hint.

Toggle a render hint.

◆ setRenderThreadCount()

void QwtPolarItem::setRenderThreadCount ( uint  numThreads)

Set the number of render threads.

◆ setTitle() [1/2]

void QwtPolarItem::setTitle ( const QString &  title)

Set the title from a QString.

Set a new title.

◆ setTitle() [2/2]

void QwtPolarItem::setTitle ( const QwtText title)

Set the title from a QwtText.

Set a new title.

◆ setVisible()

void QwtPolarItem::setVisible ( bool  on)
virtual

Set the visibility.

Show/Hide the item.

◆ setZ()

void QwtPolarItem::setZ ( double  z)

Set the z value.

◆ show()

void QwtPolarItem::show ( )

Show the item.

Show the item

◆ testItemAttribute()

bool QwtPolarItem::testItemAttribute ( ItemAttribute  attribute) const

Test an item attribute.

◆ testRenderHint()

bool QwtPolarItem::testRenderHint ( RenderHint  hint) const

Test a render hint.

◆ title()

const QwtText & QwtPolarItem::title ( ) const

Get the title.

Get the title of the item.

◆ updateScaleDiv()

void QwtPolarItem::updateScaleDiv ( const QwtScaleDiv azimuthScaleDiv,
const QwtScaleDiv radialScaleDiv,
const QwtInterval interval 
)
virtual

Update the scale division.

Update the item to changes of the axes scale division.

Reimplemented in QwtPolarGrid.

◆ z()

double QwtPolarItem::z ( ) const

Get the z value.


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