@@ -57,11 +57,6 void AxisAnimation::setValues(QVector<qreal> &oldLayout, QVector<qreal> &newLayo | |||
|
57 | 57 | { |
|
58 | 58 | if (state() != QAbstractAnimation::Stopped) stop(); |
|
59 | 59 | |
|
60 | // TODO: cannot return even if layout is empty | |
|
61 | // New layout is not set properly without it (crash) | |
|
62 | // if (newLayout.count() == 0) | |
|
63 | // return; | |
|
64 | ||
|
65 | 60 | switch (m_type) { |
|
66 | 61 | case ZoomOutAnimation: { |
|
67 | 62 | QRectF rect = m_axis->gridGeometry(); |
@@ -130,7 +125,6 void AxisAnimation::updateCurrentValue(const QVariant &value) | |||
|
130 | 125 | { |
|
131 | 126 | if (state() != QAbstractAnimation::Stopped) { //workaround |
|
132 | 127 | QVector<qreal> vector = qvariant_cast<QVector<qreal> >(value); |
|
133 | // Q_ASSERT(vector.count() != 0); | |
|
134 | 128 | m_axis->setLayout(vector); |
|
135 | 129 | m_axis->updateGeometry(); |
|
136 | 130 | } |
@@ -31,8 +31,6 | |||
|
31 | 31 | |
|
32 | 32 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
33 | 33 | |
|
34 | //TODO: optimize : remove points which are not visible | |
|
35 | ||
|
36 | 34 | AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) |
|
37 | 35 | : ChartItem(areaSeries->d_func(),item), |
|
38 | 36 | m_series(areaSeries), |
@@ -248,7 +248,6 void QBarCategoryAxis::remove(const QString &category) | |||
|
248 | 248 | setRange(d->m_minCategory, d->m_categories.last()); |
|
249 | 249 | } else { |
|
250 | 250 | d->updateCategoryDomain(); |
|
251 | //TODO:: d->emitUpdated(); | |
|
252 | 251 | } |
|
253 | 252 | } else { |
|
254 | 253 | setRange(QString::null, QString::null); |
@@ -282,7 +281,6 void QBarCategoryAxis::insert(int index, const QString &category) | |||
|
282 | 281 | setRange(d->m_minCategory, d->m_categories.last()); |
|
283 | 282 | } else { |
|
284 | 283 | d->updateCategoryDomain(); |
|
285 | //TODO:: d->emitUpdated(); | |
|
286 | 284 | } |
|
287 | 285 | |
|
288 | 286 | emit categoriesChanged(); |
@@ -306,8 +304,6 void QBarCategoryAxis::replace(const QString &oldCategory, const QString &newCat | |||
|
306 | 304 | setRange(newCategory, d->m_maxCategory); |
|
307 | 305 | } else if (d->m_maxCategory == oldCategory) { |
|
308 | 306 | setRange(d->m_minCategory, newCategory); |
|
309 | } else { | |
|
310 | //TODO:: d->emitUpdated(); | |
|
311 | 307 | } |
|
312 | 308 | emit categoriesChanged(); |
|
313 | 309 | emit countChanged(); |
@@ -67,7 +67,6 QVector<qreal> ChartCategoryAxisX::calculateLayout() const | |||
|
67 | 67 | |
|
68 | 68 | void ChartCategoryAxisX::updateGeometry() |
|
69 | 69 | { |
|
70 | //TODO: this is not optimal when many categories :( , create only visible lables | |
|
71 | 70 | setLabels(m_axis->categoriesLabels() << ""); |
|
72 | 71 | HorizontalAxis::updateGeometry(); |
|
73 | 72 | } |
@@ -227,7 +227,6 void QCategoryAxis::remove(const QString &categoryLabel) | |||
|
227 | 227 | d->m_categoriesMap.insert(label, range); |
|
228 | 228 | } |
|
229 | 229 | } |
|
230 | //TODO:: d->emitUpdated(); | |
|
231 | 230 | } |
|
232 | 231 | } |
|
233 | 232 | |
@@ -251,7 +250,6 void QCategoryAxis::replaceLabel(const QString &oldLabel, const QString &newLabe | |||
|
251 | 250 | Range range = d->m_categoriesMap.value(oldLabel); |
|
252 | 251 | d->m_categoriesMap.remove(oldLabel); |
|
253 | 252 | d->m_categoriesMap.insert(newLabel, range); |
|
254 | //TODO:: d->emitUpdated(); | |
|
255 | 253 | } |
|
256 | 254 | } |
|
257 | 255 |
@@ -468,7 +468,6 QPen QAbstractAxis::linePen() const | |||
|
468 | 468 | return d_ptr->m_axisPen; |
|
469 | 469 | } |
|
470 | 470 | |
|
471 | //TODO: remove me 2.0 | |
|
472 | 471 | void QAbstractAxis::setLinePenColor(QColor color) |
|
473 | 472 | { |
|
474 | 473 | QPen p = d_ptr->m_axisPen; |
@@ -614,7 +613,6 int QAbstractAxis::labelsAngle() const | |||
|
614 | 613 | { |
|
615 | 614 | return d_ptr->m_labelsAngle; |
|
616 | 615 | } |
|
617 | //TODO: remove me 2.0 | |
|
618 | 616 | void QAbstractAxis::setLabelsColor(QColor color) |
|
619 | 617 | { |
|
620 | 618 | QBrush b = d_ptr->m_labelsBrush; |
@@ -863,8 +861,6 void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) | |||
|
863 | 861 | /*! |
|
864 | 862 | Returns the orientation in which the axis is being used (Vertical or Horizontal) |
|
865 | 863 | */ |
|
866 | // NOTE: should have const but it breaks BC: | |
|
867 | // http://techbase.kde.org/Policies/Binary_Compatibility_Examples#Change_the_CV-qualifiers_of_a_member_function | |
|
868 | 864 | Qt::Orientation QAbstractAxis::orientation() |
|
869 | 865 | { |
|
870 | 866 | return d_ptr->orientation(); |
@@ -926,7 +922,6 void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) | |||
|
926 | 922 | |
|
927 | 923 | bool axisX = m_orientation == Qt::Horizontal; |
|
928 | 924 | |
|
929 | //TODO: introduce axis brush | |
|
930 | 925 | if (m_visible) { |
|
931 | 926 | if (m_arrowVisible) { |
|
932 | 927 | if (forced || pen == m_axisPen) { |
@@ -145,7 +145,7 public: | |||
|
145 | 145 | void setShadesBorderColor(QColor color); |
|
146 | 146 | QColor shadesBorderColor() const; |
|
147 | 147 | |
|
148 |
Qt::Orientation orientation(); |
|
|
148 | Qt::Orientation orientation(); | |
|
149 | 149 | Qt::Alignment alignment() const; |
|
150 | 150 | |
|
151 | 151 | //range handling |
@@ -60,7 +60,6 public: | |||
|
60 | 60 | void setLabelFormat(const QString &format); |
|
61 | 61 | QString labelFormat() const; |
|
62 | 62 | |
|
63 | //TODO: deprecated! (2.0) | |
|
64 | 63 | void setNiceNumbersEnabled(bool enable = true); |
|
65 | 64 | bool niceNumbersEnabled() const; |
|
66 | 65 |
@@ -61,7 +61,7 private: | |||
|
61 | 61 | int m_tickCount; |
|
62 | 62 | QString m_format; |
|
63 | 63 | bool m_applying; |
|
64 |
bool m_niceNumbersEnabled; |
|
|
64 | bool m_niceNumbersEnabled; | |
|
65 | 65 | Q_DECLARE_PUBLIC(QValueAxis) |
|
66 | 66 | }; |
|
67 | 67 |
@@ -124,7 +124,6 public: | |||
|
124 | 124 | |
|
125 | 125 | void startAnimation(ChartAnimation *animation); |
|
126 | 126 | |
|
127 | //TODO refactor | |
|
128 | 127 | void setState(State state,QPointF point); |
|
129 | 128 | State state() const { return m_state; } |
|
130 | 129 | QPointF statePoint() const { return m_statePoint; } |
@@ -183,9 +183,6 QList<QGradient> ChartThemeManager::generateSeriesGradients(const QList<QColor>& | |||
|
183 | 183 | qreal h = color.hsvHueF(); |
|
184 | 184 | qreal s = color.hsvSaturationF(); |
|
185 | 185 | |
|
186 | // TODO: tune the algorithm to give nice results with most base colors defined in | |
|
187 | // most themes. The rest of the gradients we can define manually in theme specific | |
|
188 | // implementation. | |
|
189 | 186 | QColor start = color; |
|
190 | 187 | start.setHsvF(h, 0.0, 1.0); |
|
191 | 188 | g.setColorAt(0.0, start); |
@@ -39,7 +39,6 | |||
|
39 | 39 | |
|
40 | 40 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
41 | 41 | |
|
42 | // TODO: check these | |
|
43 | 42 | class QAbstractSeries; |
|
44 | 43 | class QAreaSeries; |
|
45 | 44 | class QXYSeries; |
@@ -447,15 +447,6 QRectF QChart::plotArea() const | |||
|
447 | 447 | return d_ptr->m_presenter->geometry(); |
|
448 | 448 | } |
|
449 | 449 | |
|
450 | ///*! | |
|
451 | // TODO: Dummy. | |
|
452 | // Adjust the ranges of the axes so that all the data of the specified \a series is visible | |
|
453 | // */ | |
|
454 | //void QChart::adjustViewToSeries(QAbstractSeries* series) | |
|
455 | //{ | |
|
456 | // // | |
|
457 | //} | |
|
458 | ||
|
459 | 450 | /*! |
|
460 | 451 | Sets animation \a options for the chart |
|
461 | 452 | */ |
General Comments 0
You need to be logged in to leave comments.
Login now