@@ -15,6 +15,7 class Separator; | |||
|
15 | 15 | class BarValue; |
|
16 | 16 | |
|
17 | 17 | // Common implemantation of different presenters. Not to be instantiated. |
|
18 | // TODO: combine this with BarPresenter and derive others from it? | |
|
18 | 19 | class BarPresenterBase : public QObject, public ChartItem |
|
19 | 20 | { |
|
20 | 21 | Q_OBJECT |
@@ -12,7 +12,6 class QBarSet; | |||
|
12 | 12 | class BarChartModel; |
|
13 | 13 | |
|
14 | 14 | // Container for series |
|
15 | // TODO: derive Stacked and percent bar charts from this? | |
|
16 | 15 | class QTCOMMERCIALCHART_EXPORT QBarChartSeries : public QChartSeries |
|
17 | 16 | { |
|
18 | 17 | Q_OBJECT |
@@ -52,7 +51,7 signals: | |||
|
52 | 51 | |
|
53 | 52 | //public Q_SLOTS: |
|
54 | 53 | |
|
55 | private: | |
|
54 | protected: | |
|
56 | 55 | BarChartModel* mModel; |
|
57 | 56 | |
|
58 | 57 | }; |
@@ -8,11 +8,11 | |||
|
8 | 8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
9 | 9 | |
|
10 | 10 | QPercentBarChartSeries::QPercentBarChartSeries(QBarCategory *category, QObject *parent) |
|
11 | : QChartSeries(parent) | |
|
12 | ,mModel(new BarChartModel(category, this)) | |
|
11 | : QBarChartSeries(category, parent) | |
|
12 | // ,mModel(new BarChartModel(category, this)) | |
|
13 | 13 | { |
|
14 | 14 | } |
|
15 | ||
|
15 | /* | |
|
16 | 16 | void QPercentBarChartSeries::addBarSet(QBarSet *set) |
|
17 | 17 |
|
|
18 | 18 | connect(this,SIGNAL(floatingValuesEnabled(bool)),set,SLOT(enableFloatingValues(bool))); |
@@ -71,7 +71,7 BarChartModel& QPercentBarChartSeries::model() | |||
|
71 | 71 |
|
|
72 | 72 | return *mModel; |
|
73 | 73 |
|
|
74 | ||
|
74 | */ | |
|
75 | 75 | |
|
76 | 76 | #include "moc_qpercentbarchartseries.cpp" |
|
77 | 77 |
@@ -3,7 +3,7 | |||
|
3 | 3 | |
|
4 | 4 | #include <QList> |
|
5 | 5 | #include <QAbstractItemModel> |
|
6 | #include "qchartseries.h" | |
|
6 | #include "qbarchartseries.h" | |
|
7 | 7 | |
|
8 | 8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
9 | 9 | |
@@ -11,7 +11,8 class QBarCategory; | |||
|
11 | 11 | class QBarSet; |
|
12 | 12 | class BarChartModel; |
|
13 | 13 | |
|
14 | class QTCOMMERCIALCHART_EXPORT QPercentBarChartSeries : public QChartSeries | |
|
14 | //class QTCOMMERCIALCHART_EXPORT QPercentBarChartSeries : public QChartSeries | |
|
15 | class QTCOMMERCIALCHART_EXPORT QPercentBarChartSeries : public QBarChartSeries | |
|
15 | 16 | { |
|
16 | 17 | Q_OBJECT |
|
17 | 18 | public: |
@@ -19,7 +20,7 public: | |||
|
19 | 20 | |
|
20 | 21 | // from BarChartSeriesBase |
|
21 | 22 | virtual QChartSeriesType type() const { return QChartSeries::SeriesTypePercentBar; } |
|
22 | ||
|
23 | /* | |
|
23 | 24 | void addBarSet(QBarSet *set); // Takes ownership |
|
24 | 25 | void removeBarSet(QBarSet *set); // Releases ownership, doesn't delete set |
|
25 | 26 | int countSets(); |
@@ -49,7 +50,7 public Q_SLOTS: | |||
|
49 | 50 |
|
|
50 | 51 | private: |
|
51 | 52 | BarChartModel* mModel; |
|
52 | ||
|
53 | */ | |
|
53 | 54 | }; |
|
54 | 55 | |
|
55 | 56 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -8,11 +8,11 | |||
|
8 | 8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
9 | 9 | |
|
10 | 10 | QStackedBarChartSeries::QStackedBarChartSeries(QBarCategory *category, QObject *parent) |
|
11 | : QChartSeries(parent) | |
|
12 | ,mModel(new BarChartModel(category, this)) | |
|
11 | : QBarChartSeries(category, parent) | |
|
12 | // ,mModel(new BarChartModel(category, this)) | |
|
13 | 13 | { |
|
14 | 14 | } |
|
15 | ||
|
15 | /* | |
|
16 | 16 | void QStackedBarChartSeries::addBarSet(QBarSet *set) |
|
17 | 17 |
|
|
18 | 18 | connect(this,SIGNAL(floatingValuesEnabled(bool)),set,SLOT(enableFloatingValues(bool))); |
@@ -71,7 +71,7 BarChartModel& QStackedBarChartSeries::model() | |||
|
71 | 71 |
|
|
72 | 72 | return *mModel; |
|
73 | 73 |
|
|
74 | ||
|
74 | */ | |
|
75 | 75 | |
|
76 | 76 | #include "moc_qstackedbarchartseries.cpp" |
|
77 | 77 |
@@ -3,7 +3,7 | |||
|
3 | 3 | |
|
4 | 4 | #include <QList> |
|
5 | 5 | #include <QAbstractItemModel> |
|
6 | #include "qchartseries.h" | |
|
6 | #include "qbarchartseries.h" | |
|
7 | 7 | |
|
8 | 8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
9 | 9 | |
@@ -11,7 +11,8 class QBarCategory; | |||
|
11 | 11 | class QBarSet; |
|
12 | 12 | class BarChartModel; |
|
13 | 13 | |
|
14 | class QTCOMMERCIALCHART_EXPORT QStackedBarChartSeries : public QChartSeries | |
|
14 | //class QTCOMMERCIALCHART_EXPORT QStackedBarChartSeries : public QChartSeries | |
|
15 | class QTCOMMERCIALCHART_EXPORT QStackedBarChartSeries : public QBarChartSeries | |
|
15 | 16 | { |
|
16 | 17 | Q_OBJECT |
|
17 | 18 | public: |
@@ -19,7 +20,7 public: | |||
|
19 | 20 | |
|
20 | 21 | // from QChartSeries |
|
21 | 22 | virtual QChartSeriesType type() const { return QChartSeries::SeriesTypeStackedBar; } |
|
22 | ||
|
23 | /* | |
|
23 | 24 | // Set handling |
|
24 | 25 | void addBarSet(QBarSet *set); // Takes ownership |
|
25 | 26 | void removeBarSet(QBarSet *set); // Releases ownership, doesn't delete set |
@@ -49,6 +50,7 public Q_SLOTS: | |||
|
49 | 50 |
|
|
50 | 51 | private: |
|
51 | 52 | BarChartModel* mModel; |
|
53 | */ | |
|
52 | 54 | }; |
|
53 | 55 | |
|
54 | 56 | QTCOMMERCIALCHART_END_NAMESPACE |
General Comments 0
You need to be logged in to leave comments.
Login now