@@ -23,9 +23,11 BarGroup::BarGroup(BarChartSeries& series, QGraphicsItem *parent) : | |||||
23 |
|
23 | |||
24 | void BarGroup::setSize(const QSize& size) |
|
24 | void BarGroup::setSize(const QSize& size) | |
25 | { |
|
25 | { | |
26 | // TODO: refactor this |
|
|||
27 | qDebug() << "BarGroup::setSize"; |
|
26 | qDebug() << "BarGroup::setSize"; | |
28 | resize(size.width(),size.height()); |
|
27 | mWidth = size.width(); | |
|
28 | mHeight = size.height(); | |||
|
29 | layoutChanged(); | |||
|
30 | mLayoutSet = true; | |||
29 | } |
|
31 | } | |
30 |
|
32 | |||
31 | void BarGroup::setPlotDomain(const PlotDomain& data) |
|
33 | void BarGroup::setPlotDomain(const PlotDomain& data) | |
@@ -34,16 +36,6 void BarGroup::setPlotDomain(const PlotDomain& data) | |||||
34 | // TODO: |
|
36 | // TODO: | |
35 | } |
|
37 | } | |
36 |
|
38 | |||
37 |
|
||||
38 | void BarGroup::resize( int w, int h ) |
|
|||
39 | { |
|
|||
40 | qDebug() << "QBarChart::resize"; |
|
|||
41 | mWidth = w; |
|
|||
42 | mHeight = h; |
|
|||
43 | layoutChanged(); |
|
|||
44 | mLayoutSet = true; |
|
|||
45 | } |
|
|||
46 |
|
||||
47 | void BarGroup::setBarWidth( int w ) |
|
39 | void BarGroup::setBarWidth( int w ) | |
48 | { |
|
40 | { | |
49 | mBarDefaultWidth = w; |
|
41 | mBarDefaultWidth = w; |
@@ -34,7 +34,6 public: | |||||
34 | virtual void setPlotDomain(const PlotDomain& data); |
|
34 | virtual void setPlotDomain(const PlotDomain& data); | |
35 |
|
35 | |||
36 | // Layout "api" |
|
36 | // Layout "api" | |
37 | void resize( int w, int h ); // Size for whole series. Single bars are drawn inside this area |
|
|||
38 | void setPos(qreal x, qreal y); |
|
37 | void setPos(qreal x, qreal y); | |
39 | void setBarWidth( int w ); // Default width for each bar |
|
38 | void setBarWidth( int w ); // Default width for each bar | |
40 |
|
39 |
General Comments 0
You need to be logged in to leave comments.
Login now