@@ -32,7 +32,8 void BarGroup::setPlotDomain(const PlotDomain& data) | |||
|
32 | 32 | |
|
33 | 33 | void BarGroup::setTheme(ChartTheme *theme) |
|
34 | 34 | { |
|
35 | // TODO | |
|
35 | qDebug() << "BarGroup::setTheme"; | |
|
36 | // TODO: | |
|
36 | 37 | } |
|
37 | 38 | |
|
38 | 39 | void BarGroup::setBarWidth( int w ) |
@@ -30,6 +30,12 void PercentBarGroup::setPlotDomain(const PlotDomain& data) | |||
|
30 | 30 | // TODO: |
|
31 | 31 | } |
|
32 | 32 | |
|
33 | void PercentBarGroup::setTheme(ChartTheme *theme) | |
|
34 | { | |
|
35 | qDebug() << "PercentBarGroup::setTheme"; | |
|
36 | // TODO: | |
|
37 | } | |
|
38 | ||
|
33 | 39 | void PercentBarGroup::setBarWidth( int w ) |
|
34 | 40 | { |
|
35 | 41 | mBarDefaultWidth = w; |
@@ -30,6 +30,12 void StackedBarGroup::setPlotDomain(const PlotDomain& data) | |||
|
30 | 30 | // TODO: |
|
31 | 31 | } |
|
32 | 32 | |
|
33 | void StackedBarGroup::setTheme(ChartTheme *theme) | |
|
34 | { | |
|
35 | qDebug() << "StackedBarGroup::setTheme"; | |
|
36 | // TODO: | |
|
37 | } | |
|
38 | ||
|
33 | 39 | void StackedBarGroup::setBarWidth( int w ) |
|
34 | 40 | { |
|
35 | 41 | mBarDefaultWidth = w; |
@@ -8,6 +8,7 | |||
|
8 | 8 | |
|
9 | 9 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
10 | 10 | |
|
11 | // TODO: derive this from ChartObjectInterface, when setSize is back in ChartItem | |
|
11 | 12 | class StackedBarGroup : public ChartItem |
|
12 | 13 | { |
|
13 | 14 | public: |
@@ -6,7 +6,8 | |||
|
6 | 6 | #include <QGraphicsItem> |
|
7 | 7 | |
|
8 | 8 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
9 | ||
|
9 | // TODO: setSize and set plotDomain back here. Derive this only from QGraphicsItem | |
|
10 | // class ChartItem : public QGraphicsItem | |
|
10 | 11 | class ChartItem : public QGraphicsItem, public ChartObjectInterface |
|
11 | 12 | { |
|
12 | 13 | enum ChartItemTypes{ AXIS_ITEM = UserType+1, XYLINE_ITEM}; |
@@ -18,6 +18,7 class PlotDomain; | |||
|
18 | 18 | class ChartObjectInterface |
|
19 | 19 | { |
|
20 | 20 | public: |
|
21 | // TODO: move setSize and setPlotDomain back to ChartItem. This interface should be only about handling themes. | |
|
21 | 22 | virtual void setSize(const QSize &size) = 0; |
|
22 | 23 | virtual void setTheme(ChartTheme *theme) = 0; |
|
23 | 24 | virtual void setPlotDomain(const PlotDomain& data) = 0; |
@@ -100,14 +100,14 void QChart::addSeries(QChartSeries* series) | |||
|
100 | 100 | |
|
101 | 101 | m_chartObjectInterfaces << barGroup; |
|
102 | 102 | childItems().append(barGroup); |
|
103 | ||
|
103 | /* | |
|
104 | 104 | m_plotDataIndex = 0 ; |
|
105 | 105 | m_plotDomainList.resize(1); |
|
106 | 106 |
|
|
107 | 107 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; |
|
108 | 108 | foreach(ChartItem* i ,m_chartItems) |
|
109 | 109 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); |
|
110 | ||
|
110 | */ | |
|
111 | 111 | break; |
|
112 | 112 | } |
|
113 | 113 | case QChartSeries::SeriesTypeStackedBar: { |
@@ -125,13 +125,14 void QChart::addSeries(QChartSeries* series) | |||
|
125 | 125 | |
|
126 | 126 | m_chartObjectInterfaces << stackedBarGroup; |
|
127 | 127 | childItems().append(stackedBarGroup); |
|
128 | /* | |
|
128 | 129 | m_plotDataIndex = 0 ; |
|
129 | 130 | m_plotDomainList.resize(1); |
|
130 | 131 |
|
|
131 | 132 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; |
|
132 | 133 | foreach(ChartItem* i ,m_chartItems) |
|
133 | 134 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); |
|
134 | ||
|
135 | */ | |
|
135 | 136 | break; |
|
136 | 137 | } |
|
137 | 138 | case QChartSeries::SeriesTypePercentBar: { |
@@ -149,13 +150,14 void QChart::addSeries(QChartSeries* series) | |||
|
149 | 150 | |
|
150 | 151 | m_chartObjectInterfaces << percentBarGroup; |
|
151 | 152 | childItems().append(percentBarGroup); |
|
153 | /* | |
|
152 | 154 | m_plotDataIndex = 0 ; |
|
153 | 155 | m_plotDomainList.resize(1); |
|
154 | 156 |
|
|
155 | 157 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; |
|
156 | 158 | foreach(ChartItem* i ,m_chartItems) |
|
157 | 159 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); |
|
158 | ||
|
160 | */ | |
|
159 | 161 | break; |
|
160 | 162 | } |
|
161 | 163 | case QChartSeries::SeriesTypeScatter: { |
General Comments 0
You need to be logged in to leave comments.
Login now