Qwt Polar User's Guide
0.1.0
|
#include <qwt_polar_curve.h>
Public Types | |
enum | CurveStyle { NoCurve, Lines, UserCurve = 100 } |
![]() | |
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 } |
Public Member Functions | |
QwtPolarCurve () | |
QwtPolarCurve (const QwtText &title) | |
QwtPolarCurve (const QString &title) | |
virtual | ~QwtPolarCurve () |
virtual int | rtti () const |
void | setData (const QwtData &data) |
QwtData & | data () |
const QwtData & | data () const |
int | dataSize () const |
double | radius (int i) const |
double | azimuth (int i) const |
QwtPolarPoint | sample (int i) const |
void | setPen (const QPen &) |
const QPen & | pen () const |
void | setStyle (CurveStyle style) |
CurveStyle | style () const |
void | setSymbol (const QwtSymbol &s) |
const QwtSymbol & | symbol () const |
void | setCurveFitter (QwtCurveFitter *) |
QwtCurveFitter * | curveFitter () const |
virtual void | draw (QPainter *p, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QwtDoublePoint &pole, double radius, const QwtDoubleRect &canvasRect) const |
virtual void | draw (QPainter *p, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QwtDoublePoint &pole, int from, int to) const |
virtual void | updateLegend (QwtLegend *) const |
virtual QwtDoubleInterval | boundingInterval (int scaleId) const |
![]() | |
QwtPolarItem (const QwtText &title=QwtText()) | |
virtual | ~QwtPolarItem () |
void | attach (QwtPolarPlot *plot) |
void | detach () |
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 |
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 | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtDoubleInterval &) |
virtual int | marginHint () const |
Protected Member Functions | |
void | init () |
virtual void | drawCurve (QPainter *, int style, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QwtDoublePoint &pole, int from, int to) const |
virtual void | drawSymbols (QPainter *, const QwtSymbol &, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QwtDoublePoint &pole, int from, int to) const |
void | drawLines (QPainter *, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QwtDoublePoint &pole, int from, int to) const |
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.
Curve styles.
|
explicit |
Constructor.
|
explicit |
Constructor
title | title of the curve |
|
explicit |
Constructor
title | title of the curve |
|
virtual |
Destructor.
|
inline |
i | index |
|
virtual |
Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling
scaleId | Scale index |
Reimplemented from QwtPolarItem.
QwtCurveFitter * QwtPolarCurve::curveFitter | ( | ) | const |
Return the curve fitter.
|
inline |
|
inline |
int QwtPolarCurve::dataSize | ( | ) | const |
Return the size of the data arrays
|
virtual |
Draw the curve
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.
|
virtual |
Draw an interval of the curve.
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. |
|
protectedvirtual |
Draw the line part (without symbols) of a curve interval.
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. |
|
protected |
Draw lines
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. |
|
protectedvirtual |
Draw symbols
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. |
|
protected |
Initialize data members.
const QPen & QwtPolarCurve::pen | ( | ) | const |
Return the pen used to draw the lines.
|
inline |
i | index |
|
virtual |
Reimplemented from QwtPolarItem.
|
inline |
i | index |
void QwtPolarCurve::setCurveFitter | ( | QwtCurveFitter * | curveFitter | ) |
Insert a 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.
void QwtPolarCurve::setData | ( | const QwtData & | data | ) |
Initialize data with a pointer to QwtData.
The x-values of the data object represent the azimuth, the y-value respresent the radius.
data | Data |
void QwtPolarCurve::setPen | ( | const QPen & | pen | ) |
void QwtPolarCurve::setStyle | ( | CurveStyle | style | ) |
void QwtPolarCurve::setSymbol | ( | const QwtSymbol & | s | ) |
QwtPolarCurve::CurveStyle QwtPolarCurve::style | ( | ) | const |
Return the current style.
const QwtSymbol & QwtPolarCurve::symbol | ( | ) | const |
Return the current symbol.
|
virtual |
Update the widget that represents the curve on the legend.
Reimplemented from QwtPolarItem.