# QwtPlotCurve Class Reference

A plot item, that represents a series of points. More...

`#include <qwt_plot_curve.h>`

Inheritance diagram for QwtPlotCurve:
[legend]

List of all members.

## Public Types

enum | CurveAttribute { Inverted = 0x01, Fitted = 0x02 }
typedef QFlags< CurveAttribute > | CurveAttributes
enum | CurveStyle { NoCurve = -1, Lines, Sticks, Steps, Dots, UserCurve = 100 }
enum | ItemAttribute { Legend = 0x01, AutoScale = 0x02 }
typedef QFlags< ItemAttribute > | ItemAttributes
enum | LegendAttribute { LegendNoAttribute = 0x00, LegendShowLine = 0x01, LegendShowSymbol = 0x02, LegendShowBrush = 0x04 }
typedef QFlags< LegendAttribute > | LegendAttributes
enum | PaintAttribute { ClipPolygons = 0x01, CacheSymbols = 0x02 }
typedef QFlags< PaintAttribute > | PaintAttributes
enum | RenderHint { RenderAntialiased = 1 }
typedef QFlags< RenderHint > | RenderHints
enum | RttiValues { Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotScale, Rtti_PlotMarker, Rtti_PlotCurve, Rtti_PlotSpectroCurve, Rtti_PlotIntervalCurve, Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotSVG, Rtti_PlotUserItem = 1000 }

## Public Member Functions

void | attach (QwtPlot *plot)
double | baseline () const
virtual QRectF | boundingRect () const
const QBrush & | brush () const
int | closestPoint (const QPoint &pos, double *dist=NULL) const
QwtCurveFitter * | curveFitter () const
QwtSeriesData< QPointF > * | data ()
const QwtSeriesData< QPointF > * | data () const
size_t | dataSize () const
void | detach ()
virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const
virtual void | drawLegendIdentifier (QPainter *, const QRectF &) const
virtual void | drawSeries (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
void | hide ()
bool | isVisible () const
virtual void | itemChanged ()
virtual QWidget * | legendItem () const
double | maxXValue () const
double | maxYValue () const
double | minXValue () const
double | minYValue () const
Qt::Orientation | orientation () const
QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const
const QPen & | pen () const
QwtPlot * | plot () const
| QwtPlotCurve (const QwtText &title)
| QwtPlotCurve (const QString &title=QString::null)
virtual int | rtti () const
QPointF | sample (int index) const
QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const
void | setAxes (int xAxis, int yAxis)
void | setBaseline (double ref)
void | setBrush (const QBrush &)
void | setCurveAttribute (CurveAttribute, bool on=true)
void | setCurveFitter (QwtCurveFitter *)
void | setData (QwtSeriesData< QPointF > *)
void | setItemAttribute (ItemAttribute, bool on=true)
void | setLegendAttribute (LegendAttribute, bool on=true)
void | setOrientation (Qt::Orientation)
void | setPaintAttribute (PaintAttribute, bool on=true)
void | setPen (const QPen &)
void | setRawSamples (const double *xData, const double *yData, int size)
void | setRenderHint (RenderHint, bool on=true)
void | setSamples (const double *xData, const double *yData, int size)
void | setSamples (const QVector< double > &xData, const QVector< double > &yData)
void | setSamples (const QVector< QPointF > &)
void | setStyle (CurveStyle style)
void | setSymbol (const QwtSymbol *s)
void | setTitle (const QwtText &title)
void | setTitle (const QString &title)
virtual void | setVisible (bool)
void | setXAxis (int axis)
void | setYAxis (int axis)
void | setZ (double z)
void | show ()
CurveStyle | style () const
const QwtSymbol * | symbol () const
bool | testCurveAttribute (CurveAttribute) const
bool | testItemAttribute (ItemAttribute) const
bool | testLegendAttribute (LegendAttribute) const
bool | testPaintAttribute (PaintAttribute) const
bool | testRenderHint (RenderHint) const
const QwtText & | title () const
virtual void | updateLegend (QwtLegend *) const
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &)
int | xAxis () const
int | yAxis () const
double | z () const
virtual | ~QwtPlotCurve ()

## Protected Member Functions

void | closePolyline (QPainter *, const QwtScaleMap &, const QwtScaleMap &, QPolygonF &) const
virtual void | drawCurve (QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
void | drawDots (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
void | drawLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
void | drawSteps (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
void | drawSticks (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
virtual void | drawSymbols (QPainter *p, const QwtSymbol &, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
virtual void | fillCurve (QPainter *, const QwtScaleMap &, const QwtScaleMap &, const QRectF &canvasRect, QPolygonF &) const
void | init ()

## Protected Attributes

QwtSeriesData< QPointF > * | d_series

## Detailed Description

A plot item, that represents a series of points.

A curve is the representation of a series of points in the x-y plane. It supports different display styles, interpolation ( f.e. spline ) and symbols.

Usage
  a) Assign curve properties
    When a curve is created, it is configured to draw black solid lines with in QwtPlotCurve::Lines style and no symbols. You can change this by calling setPen(), setStyle() and setSymbol().
  b) Connect/Assign data.
    QwtPlotCurve gets its points using a QwtSeriesData object offering a bridge to the real storage of the points ( like QAbstractItemModel ). There are several convenience classes derived from QwtSeriesData, that also store the points inside ( like QStandardItemModel ). QwtPlotCurve also offers a couple of variations of setSamples(), that build QwtSeriesData objects from arrays internally.
  c) Attach the curve to a plot
    See QwtPlotItem::attach()

Example:
  see examples/bode

See also:
  QwtPointSeriesData, QwtSymbol, QwtScaleMap

## Member Typedef Documentation

typedef QFlags<CurveAttribute> QwtPlotCurve::CurveAttributes

Curve attributes.

typedef QFlags<ItemAttribute> QwtPlotItem::ItemAttributes`[inherited]`

Plot Item Attributes.

typedef QFlags<LegendAttribute> QwtPlotCurve::LegendAttributes

Legend attributes.

typedef QFlags<PaintAttribute> QwtPlotCurve::PaintAttributes

Paint attributes.

typedef QFlags<RenderHint> QwtPlotItem::RenderHints`[inherited]`

Render hints.

## Member Enumeration Documentation

enum QwtPlotCurve::CurveAttribute

Attribute for drawing the curve

See also:
  setCurveAttribute(), testCurveAttribute(), curveFitter()

Enumerator:

  Inverted | For QwtPlotCurve::Steps only. Draws a step function from the right to the left.

  Fitted

  Only in combination with QwtPlotCurve::Lines A QwtCurveFitter tries to interpolate/smooth the curve, before it is painted.
  Note:
    Curve fitting requires temorary memory for calculating coefficients and additional points. If painting in QwtPlotCurve::Fitted mode is slow it might be better to fit the points, before they are passed to QwtPlotCurve.

enum QwtPlotCurve::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().
  Sticks | Draw vertical or horizontal sticks ( depending on the orientation() ) from a baseline which is defined by setBaseline().
  Steps | Connect the points with a step function. The step function is drawn from the left to the right or vice versa, depending on the QwtPlotCurve::Inverted attribute.
  Dots | Draw dots at the locations of the data points. Note: This is different from a dotted line (see setPen()), and faster as a curve in QwtPlotCurve::NoStyle style and a symbol painting a point.
  UserCurve | Styles >= QwtPlotCurve::UserCurve are reserved for derived classes of QwtPlotCurve that overload drawCurve() with additional application specific curve types.

enum QwtPlotItem::ItemAttribute`[inherited]`

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.

enum QwtPlotCurve::LegendAttribute

Attributes how to represent the curve on the legend

See also:
  setLegendAttribute(), testLegendAttribute(), drawLegendIdentifier()

Enumerator:

  LegendNoAttribute | QwtPlotCurve tries to find a color representing the curve and paints a rectangle with it.
  LegendShowLine | If the style() is not QwtPlotCurve::NoCurve a line is painted with the curve pen().
  LegendShowSymbol | If the curve has a valid symbol it is painted.
  LegendShowBrush | If the curve has a brush a rectangle filled with the curve brush() is painted.

enum QwtPlotCurve::PaintAttribute

Attributes to modify the drawing algorithm. The default setting enables ClipPolygons

See also:
  setPaintAttribute(), testPaintAttribute()

Enumerator:

  ClipPolygons | Clip polygons before painting them. In situations, where points are far outside the visible area (f.e when zooming deep) this might be a substantial improvement for the painting performance
  CacheSymbols | Paint the symbol to a QPixmap and paint the pixmap instead rendering the symbol for each point. The flag has no effect, when the curve is not painted to the canvas ( f.e when exporting the plot to a PDF document ).

enum QwtPlotItem::RenderHint`[inherited]`

Render hints.

Enumerator:

  RenderAntialiased | Enable antialiasing.

enum QwtPlotItem::RttiValues`[inherited]`

Runtime type information.

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

## Constructor & Destructor Documentation

QwtPlotCurve::QwtPlotCurve | ( | const QString & | title = `QString::null` | ) | `[explicit]`

Constructor

Parameters:

  title | Title of the curve

QwtPlotCurve::QwtPlotCurve | ( | const QwtText & | title | ) | `[explicit]`

Constructor

Parameters:

  title | Title of the curve

QwtPlotCurve::~QwtPlotCurve | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

void QwtPlotItem::attach | ( | QwtPlot * | plot | ) | `[inherited]`

Attach the item to a plot.

This method will attach a QwtPlotItem to the QwtPlot argument. It will first detach the QwtPlotItem from any plot from a previous call to attach (if necessary). If a NULL argument is passed, it will detach from any QwtPlot it was attached to.

Parameters:

  plot | Plot widget

See also:
  detach()

double QwtPlotCurve::baseline | ( |  | ) | const

Returns:
  Value of the baseline

See also:
  setBaseline()

virtual QRectF QwtPlotSeriesItem< QPointF >::boundingRect | ( |  | ) | const`[virtual, inherited]`

Returns:
  Bounding rectangle of the data. If there is no bounding rect, like for empty data the rectangle is invalid.

See also:
  QwtSeriesData<T>::boundingRect(), QRectF::isValid()

Reimplemented from QwtPlotItem.

const QBrush & QwtPlotCurve::brush | ( |  | ) | const

Returns:
  Brush used to fill the area between lines and the baseline

See also:
  setBrush(), setBaseline(), baseline()

void QwtPlotCurve::closePolyline | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | QPolygonF & | polygon
| ) |  | const`[protected]`

Complete a polygon to be a closed polygon including the area between the original polygon and the baseline.

Parameters:

  painter | Painter
  xMap | X map
  yMap | Y map
  polygon | Polygon to be completed

int QwtPlotCurve::closestPoint | ( | const QPoint & | pos,
|  | double * | dist = `NULL`
| ) |  | const

Find the closest curve point for a specific position

Parameters:

  pos | Position, where to look for the closest curve point
  dist | If dist != NULL, closestPoint() returns the distance between the position and the clostest curve point

Returns:
  Index of the closest curve point, or -1 if none can be found ( f.e when the curve has no points )

Note:
  closestPoint() implements a dumb algorithm, that iterates over all points

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

Get the curve fitter. If curve fitting is disabled NULL is returned.

Returns:
  Curve fitter

See also:
  setCurveFitter(), Fitted

void QwtPlotItem::detach | ( |  | ) | `[inherited]`

This method detaches a QwtPlotItem from any QwtPlot it has been associated with.

detach() is equivalent to calling attach( NULL )

See also:
  attach()

void QwtPlotAbstractSeriesItem::draw | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect
| ) |  | const`[virtual, inherited]`

Draw the complete series.

Parameters:

  painter | Painter
  xMap | Maps x-values into pixel coordinates.
  yMap | Maps y-values into pixel coordinates.
  canvasRect | Contents rect of the canvas

Implements QwtPlotItem.

void QwtPlotCurve::drawCurve | ( | QPainter * | painter,
|  | int | style,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[protected, virtual]`

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

Parameters:

  painter | Painter
  style | curve style, see QwtPlotCurve::CurveStyle
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  from | index of the first point to be painted
  to | index of the last point to be painted

See also:
  draw(), drawDots(), drawLines(), drawSteps(), drawSticks()

void QwtPlotCurve::drawDots | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[protected]`

Draw dots

Parameters:

  painter | Painter
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  from | index of the first point to be painted
  to | index of the last point to be painted

See also:
  draw(), drawCurve(), drawSticks(), drawLines(), drawSteps()

void QwtPlotCurve::drawLegendIdentifier | ( | QPainter * | painter,
|  | const QRectF & | rect
| ) |  | const`[virtual]`

Draw the identifier representing the curve on the legend.

Parameters:

  painter | Painter
  rect | Bounding rectangle for the identifier

See also:
  setLegendAttribute(), QwtPlotItem::Legend

Reimplemented from QwtLegendItemManager.

void QwtPlotCurve::drawLines | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[protected]`

Draw lines.

If the CurveAttribute Fitted is enabled a QwtCurveFitter tries to interpolate/smooth the curve, before it is painted.

Parameters:

  painter | Painter
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  from | index of the first point to be painted
  to | index of the last point to be painted

See also:
  setCurveAttribute(), setCurveFitter(), draw(), drawLines(), drawDots(), drawSteps(), drawSticks()

void QwtPlotCurve::drawSeries | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[virtual]`

Draw an interval of the curve

Parameters:

  painter | Painter
  xMap | Maps x-values into pixel coordinates.
  yMap | Maps y-values into pixel coordinates.
  canvasRect | Contents rect of the canvas
  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(),

Implements QwtPlotAbstractSeriesItem.

void QwtPlotCurve::drawSteps | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[protected]`

Draw step function

The direction of the steps depends on Inverted attribute.

Parameters:

  painter | Painter
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  from | index of the first point to be painted
  to | index of the last point to be painted

See also:
  CurveAttribute, setCurveAttribute(), draw(), drawCurve(), drawDots(), drawLines(), drawSticks()

void QwtPlotCurve::drawSticks | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[protected]`

Draw sticks

Parameters:

  painter | Painter
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  from | index of the first point to be painted
  to | index of the last point to be painted

See also:
  draw(), drawCurve(), drawDots(), drawLines(), drawSteps()

void QwtPlotCurve::drawSymbols | ( | QPainter * | painter,
|  | const QwtSymbol & | symbol,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | int | from,
|  | int | to
| ) |  | const`[protected, virtual]`

Draw symbols

Parameters:

  painter | Painter
  symbol | Curve symbol
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  from | Index of the first point to be painted
  to | Index of the last point to be painted

See also:
  setSymbol(), drawSeries(), drawCurve()

void QwtPlotCurve::fillCurve | ( | QPainter * | painter,
|  | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap,
|  | const QRectF & | canvasRect,
|  | QPolygonF & | polygon
| ) |  | const`[protected, virtual]`

Fill the area between the curve and the baseline with the curve brush

Parameters:

  painter | Painter
  xMap | x map
  yMap | y map
  canvasRect | Contents rect of the canvas
  polygon | Polygon - will be modified !

See also:
  setBrush(), setBaseline(), setStyle()

void QwtPlotItem::hide | ( |  | ) | `[inherited]`

Hide the item.

void QwtPlotCurve::init | ( |  | ) | `[protected]`

Initialize internal members.

bool QwtPlotItem::isVisible | ( |  | ) | const`[inherited]`

Returns:
  true if visible

See also:
  setVisible(), show(), hide()

void QwtPlotItem::itemChanged | ( |  | ) | `[virtual, inherited]`

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

See also:
  updateLegend()

QWidget * QwtPlotItem::legendItem | ( |  | ) | const`[virtual, inherited]`

Allocate the widget that represents the item on the legend.

The default implementation returns a QwtLegendItem(), but an item could be represented by any type of widget, by overloading legendItem() and updateLegend().

Returns:
  QwtLegendItem()

See also:
  updateLegend() QwtLegend()

Implements QwtLegendItemManager.

double QwtPlotCurve::maxXValue | ( |  | ) | const`[inline]`

boundingRect().right()

double QwtPlotCurve::maxYValue | ( |  | ) | const`[inline]`

boundingRect().bottom()

double QwtPlotCurve::minXValue | ( |  | ) | const`[inline]`

boundingRect().left()

double QwtPlotCurve::minYValue | ( |  | ) | const`[inline]`

boundingRect().top()

Qt::Orientation QwtPlotAbstractSeriesItem::orientation | ( |  | ) | const`[inherited]`

Returns:
  Orientation of the plot item

See also:
  setOrientation()

QRectF QwtPlotItem::paintRect | ( | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap
| ) |  | const`[inherited]`

Calculate the bounding paint rect of 2 maps.

Parameters:

  xMap | X map
  yMap | X map

Returns:
  Bounding paint rect of the scale maps, normalized

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

Returns:
  Pen used to draw the lines

See also:
  setPen(), brush()

QwtPlot * QwtPlotItem::plot | ( |  | ) | const`[inherited]`

Return attached plot.

int QwtPlotCurve::rtti | ( |  | ) | const`[virtual]`

Returns:
  QwtPlotItem::Rtti_PlotCurve

Reimplemented from QwtPlotItem.

QRectF QwtPlotItem::scaleRect | ( | const QwtScaleMap & | xMap,
|  | const QwtScaleMap & | yMap
| ) |  | const`[inherited]`

Calculate the bounding scale rect of 2 maps.

Parameters:

  xMap | X map
  yMap | X map

Returns:
  Bounding scale rect of the scale maps, normalized

void QwtPlotItem::setAxes | ( | int | xAxis,
|  | int | yAxis
| ) |  | `[inherited]`

Set X and Y axis

The item will painted according to the coordinates its Axes.

Parameters:

  xAxis | X Axis
  yAxis | Y Axis

See also:
  setXAxis(), setYAxis(), xAxis(), yAxis()

void QwtPlotCurve::setBaseline | ( | double | value | ) |

Set the value of the baseline.

The baseline is needed for filling the curve with a brush or the Sticks drawing style. The interpretation of the baseline depends on the CurveType. With QwtPlotCurve::Yfx, the baseline is interpreted as a horizontal line at y = baseline(), with QwtPlotCurve::Yfy, it is interpreted as a vertical line at x = baseline().

The default value is 0.0.

Parameters:

  value | Value of the baseline

See also:
  baseline(), setBrush(), setStyle(), setStyle()

void QwtPlotCurve::setBrush | ( | const QBrush & | brush | ) |

Assign a brush.

In case of brush.style() != QBrush::NoBrush and style() != QwtPlotCurve::Sticks the area between the curve and the baseline will be filled.

In case !brush.color().isValid() the area will be filled by pen.color(). The fill algorithm simply connects the first and the last curve point to the baseline. So the curve data has to be sorted (ascending or descending).

Parameters:

  brush | New brush

See also:
  brush(), setBaseline(), baseline()

void QwtPlotCurve::setCurveAttribute | ( | CurveAttribute | attribute,
|  | bool | on = `true`
| ) |  |

Specify an attribute for drawing the curve

Parameters:

  attribute | Curve attribute
  on | On/Off

/sa testCurveAttribute(), setCurveFitter()

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

Assign a curve fitter

The curve fitter "smooths" the curve points, when the Fitted CurveAttribute is set. setCurveFitter(NULL) also disables curve fitting.

The curve fitter operates on the translated points ( = widget coordinates) to be functional for logarithmic scales. Obviously this is less performant for fitting algorithms, that reduce the number of points.

For situations, where curve fitting is used to improve the performance of painting huge series of points it might be better to execute the fitter on the curve points once and to cache the result in the QwtSeriesData object.

Parameters:

  curveFitter() | Curve fitter

See also:
  Fitted

void QwtPlotItem::setItemAttribute | ( | ItemAttribute | attribute,
|  | bool | on = `true`
| ) |  | `[inherited]`

Toggle an item attribute

Parameters:

  attribute | Attribute type
  on | true/false

See also:
  testItemAttribute(), ItemAttribute

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

Specify an attribute how to draw the legend identifier

Parameters:

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

void QwtPlotAbstractSeriesItem::setOrientation | ( | Qt::Orientation | orientation | ) | `[inherited]`

Set the orientation of the item.

The orientation() might be used in specific way by a plot item. F.e. a QwtPlotCurve uses it to identify how to display the curve int QwtPlotCurve::Steps or QwtPlotCurve::Sticks style.

See also:
  orientation()

void QwtPlotCurve::setPaintAttribute | ( | PaintAttribute | attribute,
|  | bool | on = `true`
| ) |  |

Specify an attribute how to draw the curve

Parameters:

  attribute | Paint attribute
  on | On/Off

See also:
  testPaintAttribute()

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

Assign a pen

Parameters:

  pen | New pen

See also:
  pen(), brush()

void QwtPlotCurve::setRawSamples | ( | const double * | xData,
|  | const double * | yData,
|  | int | size
| ) |  |

Initialize the data by pointing to memory blocks which are not managed by QwtPlotCurve.

setRawSamples is provided for efficiency. It is important to keep the pointers during the lifetime of the underlying QwtCPointerData class.

Parameters:

  xData | pointer to x data
  yData | pointer to y data
  size | size of x and y

See also:
  QwtCPointerData

void QwtPlotItem::setRenderHint | ( | RenderHint | hint,
|  | bool | on = `true`
| ) |  | `[inherited]`

Toggle an render hint

Parameters:

  hint | Render hint
  on | true/false

See also:
  testRenderHint(), RenderHint

void QwtPlotCurve::setSamples | ( | const QVector< double > & | xData,
|  | const QVector< double > & | yData
| ) |  |

Initialize data with x- and y-arrays (explicitly shared)

Parameters:

  xData | x data
  yData | y data

See also:
  QwtPointArrayData

void QwtPlotCurve::setSamples | ( | const QVector< QPointF > & | samples | ) |

Initialize data with an array of points (explicitly shared).

Parameters:

  samples | Vector of points

void QwtPlotCurve::setSamples | ( | const double * | xData,
|  | const double * | yData,
|  | int | size
| ) |  |

Set data by copying x- and y-values from specified memory blocks. Contrary to setRawSamples(), this function makes a 'deep copy' of the data.

Parameters:

  xData | pointer to x values
  yData | pointer to y values
  size | size of xData and yData

See also:
  QwtPointArrayData

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

Set the curve's drawing style

Parameters:

  style | Curve style

See also:
  style()

void QwtPlotCurve::setSymbol | ( | const QwtSymbol * | symbol | ) |

Assign a symbol

Parameters:

  symbol | Symbol

See also:
  symbol()

void QwtPlotItem::setTitle | ( | const QwtText & | title | ) | `[inherited]`

Set a new title

Parameters:

  title | Title

See also:
  title()

void QwtPlotItem::setTitle | ( | const QString & | title | ) | `[inherited]`

Set a new title

Parameters:

  title | Title

See also:
  title()

void QwtPlotItem::setVisible | ( | bool | on | ) | `[virtual, inherited]`

Show/Hide the item

Parameters:

  on | Show if true, otherwise hide

See also:
  isVisible(), show(), hide()

void QwtPlotItem::setXAxis | ( | int | axis | ) | `[inherited]`

Set the X axis

The item will painted according to the coordinates its Axes.

Parameters:

  axis | X Axis

See also:
  setAxes(), setYAxis(), xAxis()

void QwtPlotItem::setYAxis | ( | int | axis | ) | `[inherited]`

Set the Y axis

The item will painted according to the coordinates its Axes.

Parameters:

  axis | Y Axis

See also:
  setAxes(), setXAxis(), yAxis()

void QwtPlotItem::setZ | ( | double | z | ) | `[inherited]`

Set the z value.

Plot items are painted in increasing z-order.

Parameters:

  z | Z-value

See also:
  z(), QwtPlotDict::itemList()

void QwtPlotItem::show | ( |  | ) | `[inherited]`

Show the item.

QwtPlotCurve::CurveStyle QwtPlotCurve::style | ( |  | ) | const

Return the current style

See also:
  setStyle()

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

Returns:
  Current symbol or NULL, when no symbol has been assigned

See also:
  setSymbol()

bool QwtPlotCurve::testCurveAttribute | ( | CurveAttribute | attribute | ) | const

Returns:
  true, if attribute is enabled

See also:
  setCurveAttribute()

bool QwtPlotItem::testItemAttribute | ( | ItemAttribute | attribute | ) | const`[inherited]`

Test an item attribute

Parameters:

  attribute | Attribute type

Returns:
  true/false

See also:
  setItemAttribute(), ItemAttribute

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

Return the current paint attributes.

See also:
  setLegendAttribute()

bool QwtPlotCurve::testPaintAttribute | ( | PaintAttribute | attribute | ) | const

Return the current paint attributes.

See also:
  setPaintAttribute()

bool QwtPlotItem::testRenderHint | ( | RenderHint | hint | ) | const`[inherited]`

Test a render hint

Parameters:

  hint | Render hint

Returns:
  true/false

See also:
  setRenderHint(), RenderHint

const QwtText & QwtPlotItem::title | ( |  | ) | const`[inherited]`

Returns:
  Title of the item

See also:
  setTitle()

void QwtPlotCurve::updateLegend | ( | QwtLegend * | legend | ) | const`[virtual]`

Update the widget that represents the item on the legend.

Parameters:

  legend | Legend

See also:
  drawLegendIdentifier(), legendItem(), QwtPlotItem::Legend

Reimplemented from QwtPlotItem.

virtual void QwtPlotSeriesItem< QPointF >::updateScaleDiv | ( | const QwtScaleDiv & | xScaleDiv,
|  | const QwtScaleDiv & | yScaleDiv
| ) |  | `[virtual, inherited]`

Update the rect of interest according to the current scale ranges

Parameters:

  xScaleDiv | Scale division of the x-axis
  yScaleDiv | Scale division of the y-axis

See also:
  QwtSeriesData<T>::setRectOfInterest()

Reimplemented from QwtPlotItem.

int QwtPlotItem::xAxis | ( |  | ) | const`[inherited]`

Return xAxis.

int QwtPlotItem::yAxis | ( |  | ) | const`[inherited]`

Return yAxis.

double QwtPlotItem::z | ( |  | ) | const`[inherited]`

Plot items are painted in increasing z-order.

Returns:
  setZ(), QwtPlotDict::itemList()

## Member Data Documentation

QwtSeriesData<QPointF >* QwtPlotSeriesItem< QPointF >::d_series`[protected, inherited]`

Series.