diff --git a/src/animations/axisanimation.cpp b/src/animations/axisanimation.cpp index dc224e1..49842b8 100644 --- a/src/animations/axisanimation.cpp +++ b/src/animations/axisanimation.cpp @@ -57,11 +57,6 @@ void AxisAnimation::setValues(QVector &oldLayout, QVector &newLayo { if (state() != QAbstractAnimation::Stopped) stop(); -// TODO: cannot return even if layout is empty -// New layout is not set properly without it (crash) -// if (newLayout.count() == 0) -// return; - switch (m_type) { case ZoomOutAnimation: { QRectF rect = m_axis->gridGeometry(); @@ -130,7 +125,6 @@ void AxisAnimation::updateCurrentValue(const QVariant &value) { if (state() != QAbstractAnimation::Stopped) { //workaround QVector vector = qvariant_cast >(value); -// Q_ASSERT(vector.count() != 0); m_axis->setLayout(vector); m_axis->updateGeometry(); } diff --git a/src/areachart/areachartitem.cpp b/src/areachart/areachartitem.cpp index 5ef8805..99b6c32 100644 --- a/src/areachart/areachartitem.cpp +++ b/src/areachart/areachartitem.cpp @@ -31,10 +31,8 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -//TODO: optimize : remove points which are not visible - AreaChartItem::AreaChartItem(QAreaSeries *areaSeries, QGraphicsItem* item) - : ChartItem(areaSeries->d_func(),item), //TODO: fix me + : ChartItem(areaSeries->d_func(),item), m_series(areaSeries), m_upper(0), m_lower(0), diff --git a/src/areachart/qareaseries.cpp b/src/areachart/qareaseries.cpp index be6e605..952e6ee 100644 --- a/src/areachart/qareaseries.cpp +++ b/src/areachart/qareaseries.cpp @@ -213,8 +213,7 @@ void QAreaSeries::setUpperSeries(QLineSeries *series) { Q_D(QAreaSeries); if(d->m_upperSeries!=series){ - d->m_upperSeries = series; - //TODO: + d->m_upperSeries = series; } } diff --git a/src/axis/barcategoryaxis/qbarcategoryaxis.cpp b/src/axis/barcategoryaxis/qbarcategoryaxis.cpp index ba06d69..99cf20a 100644 --- a/src/axis/barcategoryaxis/qbarcategoryaxis.cpp +++ b/src/axis/barcategoryaxis/qbarcategoryaxis.cpp @@ -247,8 +247,7 @@ void QBarCategoryAxis::remove(const QString &category) } else if (d->m_maxCategory == category) { setRange(d->m_minCategory, d->m_categories.last()); } else { - d->updateCategoryDomain(); - //TODO:: d->emitUpdated(); + d->updateCategoryDomain(); } } else { setRange(QString::null, QString::null); @@ -281,8 +280,7 @@ void QBarCategoryAxis::insert(int index, const QString &category) } else if (index == count) { setRange(d->m_minCategory, d->m_categories.last()); } else { - d->updateCategoryDomain(); - //TODO:: d->emitUpdated(); + d->updateCategoryDomain(); } emit categoriesChanged(); @@ -306,8 +304,6 @@ void QBarCategoryAxis::replace(const QString &oldCategory, const QString &newCat setRange(newCategory, d->m_maxCategory); } else if (d->m_maxCategory == oldCategory) { setRange(d->m_minCategory, newCategory); - } else { - //TODO:: d->emitUpdated(); } emit categoriesChanged(); emit countChanged(); diff --git a/src/axis/categoryaxis/chartcategoryaxisx.cpp b/src/axis/categoryaxis/chartcategoryaxisx.cpp index ca9e176..b4fa744 100644 --- a/src/axis/categoryaxis/chartcategoryaxisx.cpp +++ b/src/axis/categoryaxis/chartcategoryaxisx.cpp @@ -66,8 +66,7 @@ QVector ChartCategoryAxisX::calculateLayout() const } void ChartCategoryAxisX::updateGeometry() -{ - //TODO: this is not optimal when many categories :( , create only visible lables +{ setLabels(m_axis->categoriesLabels() << ""); HorizontalAxis::updateGeometry(); } diff --git a/src/axis/categoryaxis/chartcategoryaxisy.cpp b/src/axis/categoryaxis/chartcategoryaxisy.cpp index ec0b4da..b7176b4 100644 --- a/src/axis/categoryaxis/chartcategoryaxisy.cpp +++ b/src/axis/categoryaxis/chartcategoryaxisy.cpp @@ -74,8 +74,7 @@ void ChartCategoryAxisY::updateGeometry() void ChartCategoryAxisY::handleAxisUpdated() { - updateGeometry(); - //TODO:: ChartAxis::handleAxisUpdated(); + updateGeometry(); } QSizeF ChartCategoryAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const diff --git a/src/axis/categoryaxis/qcategoryaxis.cpp b/src/axis/categoryaxis/qcategoryaxis.cpp index 0db64fd..e288fed 100644 --- a/src/axis/categoryaxis/qcategoryaxis.cpp +++ b/src/axis/categoryaxis/qcategoryaxis.cpp @@ -226,8 +226,7 @@ void QCategoryAxis::remove(const QString &categoryLabel) range.first = d->m_categoriesMap.value(d->m_categories.at(labelIndex - 1)).second; d->m_categoriesMap.insert(label, range); } - } - //TODO:: d->emitUpdated(); + } } } @@ -250,8 +249,7 @@ void QCategoryAxis::replaceLabel(const QString &oldLabel, const QString &newLabe d->m_categories.replace(labelIndex, newLabel); Range range = d->m_categoriesMap.value(oldLabel); d->m_categoriesMap.remove(oldLabel); - d->m_categoriesMap.insert(newLabel, range); - //TODO:: d->emitUpdated(); + d->m_categoriesMap.insert(newLabel, range); } } diff --git a/src/axis/chartaxis.cpp b/src/axis/chartaxis.cpp index eda1924..bc6bd2b 100644 --- a/src/axis/chartaxis.cpp +++ b/src/axis/chartaxis.cpp @@ -419,9 +419,6 @@ void ChartAxis::handleRangeChanged(qreal min, qreal max) QStringList ChartAxis::createValueLabels(qreal min, qreal max, int ticks,const QString& format) { - //TODO: Q_ASSERT(m_max > m_min); - //TODO: Q_ASSERT(ticks > 1); - QStringList labels; if(max <= min || ticks < 1){ @@ -509,8 +506,6 @@ QStringList ChartAxis::createLogValueLabels(qreal min, qreal max, qreal base, in QStringList ChartAxis::createDateTimeLabels(qreal min, qreal max,int ticks,const QString& format) { - //TODO: Q_ASSERT(m_max > m_min); - //TODO: Q_ASSERT(ticks > 1); QStringList labels; if(max <= min || ticks < 1) { diff --git a/src/axis/qabstractaxis.cpp b/src/axis/qabstractaxis.cpp index f3669b5..a1720d1 100644 --- a/src/axis/qabstractaxis.cpp +++ b/src/axis/qabstractaxis.cpp @@ -468,7 +468,6 @@ QPen QAbstractAxis::linePen() const return d_ptr->m_axisPen; } -//TODO: remove me void QAbstractAxis::setLinePenColor(QColor color) { QPen p = d_ptr->m_axisPen; @@ -614,7 +613,7 @@ int QAbstractAxis::labelsAngle() const { return d_ptr->m_labelsAngle; } -//TODO: remove me + void QAbstractAxis::setLabelsColor(QColor color) { QBrush b = d_ptr->m_labelsBrush; @@ -863,8 +862,6 @@ void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) /*! Returns the orientation in which the axis is being used (Vertical or Horizontal) */ -// NOTE: should have const but it breaks BC: -// http://techbase.kde.org/Policies/Binary_Compatibility_Examples#Change_the_CV-qualifiers_of_a_member_function Qt::Orientation QAbstractAxis::orientation() { return d_ptr->orientation(); @@ -931,7 +928,7 @@ void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) if (forced || brush == m_labelsBrush){ q_ptr->setLabelsBrush(theme->labelBrush()); } - //TODO: introduce axis brush + if (forced || brush == m_titleBrush){ q_ptr->setTitleBrush(theme->labelBrush()); } @@ -967,7 +964,7 @@ void QAbstractAxisPrivate::initializeTheme(ChartTheme* theme, bool forced) if (forced || font == m_labelsFont){ q_ptr->setLabelsFont(theme->labelFont()); } - //TODO: discuss with Tero + if (forced || font == m_titleFont){ QFont font(m_labelsFont); font.setBold(true); diff --git a/src/axis/qabstractaxis.h b/src/axis/qabstractaxis.h index 161bebe..b28b9dc 100644 --- a/src/axis/qabstractaxis.h +++ b/src/axis/qabstractaxis.h @@ -43,7 +43,7 @@ class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) Q_PROPERTY(QPen labelsPen READ labelsPen WRITE setLabelsPen NOTIFY labelsPenChanged) Q_PROPERTY(QBrush labelsBrush READ labelsBrush WRITE setLabelsBrush NOTIFY labelsBrushChanged) - //TODO: fix labels angles to work with layout + Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle NOTIFY labelsAngleChanged) Q_PROPERTY(QFont labelsFont READ labelsFont WRITE setLabelsFont NOTIFY labelsFontChanged) Q_PROPERTY(QColor labelsColor READ labelsColor WRITE setLabelsColor NOTIFY labelsColorChanged) @@ -146,7 +146,7 @@ public: void setShadesBorderColor(QColor color); QColor shadesBorderColor() const; - Qt::Orientation orientation(); //TODO: missing const <- BC + Qt::Orientation orientation(); Qt::Alignment alignment() const; //range handling diff --git a/src/axis/valueaxis/qvalueaxis.h b/src/axis/valueaxis/qvalueaxis.h index 142d21e..9802485 100644 --- a/src/axis/valueaxis/qvalueaxis.h +++ b/src/axis/valueaxis/qvalueaxis.h @@ -60,7 +60,7 @@ public: void setLabelFormat(const QString &format); QString labelFormat() const; - //TODO: depreciated ! + void setNiceNumbersEnabled(bool enable = true); bool niceNumbersEnabled() const; diff --git a/src/axis/valueaxis/qvalueaxis_p.h b/src/axis/valueaxis/qvalueaxis_p.h index aaa7037..260661c 100644 --- a/src/axis/valueaxis/qvalueaxis_p.h +++ b/src/axis/valueaxis/qvalueaxis_p.h @@ -61,7 +61,7 @@ private: int m_tickCount; QString m_format; bool m_applying; - bool m_niceNumbersEnabled; //TODO: this depreciated + bool m_niceNumbersEnabled; Q_DECLARE_PUBLIC(QValueAxis) }; diff --git a/src/chartthememanager.cpp b/src/chartthememanager.cpp index 989aecc..335570b 100644 --- a/src/chartthememanager.cpp +++ b/src/chartthememanager.cpp @@ -183,9 +183,6 @@ QList ChartThemeManager::generateSeriesGradients(const QList& qreal h = color.hsvHueF(); qreal s = color.hsvSaturationF(); - // TODO: tune the algorithm to give nice results with most base colors defined in - // most themes. The rest of the gradients we can define manually in theme specific - // implementation. QColor start = color; start.setHsvF(h, 0.0, 1.0); g.setColorAt(0.0, start); diff --git a/src/legend/qlegendmarker_p.h b/src/legend/qlegendmarker_p.h index b041952..8c85dc5 100644 --- a/src/legend/qlegendmarker_p.h +++ b/src/legend/qlegendmarker_p.h @@ -39,7 +39,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -// TODO: check these + class QAbstractSeries; class QAreaSeries; class QXYSeries; diff --git a/src/qabstractseries.cpp b/src/qabstractseries.cpp index 809fa3d..c90aa34 100644 --- a/src/qabstractseries.cpp +++ b/src/qabstractseries.cpp @@ -204,11 +204,6 @@ QChart *QAbstractSeries::chart() const return d_ptr->m_chart; } -//void QAbstractSeries::adjustView() -//{ -// //TODO: -//} - /*! \brief Sets the visibility of the series to true diff --git a/src/qchart.cpp b/src/qchart.cpp index f0dd9d3..8388d6f 100644 --- a/src/qchart.cpp +++ b/src/qchart.cpp @@ -118,8 +118,6 @@ QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) { d_ptr->m_legend = new LegendScroller(this); setTheme(QChart::ChartThemeLight); - //TODO: what is that ? - //connect(d_ptr->m_presenter, SIGNAL(marginsChanged(QRectF)), this, SIGNAL(marginsChanged(QRectF))); setLayout(d_ptr->m_presenter->layout()); } @@ -449,15 +447,6 @@ QRectF QChart::plotArea() const return d_ptr->m_presenter->geometry(); } -///*! -// TODO: Dummy. -// Adjest the ranges of the axes so that all the data of the specified \a series is visible -// */ -//void QChart::adjustViewToSeries(QAbstractSeries* series) -//{ -// // -//} - /*! Sets animation \a options for the chart */ diff --git a/src/scatterchart/scatterchartitem.cpp b/src/scatterchart/scatterchartitem.cpp index 3b6a06c..ef28a55 100644 --- a/src/scatterchart/scatterchartitem.cpp +++ b/src/scatterchart/scatterchartitem.cpp @@ -176,8 +176,7 @@ void ScatterChartItem::handleUpdated() m_shape = m_series->markerShape(); setOpacity(m_series->opacity()); - if (recreate) { - // TODO: optimize handleUpdate to recreate points only in case shape changed + if (recreate) { deletePoints(count); createPoints(count); diff --git a/src/xychart/xychart.cpp b/src/xychart/xychart.cpp index 26bed33..2109faa 100644 --- a/src/xychart/xychart.cpp +++ b/src/xychart/xychart.cpp @@ -30,8 +30,6 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -//TODO: optimize : remove points which are not visible - XYChart::XYChart(QXYSeries *series,QGraphicsItem* item): ChartItem(series->d_func(),item), m_series(series),