@@ -71,7 +71,7 QSplineSeries::~QSplineSeries() | |||||
71 | { |
|
71 | { | |
72 | Q_D(QSplineSeries); |
|
72 | Q_D(QSplineSeries); | |
73 | if(d->m_dataset){ |
|
73 | if(d->m_dataset){ | |
74 |
|
|
74 | d->m_dataset->removeSeries(this); | |
75 | } |
|
75 | } | |
76 | } |
|
76 | } | |
77 |
|
77 | |||
@@ -80,12 +80,6 QAbstractSeries::SeriesType QSplineSeries::type() const | |||||
80 | return QAbstractSeries::SeriesTypeSpline; |
|
80 | return QAbstractSeries::SeriesTypeSpline; | |
81 | } |
|
81 | } | |
82 |
|
82 | |||
83 | QPointF QSplineSeries::controlPoint(int index) const |
|
|||
84 | { |
|
|||
85 | Q_D(const QSplineSeries); |
|
|||
86 | return d->m_controlPoints[index]; |
|
|||
87 | } |
|
|||
88 |
|
||||
89 | /*! |
|
83 | /*! | |
90 | Sets the \a modelX to be used as a data source for x coordinate and \a modelY to be used |
|
84 | Sets the \a modelX to be used as a data source for x coordinate and \a modelY to be used | |
91 | as a data source for y coordinate. The \a orientation parameter specifies whether the data |
|
85 | as a data source for y coordinate. The \a orientation parameter specifies whether the data | |
@@ -216,6 +210,13 QVector<qreal> QSplineSeriesPrivate::firstControlPoints(const QVector<qreal>& ve | |||||
216 | return result; |
|
210 | return result; | |
217 | } |
|
211 | } | |
218 |
|
212 | |||
|
213 | QPointF QSplineSeriesPrivate::controlPoint(int index) const | |||
|
214 | { | |||
|
215 | // Q_D(const QSplineSeries); | |||
|
216 | // return d->m_controlPoints[index]; | |||
|
217 | return m_controlPoints[index]; | |||
|
218 | } | |||
|
219 | ||||
219 | /*! |
|
220 | /*! | |
220 | Updates the control points, besed on currently avaiable knots. |
|
221 | Updates the control points, besed on currently avaiable knots. | |
221 | */ |
|
222 | */ |
@@ -40,7 +40,7 public: | |||||
40 | ~QSplineSeries(); |
|
40 | ~QSplineSeries(); | |
41 | QAbstractSeries::SeriesType type() const; |
|
41 | QAbstractSeries::SeriesType type() const; | |
42 |
|
42 | |||
43 | QPointF controlPoint(int index) const; |
|
43 | // QPointF controlPoint(int index) const; | |
44 |
|
44 | |||
45 | void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); |
|
45 | void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); | |
46 | void setModelMappingRange(int first, int count = -1); |
|
46 | void setModelMappingRange(int first, int count = -1); |
@@ -42,6 +42,8 public: | |||||
42 | Chart* createGraphics(ChartPresenter* presenter); |
|
42 | Chart* createGraphics(ChartPresenter* presenter); | |
43 | QSplineSeriesPrivate(QSplineSeries* q); |
|
43 | QSplineSeriesPrivate(QSplineSeries* q); | |
44 |
|
44 | |||
|
45 | QPointF controlPoint(int index) const; | |||
|
46 | ||||
45 | public Q_SLOTS: |
|
47 | public Q_SLOTS: | |
46 | void updateControlPoints(); |
|
48 | void updateControlPoints(); | |
47 |
|
49 |
@@ -74,7 +74,8 void SplineChartItem::updateLayout(QVector<QPointF> &oldPoints, QVector<QPointF> | |||||
74 |
|
74 | |||
75 | QPointF SplineChartItem::calculateGeometryControlPoint(int index) const |
|
75 | QPointF SplineChartItem::calculateGeometryControlPoint(int index) const | |
76 | { |
|
76 | { | |
77 | return XYChartItem::calculateGeometryPoint(m_series->controlPoint(index)); |
|
77 | // return XYChartItem::calculateGeometryPoint(m_series->controlPoint(index)); | |
|
78 | return XYChartItem::calculateGeometryPoint(m_series->d_func()->controlPoint(index)); | |||
78 | } |
|
79 | } | |
79 |
|
80 | |||
80 | void SplineChartItem::setLayout(QVector<QPointF> &points) |
|
81 | void SplineChartItem::setLayout(QVector<QPointF> &points) |
General Comments 0
You need to be logged in to leave comments.
Login now