Base class for plot items representing a series of samples. More...
#include <qwt_plot_seriesitem.h>
Classes | |
class | PrivateData |
Public Member Functions | |
virtual QRectF | boundingRect () 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 |
Qt::Orientation | orientation () const |
QwtPlotSeriesItem (const QString &title=QString::null) | |
QwtPlotSeriesItem (const QwtText &title) | |
void | setOrientation (Qt::Orientation) |
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
Update the item to changes of the axes scale division. | |
virtual | ~QwtPlotSeriesItem () |
Destructor. | |
Protected Member Functions | |
virtual void | dataChanged () |
dataChanged() indicates, that the series has been changed. | |
Private Attributes | |
PrivateData * | d_data |
Base class for plot items representing a series of samples.
Definition at line 22 of file qwt_plot_seriesitem.h.
QwtPlotSeriesItem::QwtPlotSeriesItem | ( | const QString & | title = QString::null | ) | [explicit] |
Constructor
title | Title of the curve |
Definition at line 38 of file qwt_plot_seriesitem.cpp.
QwtPlotSeriesItem::QwtPlotSeriesItem | ( | const QwtText & | title | ) | [explicit] |
Constructor
title | Title of the curve |
Definition at line 27 of file qwt_plot_seriesitem.cpp.
QwtPlotSeriesItem::~QwtPlotSeriesItem | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file qwt_plot_seriesitem.cpp.
QRectF QwtPlotSeriesItem::boundingRect | ( | ) | const [virtual] |
Reimplemented from QwtPlotItem.
Reimplemented in QwtPlotTradingCurve, QwtPlotIntervalCurve, QwtPlotHistogram, QwtPlotBarChart, and QwtPlotMultiBarChart.
Definition at line 94 of file qwt_plot_seriesitem.cpp.
void QwtPlotSeriesItem::dataChanged | ( | ) | [protected, virtual] |
dataChanged() indicates, that the series has been changed.
Implements QwtAbstractSeriesStore.
Definition at line 109 of file qwt_plot_seriesitem.cpp.
void QwtPlotSeriesItem::draw | ( | QPainter * | painter, |
const QwtScaleMap & | xMap, | ||
const QwtScaleMap & | yMap, | ||
const QRectF & | canvasRect | ||
) | const [virtual] |
Draw the complete series.
painter | Painter |
xMap | Maps x-values into pixel coordinates. |
yMap | Maps y-values into pixel coordinates. |
canvasRect | Contents rectangle of the canvas |
Implements QwtPlotItem.
Definition at line 87 of file qwt_plot_seriesitem.cpp.
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
painter | Painter |
xMap | Maps x-values into pixel coordinates. |
yMap | Maps y-values into pixel coordinates. |
canvasRect | Contents rectangle 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. |
Implemented in QwtPlotCurve, QwtPlotTradingCurve, QwtPlotIntervalCurve, QwtPlotHistogram, QwtPlotBarChart, QwtPlotMultiBarChart, and QwtPlotSpectroCurve.
Qt::Orientation QwtPlotSeriesItem::orientation | ( | ) | const |
Definition at line 74 of file qwt_plot_seriesitem.cpp.
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.
Definition at line 59 of file qwt_plot_seriesitem.cpp.
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.
xScaleDiv | Scale division of the x-axis |
yScaleDiv | Scale division of the y-axis |
Reimplemented from QwtPlotItem.
Definition at line 99 of file qwt_plot_seriesitem.cpp.
PrivateData* QwtPlotSeriesItem::d_data [private] |
Reimplemented from QwtPlotItem.
Reimplemented in QwtPlotCurve, QwtPlotTradingCurve, QwtPlotHistogram, QwtPlotIntervalCurve, QwtPlotMultiBarChart, QwtPlotBarChart, QwtPlotAbstractBarChart, and QwtPlotSpectroCurve.
Definition at line 62 of file qwt_plot_seriesitem.h.