From d8a22544e059b1f3963c8aa473b98e657c09ee74 2012-06-18 11:07:51 From: sauimone Date: 2012-06-18 11:07:51 Subject: [PATCH] removed old unused category implementation from private bar series. --- diff --git a/src/barchart/qbarseries.cpp b/src/barchart/qbarseries.cpp index b6f3160..ad849b0 100644 --- a/src/barchart/qbarseries.cpp +++ b/src/barchart/qbarseries.cpp @@ -298,29 +298,8 @@ QBarSeriesPrivate::QBarSeriesPrivate(QBarSeries *q) : { } -void QBarSeriesPrivate::setCategories(QStringList categories) -{ - m_categories = categories; -} - -void QBarSeriesPrivate::insertCategory(int index, const QString category) -{ - m_categories.insert(index, category); - emit categoriesUpdated(); -} - -void QBarSeriesPrivate::removeCategory(int index) -{ - m_categories.removeAt(index); - emit categoriesUpdated(); -} - int QBarSeriesPrivate::categoryCount() const { - if (m_categories.count() > 0) { - return m_categories.count(); - } - // No categories defined. return count of longest set. int count = 0; for (int i=0; i 0) { - return m_categories; - } - - // No categories defined. retun list of indices. - QStringList categories; - - int count = categoryCount(); - for (int i = 0; i < count; i++) { - categories.append(QString::number(i)); - } - return categories; -} - void QBarSeriesPrivate::setBarWidth(qreal width) { if (width < 0.0) { @@ -379,15 +342,6 @@ void QBarSeriesPrivate::setLabelsVisible(bool visible) emit labelsVisibleChanged(visible); } -QString QBarSeriesPrivate::categoryName(int category) -{ - if ((category >= 0) && (category < m_categories.count())) { - return m_categories.at(category); - } - - return QString::number(category); -} - qreal QBarSeriesPrivate::min() { if (m_barSets.count() <= 0) { diff --git a/src/barchart/qbarseries_p.h b/src/barchart/qbarseries_p.h index cef1724..e7a03a1 100644 --- a/src/barchart/qbarseries_p.h +++ b/src/barchart/qbarseries_p.h @@ -44,12 +44,7 @@ class QBarSeriesPrivate : public QAbstractSeriesPrivate Q_OBJECT public: QBarSeriesPrivate(QBarSeries *parent); - // TODO: refactor/remove private category stuff - void setCategories(QStringList categories); - void insertCategory(int index, const QString category); - void removeCategory(int index); int categoryCount() const; - QStringList categories() const; void setBarWidth(qreal width); qreal barWidth() const; @@ -68,7 +63,6 @@ public: bool insert(int index, QBarSet *set); QBarSet* barsetAt(int index); - QString categoryName(int category); qreal min(); qreal max(); qreal valueAt(int set, int category); @@ -83,12 +77,10 @@ Q_SIGNALS: void clicked(QBarSet *barset, int index); void updatedBars(); void restructuredBars(); - void categoriesUpdated(); void labelsVisibleChanged(bool visible); protected: QList m_barSets; - QStringList m_categories; qreal m_barWidth; bool m_labelsVisible; bool m_visible;