@@ -80,12 +80,6 QAbstractSeries::SeriesType QSplineSeries::type() const | |||
|
80 | 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 | 84 | Sets the \a modelX to be used as a data source for x coordinate and \a modelY to be used |
|
91 | 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 | 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 | 221 | Updates the control points, besed on currently avaiable knots. |
|
221 | 222 | */ |
@@ -40,7 +40,7 public: | |||
|
40 | 40 | ~QSplineSeries(); |
|
41 | 41 | QAbstractSeries::SeriesType type() const; |
|
42 | 42 | |
|
43 | QPointF controlPoint(int index) const; | |
|
43 | // QPointF controlPoint(int index) const; | |
|
44 | 44 | |
|
45 | 45 | void setModelMapping(int modelX, int modelY, Qt::Orientation orientation = Qt::Vertical); |
|
46 | 46 | void setModelMappingRange(int first, int count = -1); |
@@ -42,6 +42,8 public: | |||
|
42 | 42 | Chart* createGraphics(ChartPresenter* presenter); |
|
43 | 43 | QSplineSeriesPrivate(QSplineSeries* q); |
|
44 | 44 | |
|
45 | QPointF controlPoint(int index) const; | |
|
46 | ||
|
45 | 47 | public Q_SLOTS: |
|
46 | 48 | void updateControlPoints(); |
|
47 | 49 |
@@ -74,7 +74,8 void SplineChartItem::updateLayout(QVector<QPointF> &oldPoints, QVector<QPointF> | |||
|
74 | 74 | |
|
75 | 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 | 81 | void SplineChartItem::setLayout(QVector<QPointF> &points) |
General Comments 0
You need to be logged in to leave comments.
Login now