@@ -38,7 +38,6 BarChartItem::BarChartItem(QBarSeries *series, ChartPresenter *presenter) : | |||
|
38 | 38 | { |
|
39 | 39 | setFlag(ItemClipsChildrenToShape); |
|
40 | 40 | connect(series->d_func(), SIGNAL(updatedBars()), this, SLOT(handleLayoutChanged())); |
|
41 | connect(series->d_func(), SIGNAL(restructuredBars()), this, SLOT(handleModelChanged())); | |
|
42 | 41 | connect(series->d_func(), SIGNAL(labelsVisibleChanged(bool)), this, SLOT(labelsVisibleChanged(bool))); |
|
43 | 42 | setZValue(ChartPresenter::BarSeriesZValue); |
|
44 | 43 | dataChanged(); |
@@ -168,12 +167,6 void BarChartItem::setLayout(const QVector<QRectF> &layout) | |||
|
168 | 167 | } |
|
169 | 168 | //handlers |
|
170 | 169 | |
|
171 | void BarChartItem::handleModelChanged() | |
|
172 | { | |
|
173 | // dataChanged(); | |
|
174 | presenter()->resetAllElements(); | |
|
175 | } | |
|
176 | ||
|
177 | 170 | void BarChartItem::handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY) |
|
178 | 171 | { |
|
179 | 172 | m_domainMinX = minX; |
@@ -63,7 +63,6 public: | |||
|
63 | 63 | QRectF geometry() const { return m_rect;} |
|
64 | 64 | |
|
65 | 65 | public Q_SLOTS: |
|
66 | void handleModelChanged(); | |
|
67 | 66 | void handleDomainChanged(qreal minX, qreal maxX, qreal minY, qreal maxY); |
|
68 | 67 | void handleGeometryChanged(const QRectF &size); |
|
69 | 68 | void handleLayoutChanged(); |
@@ -231,23 +231,6 QBarSeriesPrivate::QBarSeriesPrivate(QBarSeries *q) : | |||
|
231 | 231 | { |
|
232 | 232 | } |
|
233 | 233 | |
|
234 | void QBarSeriesPrivate::setCategories(QStringList categories) | |
|
235 | { | |
|
236 | m_categories = categories; | |
|
237 | } | |
|
238 | ||
|
239 | void QBarSeriesPrivate::insertCategory(int index, const QString category) | |
|
240 | { | |
|
241 | m_categories.insert(index, category); | |
|
242 | emit categoriesUpdated(); | |
|
243 | } | |
|
244 | ||
|
245 | void QBarSeriesPrivate::removeCategory(int index) | |
|
246 | { | |
|
247 | m_categories.removeAt(index); | |
|
248 | emit categoriesUpdated(); | |
|
249 | } | |
|
250 | ||
|
251 | 234 | int QBarSeriesPrivate::categoryCount() const |
|
252 | 235 | { |
|
253 | 236 | if (m_categories.count() > 0) { |
@@ -490,7 +473,7 bool QBarSeriesPrivate::append(QBarSet *set) | |||
|
490 | 473 | if (m_dataset) { |
|
491 | 474 | m_dataset->updateSeries(q); // this notifies legend |
|
492 | 475 | } |
|
493 | emit restructuredBars(); // this notifies barchartitem | |
|
476 | // emit restructuredBars(); // this notifies barchartitem | |
|
494 | 477 | return true; |
|
495 | 478 | } |
|
496 | 479 | |
@@ -506,7 +489,7 bool QBarSeriesPrivate::remove(QBarSet *set) | |||
|
506 | 489 | if (m_dataset) { |
|
507 | 490 | m_dataset->updateSeries(q); // this notifies legend |
|
508 | 491 | } |
|
509 | emit restructuredBars(); // this notifies barchartitem | |
|
492 | // emit restructuredBars(); // this notifies barchartitem | |
|
510 | 493 | return true; |
|
511 | 494 | } |
|
512 | 495 | |
@@ -531,7 +514,7 bool QBarSeriesPrivate::append(QList<QBarSet* > sets) | |||
|
531 | 514 | if (m_dataset) { |
|
532 | 515 | m_dataset->updateSeries(q); // this notifies legend |
|
533 | 516 | } |
|
534 | emit restructuredBars(); // this notifies barchartitem | |
|
517 | // emit restructuredBars(); // this notifies barchartitem | |
|
535 | 518 | return true; |
|
536 | 519 | } |
|
537 | 520 | |
@@ -551,7 +534,7 bool QBarSeriesPrivate::remove(QList<QBarSet* > sets) | |||
|
551 | 534 | if (m_dataset) { |
|
552 | 535 | m_dataset->updateSeries(q); // this notifies legend |
|
553 | 536 | } |
|
554 | emit restructuredBars(); // this notifies barchartitem | |
|
537 | // emit restructuredBars(); // this notifies barchartitem | |
|
555 | 538 | } |
|
556 | 539 | return setsRemoved; |
|
557 | 540 | } |
@@ -45,9 +45,6 class QBarSeriesPrivate : public QAbstractSeriesPrivate | |||
|
45 | 45 | public: |
|
46 | 46 | QBarSeriesPrivate(QBarSeries *parent); |
|
47 | 47 | // TODO: refactor/remove private category stuff |
|
48 | void setCategories(QStringList categories); | |
|
49 | void insertCategory(int index, const QString category); | |
|
50 | void removeCategory(int index); | |
|
51 | 48 | int categoryCount() const; |
|
52 | 49 | QStringList categories() const; |
|
53 | 50 | |
@@ -79,8 +76,8 public: | |||
|
79 | 76 | Q_SIGNALS: |
|
80 | 77 | void clicked(QBarSet *barset, int index); |
|
81 | 78 | void updatedBars(); |
|
82 | void restructuredBars(); | |
|
83 | void categoriesUpdated(); | |
|
79 | // void restructuredBars(); | |
|
80 | // void categoriesUpdated(); | |
|
84 | 81 | void labelsVisibleChanged(bool visible); |
|
85 | 82 | |
|
86 | 83 | private Q_SLOTS: |
General Comments 0
You need to be logged in to leave comments.
Login now