QwtPolarCurve Class Reference

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

#include <qwt_polar_curve.h>

Inheritance diagram for QwtPolarCurve:
Inheritance graph
[legend]

List of all members.

Public Types

enum  CurveStyle {
  NoCurve,
  Lines,
  UserCurve = 100
}

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

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

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

Member Enumeration Documentation

Curve styles.

  • 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().
See also:
setStyle()

Constructor & Destructor Documentation

QwtPolarCurve::QwtPolarCurve (  )  [explicit]

Constructor.

QwtPolarCurve::QwtPolarCurve ( const QwtText &  title  )  [explicit]

Constructor

Parameters:
title title of the curve
QwtPolarCurve::QwtPolarCurve ( const QString &  title  )  [explicit]

Constructor

Parameters:
title title of the curve
QwtPolarCurve::~QwtPolarCurve (  )  [virtual]

Destructor.


Member Function Documentation

double QwtPolarCurve::azimuth ( int  i  )  const [inline]
Parameters:
i index
Returns:
azimuth at position i
QwtDoubleInterval QwtPolarCurve::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:
scaleId Scale index
Returns:
bounding interval
See also:
QwtData::boundingRect()

Reimplemented from QwtPolarItem.

QwtCurveFitter * QwtPolarCurve::curveFitter (  )  const

Return the curve fitter.

See also:
setCurveFitter()
const QwtData & QwtPolarCurve::data (  )  const [inline]
Returns:
the the curve data
QwtData & QwtPolarCurve::data (  )  [inline]
Returns:
the the curve data
int QwtPolarCurve::dataSize (  )  const

Return the size of the data arrays

See also:
setData()
void QwtPolarCurve::draw ( QPainter *  painter,
const QwtScaleMap &  azimuthMap,
const QwtScaleMap &  radialMap,
const QwtDoublePoint &  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(),
void QwtPolarCurve::draw ( QPainter *  painter,
const QwtScaleMap &  azimuthMap,
const QwtScaleMap &  radialMap,
const QwtDoublePoint &  pole,
double  radius,
const QwtDoubleRect &  canvasRect 
) const [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.

void QwtPolarCurve::drawCurve ( QPainter *  painter,
int  style,
const QwtScaleMap &  azimuthMap,
const QwtScaleMap &  radialMap,
const QwtDoublePoint &  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()
void QwtPolarCurve::drawLines ( QPainter *  painter,
const QwtScaleMap &  azimuthMap,
const QwtScaleMap &  radialMap,
const QwtDoublePoint &  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()
void QwtPolarCurve::drawSymbols ( QPainter *  painter,
const QwtSymbol &  symbol,
const QwtScaleMap &  azimuthMap,
const QwtScaleMap &  radialMap,
const QwtDoublePoint &  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()
void QwtPolarCurve::init (  )  [protected]

Initialize data members.

const QPen & QwtPolarCurve::pen (  )  const

Return the pen used to draw the lines.

See also:
setPen()
double QwtPolarCurve::radius ( int  i  )  const [inline]
Parameters:
i index
Returns:
radius at position i
int QwtPolarCurve::rtti (  )  const [virtual]
Returns:
QwtPolarCurve::Rtti_PolarCurve

Reimplemented from QwtPolarItem.

QwtPolarPoint QwtPolarCurve::sample ( int  i  )  const [inline]
Parameters:
i index
Returns:
point at position i
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.

See also:
curveFitter()
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.

Parameters:
data Data
See also:
QwtData::copy()
void QwtPolarCurve::setPen ( const QPen &  pen  ) 

Assign a pen.

Parameters:
pen New pen
See also:
pen()
void QwtPolarCurve::setStyle ( CurveStyle  style  ) 

Set the curve's drawing style

Parameters:
style Curve style
See also:
CurveStyle, style()
void QwtPolarCurve::setSymbol ( const QwtSymbol &  s  ) 

Assign a symbol.

Parameters:
s symbol
See also:
symbol()
QwtPolarCurve::CurveStyle QwtPolarCurve::style (  )  const

Return the current style.

See also:
CurveStyle, setStyle()
const QwtSymbol & QwtPolarCurve::symbol (  )  const

Return the current symbol.

See also:
setSymbol()
void QwtPolarCurve::updateLegend ( QwtLegend *  legend  )  const [virtual]

Update the widget that represents the curve on the legend.

Reimplemented from QwtPolarItem.


Generated on 10 Apr 2012 for Qwt Polar User's Guide by  doxygen 1.6.1