Loading...
Searching...
No Matches
QwtPolarCurve Class Reference

An item, that represents a series of points. More...

`#include <qwt_polar_curve.h>`

Inheritance diagram for QwtPolarCurve:

## Public Types

enum | CurveStyle { NoCurve , Lines , UserCurve = 100 }
enum | LegendAttribute { LegendShowLine = 0x01 , LegendShowSymbol = 0x02 }
| Attributes how to represent the curve on the legend. More...
typedef QFlags< LegendAttribute > | LegendAttributes
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...
typedef QFlags< ItemAttribute > | ItemAttributes
typedef QFlags< RenderHint > | RenderHints

## Public Member Functions

| QwtPolarCurve ()
| Constructor.
| QwtPolarCurve (const QwtText &title)
| QwtPolarCurve (const QString &title)
virtual | ~QwtPolarCurve ()
| Destructor.
virtual int | rtti () const override
void | setLegendAttribute (LegendAttribute, bool on=true)
bool | testLegendAttribute (LegendAttribute) const
| Test if a legend attribute is enabled.
void | setData (QwtSeriesData< QwtPointPolar > *data)
const QwtSeriesData< QwtPointPolar > * | data () const
size_t | dataSize () const
QwtPointPolar | sample (int i) const
void | setPen (const QPen &)
| Assign a pen.
const QPen & | pen () const
void | setStyle (CurveStyle style)
CurveStyle | style () const
void | setSymbol (QwtSymbol *)
| Assign a symbol.
const QwtSymbol * | symbol () const
void | setCurveFitter (QwtCurveFitter *)
| Insert a curve fitter.
QwtCurveFitter * | curveFitter () const
virtual void | draw (QPainter *p, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const override
virtual void | draw (QPainter *p, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, int from, int to) const
| Draw an interval of the curve.
virtual QwtInterval | boundingInterval (int scaleId) const override
virtual QwtGraphic | legendIcon (int index, const QSizeF &) const override
Public Member Functions inherited from QwtPolarItem
| QwtPolarItem (const QwtText &title=QwtText())
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.
QwtPolarPlot * | plot () 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
void | setRenderThreadCount (uint numThreads)
uint | renderThreadCount () const
double | z () const
void | setZ (double z)
| Set the z value.
void | show ()
| Show the item.
void | hide ()
| Hide the item.
virtual void | setVisible (bool)
bool | isVisible () const
virtual void | itemChanged ()
virtual void | legendChanged ()
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &)
| Update the item to changes of the axes scale division.
virtual int | marginHint () const
void | setLegendIconSize (const QSize &)
QSize | legendIconSize () const
virtual QList< QwtLegendData > | legendData () const
| Return all information, that is needed to represent the item on the legend.

## Protected Member Functions

void | init ()
| Initialize data members.
virtual void | drawCurve (QPainter *, int style, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, int from, int to) const
virtual void | drawSymbols (QPainter *, const QwtSymbol &, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, int from, int to) const
void | drawLines (QPainter *, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, int from, int to) const

## Detailed Description

An item, that represents a series of points.

A curve is the representation of a series of points in polar coordinates. The points are connected to the curve using the abstract QwtData interface.

See also
  QwtPolarPlot, QwtSymbol, QwtScaleMap

Definition at line 30 of file qwt_polar_curve.h.

## Member Typedef Documentation

## LegendAttributes

typedef QFlags<LegendAttribute > QwtPolarCurve::LegendAttributes

An ORed combination of LegendAttribute values.

Definition at line 75 of file qwt_polar_curve.h.

## Member Enumeration Documentation

## CurveStyle

enum QwtPolarCurve::CurveStyle

Curve styles.

See also
  setStyle(), style()

Enumerator
NoCurve | Don't draw a curve. Note: This doesn't affect the symbols.
Lines | Connect the points with straight lines. The lines might be interpolated depending on the 'Fitted' attribute. Curve fitting can be configured using setCurveFitter().
UserCurve | Values > 100 are reserved for user specific curve styles.

Definition at line 37 of file qwt_polar_curve.h.

## LegendAttribute

enum QwtPolarCurve::LegendAttribute

Attributes how to represent the curve on the legend.

If none of the flags is activated QwtPlotCurve tries to find a color representing the curve and paints a rectangle with it. In the default setting all attributes are off.

See also
  setLegendAttribute(), testLegendAttribute()

Enumerator
LegendShowLine | If the curveStyle() is not NoCurve a line is painted with the curvePen().
LegendShowSymbol | If the curve has a valid symbol it is painted.

Definition at line 63 of file qwt_polar_curve.h.

## Constructor & Destructor Documentation

## QwtPolarCurve() [1/3]

QwtPolarCurve::QwtPolarCurve | ( |  | ) |

explicit

Constructor.

Definition at line 66 of file qwt_polar_curve.cpp.

## QwtPolarCurve() [2/3]

QwtPolarCurve::QwtPolarCurve | ( | const QwtText & | title | ) |

explicit

Constructor

Parameters

  title | title of the curve

Definition at line 76 of file qwt_polar_curve.cpp.

## QwtPolarCurve() [3/3]

QwtPolarCurve::QwtPolarCurve | ( | const QString & | title | ) |

explicit

Constructor

Parameters

  title | title of the curve

Definition at line 86 of file qwt_polar_curve.cpp.

## ~QwtPolarCurve()

QwtPolarCurve::~QwtPolarCurve | ( |  | ) |

virtual

Destructor.

Definition at line 93 of file qwt_polar_curve.cpp.

## Member Function Documentation

## boundingInterval()

QwtInterval QwtPolarCurve::boundingInterval | ( | int | scaleId | ) | const

override virtual

Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling

Parameters

  scaleId | Scale index

Returns
  bounding interval

See also
  QwtData::boundingRect()

Reimplemented from QwtPolarItem.

Definition at line 585 of file qwt_polar_curve.cpp.

## curveFitter()

QwtCurveFitter * QwtPolarCurve::curveFitter | ( |  | ) | const

Returns
  The curve fitter

See also
  setCurveFitter()

Definition at line 261 of file qwt_polar_curve.cpp.

## data()

const QwtSeriesData< QwtPointPolar > * QwtPolarCurve::data | ( |  | ) | const

inline

Returns
  the the curve data

Definition at line 144 of file qwt_polar_curve.h.

## dataSize()

size_t QwtPolarCurve::dataSize | ( |  | ) | const

Returns
  Number of points

See also
  setData()

Definition at line 499 of file qwt_polar_curve.cpp.

## draw() [1/2]

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

override virtual

Draw the curve

Parameters

  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.

Definition at line 276 of file qwt_polar_curve.cpp.

## draw() [2/2]

void QwtPolarCurve::draw | ( | QPainter * | painter,
|  | const QwtScaleMap & | azimuthMap,
|  | const QwtScaleMap & | radialMap,
|  | const QPointF & | pole,
|  | int | from,
|  | int | to ) const

virtual

Draw an interval of the curve.

Parameters

  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
  from | index of the first point to be painted
  to | index of the last point to be painted. If to < 0 the curve will be painted to its last point.

See also
  drawCurve(), drawSymbols(),

Definition at line 299 of file qwt_polar_curve.cpp.

## drawCurve()

void QwtPolarCurve::drawCurve | ( | QPainter * | painter,
|  | int | style,
|  | const QwtScaleMap & | azimuthMap,
|  | const QwtScaleMap & | radialMap,
|  | const QPointF & | pole,
|  | int | from,
|  | int | to ) const

protected virtual

Draw the line part (without symbols) of a curve interval.

Parameters

  painter | Painter
  style | Curve style, see QwtPolarCurve::CurveStyle
  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
  from | index of the first point to be painted
  to | index of the last point to be painted.

See also
  draw(), drawLines()

Definition at line 341 of file qwt_polar_curve.cpp.

## drawLines()

void QwtPolarCurve::drawLines | ( | QPainter * | painter,
|  | const QwtScaleMap & | azimuthMap,
|  | const QwtScaleMap & | radialMap,
|  | const QPointF & | pole,
|  | int | from,
|  | int | to ) const

protected

Draw lines

Parameters

  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
  from | index of the first point to be painted
  to | index of the last point to be painted.

See also
  draw(), drawLines(), setCurveFitter()

Definition at line 367 of file qwt_polar_curve.cpp.

## drawSymbols()

void QwtPolarCurve::drawSymbols | ( | QPainter * | painter,
|  | const QwtSymbol & | symbol,
|  | const QwtScaleMap & | azimuthMap,
|  | const QwtScaleMap & | radialMap,
|  | const QPointF & | pole,
|  | int | from,
|  | int | to ) const

protected virtual

Draw symbols

Parameters

  painter | Painter
  symbol | Curve symbol
  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
  from | index of the first point to be painted
  to | index of the last point to be painted.

See also
  setSymbol(), draw(), drawCurve()

Definition at line 459 of file qwt_polar_curve.cpp.

## init()

void QwtPolarCurve::init | ( |  | ) |

protected

Initialize data members.

Definition at line 100 of file qwt_polar_curve.cpp.

## legendIcon()

QwtGraphic QwtPolarCurve::legendIcon | ( | int | index,
|  | const QSizeF & | size ) const

override virtual

Returns
  Icon representing the curve on the legend

Parameters

  index | Index of the legend entry ( ignored as there is only one )
  size | Icon size

See also
  QwtPolarItem::setLegendIconSize(), QwtPolarItem::legendData()

Reimplemented from QwtPolarItem.

Definition at line 513 of file qwt_polar_curve.cpp.

## pen()

const QPen & QwtPolarCurve::pen | ( |  | ) | const

Returns
  Pen used to draw the lines

See also
  setPen()

Definition at line 212 of file qwt_polar_curve.cpp.

## rtti()

int QwtPolarCurve::rtti | ( |  | ) | const

override virtual

Returns
  QwtPolarCurve::Rtti_PolarCurve

Reimplemented from QwtPolarItem.

Definition at line 113 of file qwt_polar_curve.cpp.

## sample()

QwtPointPolar QwtPolarCurve::sample | ( | int | i | ) | const

inline

Parameters

  i | index

Returns
  point at position i

Definition at line 153 of file qwt_polar_curve.h.

## setCurveFitter()

void QwtPolarCurve::setCurveFitter | ( | QwtCurveFitter * | curveFitter | ) |

Insert a curve fitter.

Parameters

  curveFitter | Curve fitter

A curve fitter interpolates the curve points. F.e QwtPolarFitter adds equidistant points so that the connection gets rounded instead of having straight lines. If curveFitter is NULL fitting is disabled.

See also
  curveFitter()

Definition at line 246 of file qwt_polar_curve.cpp.

## setData()

void QwtPolarCurve::setData | ( | QwtSeriesData< QwtPointPolar > * | data | ) |

Initialize data with a pointer to QwtSeriesData<QwtPointPolar>.

The x-values of the data object represent the azimuth, the y-value represents the radius.

Parameters

  data | Data

Definition at line 225 of file qwt_polar_curve.cpp.

## setLegendAttribute()

void QwtPolarCurve::setLegendAttribute | ( | LegendAttribute | attribute,
|  | bool | on = true )

Specify an attribute how to draw the legend identifier

Parameters

  attribute | Attribute
  on | On/Off /sa LegendAttribute, testLegendAttribute()

Definition at line 125 of file qwt_polar_curve.cpp.

## setPen()

void QwtPolarCurve::setPen | ( | const QPen & | pen | ) |

Assign a pen.

Parameters

  pen | New pen

See also
  pen()

Definition at line 199 of file qwt_polar_curve.cpp.

## setStyle()

void QwtPolarCurve::setStyle | ( | CurveStyle | style | ) |

Set the curve's drawing style

Parameters

  style | Curve style

See also
  CurveStyle, style()

Definition at line 152 of file qwt_polar_curve.cpp.

## setSymbol()

void QwtPolarCurve::setSymbol | ( | QwtSymbol * | symbol | ) |

Assign a symbol.

Parameters

  symbol | Symbol

See also
  symbol()

Definition at line 175 of file qwt_polar_curve.cpp.

## style()

QwtPolarCurve::CurveStyle QwtPolarCurve::style | ( |  | ) | const

Returns
  Current style

See also
  CurveStyle, setStyle()

Definition at line 165 of file qwt_polar_curve.cpp.

## symbol()

const QwtSymbol * QwtPolarCurve::symbol | ( |  | ) | const

Returns
  The current symbol

See also
  setSymbol()

Definition at line 189 of file qwt_polar_curve.cpp.

## testLegendAttribute()

bool QwtPolarCurve::testLegendAttribute | ( | LegendAttribute | attribute | ) | const

Test if a legend attribute is enabled.

Parameters

  attribute | Legend attribute

Returns
  True if attribute is enabled

See also
  LegendAttribute, setLegendAttribute()

Definition at line 141 of file qwt_polar_curve.cpp.