@@ -71,12 +71,12 void ChartAxis::setLayout(QVector<qreal> &layout) | |||||
71 | void ChartAxis::createItems(int count) |
|
71 | void ChartAxis::createItems(int count) | |
72 | { |
|
72 | { | |
73 | if (m_arrow->children().size() == 0) |
|
73 | if (m_arrow->children().size() == 0) | |
74 | m_arrow->addToGroup(new AxisItem(this)); |
|
74 | m_arrow->addToGroup(new AxisItem(this,presenter()->rootItem())); | |
75 | for (int i = 0; i < count; ++i) { |
|
75 | for (int i = 0; i < count; ++i) { | |
76 | m_grid->addToGroup(new QGraphicsLineItem()); |
|
76 | m_grid->addToGroup(new QGraphicsLineItem(presenter()->rootItem())); | |
77 | m_labels->addToGroup(new QGraphicsSimpleTextItem()); |
|
77 | m_labels->addToGroup(new QGraphicsSimpleTextItem(presenter()->rootItem())); | |
78 | m_arrow->addToGroup(new QGraphicsLineItem()); |
|
78 | m_arrow->addToGroup(new QGraphicsLineItem(presenter()->rootItem())); | |
79 | if ((m_grid->childItems().size())%2 && m_grid->childItems().size()>2) m_shades->addToGroup(new QGraphicsRectItem()); |
|
79 | if ((m_grid->childItems().size())%2 && m_grid->childItems().size()>2) m_shades->addToGroup(new QGraphicsRectItem(presenter()->rootItem())); | |
80 | } |
|
80 | } | |
81 | } |
|
81 | } | |
82 |
|
82 |
General Comments 0
You need to be logged in to leave comments.
Login now