Qwt User's Guide
QwtPlotSeriesItem Class Reference

Base class for plot items representing a series of samples. More...

#include <qwt_plot_seriesitem.h>

Inheritance diagram for QwtPlotSeriesItem:

Public Member Functions

 QwtPlotSeriesItem (const QString &title=QString::null)
 QwtPlotSeriesItem (const QwtText &title)
virtual ~QwtPlotSeriesItem ()
 Destructor.
void setOrientation (Qt::Orientation)
Qt::Orientation orientation () const
virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const
 Draw the complete series.
virtual void drawSeries (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const =0
virtual QRectF boundingRect () const
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &)
 Update the item to changes of the axes scale division.

Protected Member Functions

virtual void dataChanged ()
 dataChanged() indicates, that the series has been changed.

Detailed Description

Base class for plot items representing a series of samples.


Constructor & Destructor Documentation

QwtPlotSeriesItem::QwtPlotSeriesItem ( const QString &  title = QString::null) [explicit]

Constructor

Parameters:
titleTitle of the curve
QwtPlotSeriesItem::QwtPlotSeriesItem ( const QwtText title) [explicit]

Constructor

Parameters:
titleTitle of the curve

Member Function Documentation

QRectF QwtPlotSeriesItem::boundingRect ( ) const [virtual]
Returns:
An invalid bounding rect: QRectF(1.0, 1.0, -2.0, -2.0)
Note:
A width or height < 0.0 is ignored by the autoscaler

Reimplemented from QwtPlotItem.

Reimplemented in QwtPlotTradingCurve, QwtPlotIntervalCurve, QwtPlotHistogram, QwtPlotBarChart, and QwtPlotMultiBarChart.

void QwtPlotSeriesItem::draw ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect 
) const [virtual]

Draw the complete series.

Parameters:
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
canvasRectContents rectangle of the canvas

Implements QwtPlotItem.

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

Draw a subset of the samples

Parameters:
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
canvasRectContents rectangle of the canvas
fromIndex of the first point to be painted
toIndex of the last point to be painted. If to < 0 the curve will be painted to its last point.

Implemented in QwtPlotCurve, QwtPlotTradingCurve, QwtPlotIntervalCurve, QwtPlotHistogram, QwtPlotBarChart, QwtPlotMultiBarChart, and QwtPlotSpectroCurve.

Qt::Orientation QwtPlotSeriesItem::orientation ( ) const
Returns:
Orientation of the plot item
See also:
setOrientation()
void QwtPlotSeriesItem::setOrientation ( Qt::Orientation  orientation)

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 QwtPlotSeriesItem::updateScaleDiv ( const QwtScaleDiv xScaleDiv,
const QwtScaleDiv yScaleDiv 
) [virtual]

Update the item to changes of the axes scale division.

Update the item, when the axes of plot have changed. The default implementation does nothing, but items that depend on the scale division (like QwtPlotGrid()) have to reimplement updateScaleDiv()

updateScaleDiv() is only called when the ScaleInterest interest is enabled. The default implementation does nothing.

Parameters:
xScaleDivScale division of the x-axis
yScaleDivScale division of the y-axis
See also:
QwtPlot::updateAxes(), ScaleInterest

Reimplemented from QwtPlotItem.

List of all members.

 All Classes Functions Variables Typedefs Enumerations Enumerator