QwtPolarCurve(3)

NAME
QwtPolarCurve -

An item, that represents a series of points.

SYNOPSIS

#include <qwt_polar_curve.h>

Inherits QwtPolarItem.

  Public Types
enum CurveStyle { NoCurve, Lines, UserCurve = 100 }
enum LegendAttribute { LegendShowLine = 0x01, LegendShowSymbol = 0x02 }
Attributes how to represent the curve on the legend.
typedef QFlags< LegendAttribute > LegendAttributes
Legend attributes.

  Public Member Functions
QwtPolarCurve ()
Constructor.
QwtPolarCurve (const QwtText &title)
QwtPolarCurve (const QString &title)
virtual ~QwtPolarCurve ()
Destructor.
virtual int rtti () const
void setLegendAttribute (LegendAttribute, bool on=true)
bool testLegendAttribute (LegendAttribute) const
Test if a lefend attribute is enables.
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
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
virtual QwtGraphic legendIcon (int index, const QSizeF &) const

  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

Member Enumeration Documentation

  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.

  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.

Constructor & Destructor Documentation

  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

Member Function Documentation

  QwtInterval QwtPolarCurve::boundingInterval (intscaleId) 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

Returns:
    The curve fitter

See Also:
    setCurveFitter()

  const QwtSeriesData< QwtPointPolar > * QwtPolarCurve::data () const [inline]

Returns:
    the the curve data

  size_t QwtPolarCurve::dataSize () const

Returns:
    Number of points

See Also:
    setData()

  void QwtPolarCurve::draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, doubleradius, const QRectF &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::draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, intfrom, intto) 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::drawCurve (QPainter *painter, intstyle, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, intfrom, intto) 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 QPointF &pole, intfrom, intto) 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 QPointF &pole, intfrom, intto) 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()

  QwtGraphic QwtPolarCurve::legendIcon (intindex, const QSizeF &size) const [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.

  const QPen & QwtPolarCurve::pen () const

Returns:
    Pen used to draw the lines

See Also:
    setPen()

  int QwtPolarCurve::rtti () const [virtual]

Returns:
    QwtPolarCurve::Rtti_PolarCurve

Reimplemented from QwtPolarItem.

  QwtPointPolar QwtPolarCurve::sample (inti) const [inline]

Parameters:
    i index

Returns:
    point at position i

  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()

  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 respresent the radius.

Parameters:
    data Data

  void QwtPolarCurve::setLegendAttribute (LegendAttributeattribute, boolon = true)
Specify an attribute how to draw the legend identifier

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

  void QwtPolarCurve::setPen (const QPen &pen)

Assign a pen.

Parameters:
    pen New pen

See Also:
    pen()

  void QwtPolarCurve::setStyle (CurveStylestyle)
Set the curve's drawing style

Parameters:
    style Curve style

See Also:
    CurveStyle, style()

  void QwtPolarCurve::setSymbol (QwtSymbol *symbol)

Assign a symbol.

Parameters:
    symbol Symbol

See Also:
    symbol()

  QwtPolarCurve::CurveStyle QwtPolarCurve::style () const

Returns:
    Current style

See Also:
    CurveStyle, setStyle()

  const QwtSymbol * QwtPolarCurve::symbol () const

Returns:
    The current symbol

See Also:
    setSymbol()

  bool QwtPolarCurve::testLegendAttribute (LegendAttributeattribute) const

Test if a lefend attribute is enables.

Parameters:
    attribute Legend attribute

Returns:
    True if attribute is enabled

See Also:
    LegendAttribute, setLegendAttribute()

Author

Generated automatically by Doxygen for Qwt Polar User's Guide from the source code.