diff --git a/src/splinechart/qsplineseries.cpp b/src/splinechart/qsplineseries.cpp index 929d243..2ac56e3 100644 --- a/src/splinechart/qsplineseries.cpp +++ b/src/splinechart/qsplineseries.cpp @@ -66,6 +66,21 @@ QPointF QSplineSeries::controlPoint(int index) const return d->m_controlPoints[index]; } +/*! + \fn bool QSplineSeries::setModelMappingRange(int first, int count) + Allows limiting the model mapping. + Parameter \a first specifies which element of the model should be used as a first one of the series. + Parameter \a count specifies how many elements should be mapped. If count is not specified (defaults to -1) + then all the items following \a first item in a model are used. + \sa setModel(), setModelMapping() + */ +void QSplineSeries::setModelMapping(int modelX, int modelY, Qt::Orientation orientation) +{ + Q_D(QSplineSeries); + QXYSeries::setModelMapping(modelX, modelY, orientation); + d->calculateControlPoints(); +} + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// QSplineSeriesPrivate::QSplineSeriesPrivate(QSplineSeries* q):QLineSeriesPrivate(q) @@ -179,15 +194,6 @@ void QSplineSeriesPrivate::updateControlPoints() } } -/*! - \fn bool QSplineSeries::setModelMappingRange(int first, int count) - Allows limiting the model mapping. - Parameter \a first specifies which element of the model should be used as a first one of the series. - Parameter \a count specifies how many elements should be mapped. If count is not specified (defaults to -1) - then all the items following \a first item in a model are used. - \sa setModel(), setModelMapping() - */ - Chart* QSplineSeriesPrivate::createGraphics(ChartPresenter* presenter) { Q_Q(QSplineSeries); diff --git a/src/splinechart/qsplineseries.h b/src/splinechart/qsplineseries.h index ede2806..099233d 100644 --- a/src/splinechart/qsplineseries.h +++ b/src/splinechart/qsplineseries.h @@ -41,6 +41,8 @@ public: QPointF controlPoint(int index) const; + void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); + private: Q_DECLARE_PRIVATE(QSplineSeries); Q_DISABLE_COPY(QSplineSeries);