##// END OF EJS Templates
Resubmit commit 394f63738c11558ae410383fbf2403f57fca4bf8 due to too many merge confilcts
Michal Klocek -
r2106:a37e2403280a
parent child
Show More
@@ -22,10 +22,12
22 #include "qabstractaxis.h"
22 #include "qabstractaxis.h"
23 #include "chartpresenter_p.h"
23 #include "chartpresenter_p.h"
24 #include "qvalueaxis.h"
24 #include "qvalueaxis.h"
25 #include "chartlayout_p.h"
25 #include <QGraphicsLayout>
26 #include <QGraphicsLayout>
26 #include <QFontMetrics>
27 #include <QFontMetrics>
27 #include <qmath.h>
28 #include <qmath.h>
28
29
30
29 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30
32
31 ChartValueAxisX::ChartValueAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter),
33 ChartValueAxisX::ChartValueAxisX(QAbstractAxis *axis,ChartPresenter *presenter) : ChartAxis(axis,presenter),
@@ -120,9 +122,12 void ChartValueAxisX::updateGeometry()
120
122
121 void ChartValueAxisX::handleAxisUpdated()
123 void ChartValueAxisX::handleAxisUpdated()
122 {
124 {
123 //TODO:: fix this
124 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
125 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
125 m_tickCount = axis->tickCount();
126 if (m_tickCount != axis->tickCount()) {
127 m_tickCount = axis->tickCount();
128 presenter()->layout()->invalidate();
129 }
130
126 ChartAxis::handleAxisUpdated();
131 ChartAxis::handleAxisUpdated();
127 }
132 }
128
133
@@ -22,10 +22,10
22 #include "qabstractaxis.h"
22 #include "qabstractaxis.h"
23 #include "chartpresenter_p.h"
23 #include "chartpresenter_p.h"
24 #include "qvalueaxis.h"
24 #include "qvalueaxis.h"
25 #include "chartlayout_p.h"
25 #include <QGraphicsLayout>
26 #include <QGraphicsLayout>
26 #include <QFontMetrics>
27 #include <QFontMetrics>
27 #include <qmath.h>
28 #include <qmath.h>
28 #include <QDebug>
29
29
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31
31
@@ -137,9 +137,12 void ChartValueAxisY::updateGeometry()
137
137
138 void ChartValueAxisY::handleAxisUpdated()
138 void ChartValueAxisY::handleAxisUpdated()
139 {
139 {
140 //TODO:: fix this
141 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
140 QValueAxis* axis = qobject_cast<QValueAxis*>(m_chartAxis);
142 m_tickCount = axis->tickCount();
141 if (m_tickCount != axis->tickCount()) {
142 m_tickCount = axis->tickCount();
143 presenter()->layout()->invalidate();
144 }
145
143 ChartAxis::handleAxisUpdated();
146 ChartAxis::handleAxisUpdated();
144 }
147 }
145
148
General Comments 0
You need to be logged in to leave comments. Login now