##// END OF EJS Templates
Fixed: datetimeaxis not redrawing when datetime format changed
Marek Rosa -
r2326:96f0cba4f31e
parent child
Show More
@@ -34,6 +34,7 ChartDateTimeAxisX::ChartDateTimeAxisX(QDateTimeAxis *axis, QGraphicsItem* item)
34 m_axis(axis)
34 m_axis(axis)
35 {
35 {
36 QObject::connect(m_axis,SIGNAL(tickCountChanged(int)),this, SLOT(handleTickCountChanged(int)));
36 QObject::connect(m_axis,SIGNAL(tickCountChanged(int)),this, SLOT(handleTickCountChanged(int)));
37 QObject::connect(m_axis,SIGNAL(formatChanged(QString)),this, SLOT(handleFormatChanged(QString)));
37 }
38 }
38
39
39 ChartDateTimeAxisX::~ChartDateTimeAxisX()
40 ChartDateTimeAxisX::~ChartDateTimeAxisX()
@@ -72,6 +73,12 void ChartDateTimeAxisX::handleTickCountChanged(int tick)
72 if(presenter()) presenter()->layout()->invalidate();
73 if(presenter()) presenter()->layout()->invalidate();
73 }
74 }
74
75
76 void ChartDateTimeAxisX::handleFormatChanged(const QString &format)
77 {
78 Q_UNUSED(format);
79 if(presenter()) presenter()->layout()->invalidate();
80 }
81
75 QSizeF ChartDateTimeAxisX::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
82 QSizeF ChartDateTimeAxisX::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
76 {
83 {
77 Q_UNUSED(constraint)
84 Q_UNUSED(constraint)
@@ -50,6 +50,7 protected:
50 void updateGeometry();
50 void updateGeometry();
51 private Q_SLOTS:
51 private Q_SLOTS:
52 void handleTickCountChanged(int tick);
52 void handleTickCountChanged(int tick);
53 void handleFormatChanged(const QString &format);
53
54
54 private:
55 private:
55 QDateTimeAxis *m_axis;
56 QDateTimeAxis *m_axis;
@@ -34,6 +34,7 ChartDateTimeAxisY::ChartDateTimeAxisY(QDateTimeAxis *axis, QGraphicsItem* item)
34 m_axis(axis)
34 m_axis(axis)
35 {
35 {
36 QObject::connect(m_axis,SIGNAL(tickCountChanged(int)),this, SLOT(handleTickCountChanged(int)));
36 QObject::connect(m_axis,SIGNAL(tickCountChanged(int)),this, SLOT(handleTickCountChanged(int)));
37 QObject::connect(m_axis,SIGNAL(formatChanged(QString)),this, SLOT(handleFormatChanged(QString)));
37 }
38 }
38
39
39 ChartDateTimeAxisY::~ChartDateTimeAxisY()
40 ChartDateTimeAxisY::~ChartDateTimeAxisY()
@@ -73,6 +74,12 void ChartDateTimeAxisY::handleTickCountChanged(int tick)
73 if(presenter()) presenter()->layout()->invalidate();
74 if(presenter()) presenter()->layout()->invalidate();
74 }
75 }
75
76
77 void ChartDateTimeAxisY::handleFormatChanged(const QString &format)
78 {
79 Q_UNUSED(format);
80 if(presenter()) presenter()->layout()->invalidate();
81 }
82
76 QSizeF ChartDateTimeAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
83 QSizeF ChartDateTimeAxisY::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
77 {
84 {
78 Q_UNUSED(constraint)
85 Q_UNUSED(constraint)
@@ -50,6 +50,8 protected:
50 void updateGeometry();
50 void updateGeometry();
51 private Q_SLOTS:
51 private Q_SLOTS:
52 void handleTickCountChanged(int tick);
52 void handleTickCountChanged(int tick);
53 void handleFormatChanged(const QString &format);
54
53 private:
55 private:
54 QDateTimeAxis *m_axis;
56 QDateTimeAxis *m_axis;
55 };
57 };
General Comments 0
You need to be logged in to leave comments. Login now