|
1 | NO CONTENT: modified file |
@@ -200,8 +200,6 QVector<qreal> QSplineSeriesPrivate::firstControlPoints(const QVector<qreal>& ve | |||
|
200 | 200 | |
|
201 | 201 | QPointF QSplineSeriesPrivate::controlPoint(int index) const |
|
202 | 202 | { |
|
203 | // Q_D(const QSplineSeries); | |
|
204 | // return d->m_controlPoints[index]; | |
|
205 | 203 | return m_controlPoints[index]; |
|
206 | 204 | } |
|
207 | 205 |
@@ -84,12 +84,11 void SplineChartItem::updateChart(QVector<QPointF> &oldPoints, QVector<QPointF> | |||
|
84 | 84 | controlPoints[2 * i + 1] = calculateGeometryControlPoint(2 * i + 1); |
|
85 | 85 | } |
|
86 | 86 | |
|
87 |
if (m_animation) |
|
|
87 | if (m_animation) | |
|
88 | 88 | m_animation->setup(oldPoints,newPoints,m_controlPoints,controlPoints,index); |
|
89 | } | |
|
90 | 89 | |
|
91 |
|
|
|
92 | setControlGeometryPoints(controlPoints); | |
|
90 | m_points = newPoints; | |
|
91 | m_controlPoints = controlPoints; | |
|
93 | 92 | setDirty(false); |
|
94 | 93 | |
|
95 | 94 | if (m_animation) { |
@@ -106,8 +105,8 QPointF SplineChartItem::calculateGeometryControlPoint(int index) const | |||
|
106 | 105 | |
|
107 | 106 | void SplineChartItem::updateGeometry() |
|
108 | 107 | { |
|
109 |
const QVector<QPointF> &points = |
|
|
110 |
const QVector<QPointF> &controlPoints = control |
|
|
108 | const QVector<QPointF> &points = m_points; | |
|
109 | const QVector<QPointF> &controlPoints = m_controlPoints; | |
|
111 | 110 | |
|
112 | 111 | if ((points.size()<2) || (controlPoints.size()<2)) { |
|
113 | 112 | prepareGeometryChange(); |
@@ -224,7 +224,6 void QXYSeries::replace(const QPointF &oldPoint,const QPointF &newPoint) | |||
|
224 | 224 | int index = d->m_points.indexOf(oldPoint); |
|
225 | 225 | if(index==-1) return; |
|
226 | 226 | d->m_points[index] = newPoint; |
|
227 | // emit d->pointReplaced(index); | |
|
228 | 227 | emit pointReplaced(index); |
|
229 | 228 | } |
|
230 | 229 |
@@ -41,9 +41,6 m_series(series), | |||
|
41 | 41 | m_animation(0), |
|
42 | 42 | m_dirty(true) |
|
43 | 43 | { |
|
44 | // QObject::connect(series->d_func(),SIGNAL(pointReplaced(int)),this,SLOT(handlePointReplaced(int))); | |
|
45 | // QObject::connect(series->d_func(),SIGNAL(pointAdded(int)),this,SLOT(handlePointAdded(int))); | |
|
46 | // QObject::connect(series->d_func(),SIGNAL(pointRemoved(int)),this,SLOT(handlePointRemoved(int))); | |
|
47 | 44 | QObject::connect(series, SIGNAL(pointReplaced(int)), this,SLOT(handlePointReplaced(int))); |
|
48 | 45 | QObject::connect(series, SIGNAL(pointAdded(int)), this,SLOT(handlePointAdded(int))); |
|
49 | 46 | QObject::connect(series, SIGNAL(pointRemoved(int)), this,SLOT(handlePointRemoved(int))); |
@@ -120,12 +117,12 void XYChart::updateChart(QVector<QPointF> &oldPoints, QVector<QPointF> &newPoin | |||
|
120 | 117 | |
|
121 | 118 | if (m_animation) { |
|
122 | 119 | m_animation->setup(oldPoints, newPoints, index); |
|
123 |
|
|
|
120 | m_points = newPoints; | |
|
124 | 121 | setDirty(false); |
|
125 | 122 | presenter()->startAnimation(m_animation); |
|
126 | 123 | } |
|
127 | 124 | else { |
|
128 |
|
|
|
125 | m_points = newPoints; | |
|
129 | 126 | updateGeometry(); |
|
130 | 127 | } |
|
131 | 128 | } |
@@ -46,7 +46,7 class XYChart : public ChartElement | |||
|
46 | 46 | Q_OBJECT |
|
47 | 47 | public: |
|
48 | 48 | explicit XYChart(QXYSeries *series, ChartPresenter *presenter); |
|
49 |
~XYChart(){} |
|
|
49 | ~XYChart() {} | |
|
50 | 50 | |
|
51 | 51 | void setGeometryPoints(const QVector<QPointF>& points); |
|
52 | 52 | QVector<QPointF> geometryPoints() const { return m_points; } |
@@ -84,7 +84,7 protected: | |||
|
84 | 84 | private: |
|
85 | 85 | inline bool isEmpty(); |
|
86 | 86 | |
|
87 | private: | |
|
87 | protected: | |
|
88 | 88 | qreal m_minX; |
|
89 | 89 | qreal m_maxX; |
|
90 | 90 | qreal m_minY; |
General Comments 0
You need to be logged in to leave comments.
Login now