From 0473979ecc5041d7713aaefe945697c08cad3a5b 2012-11-29 12:00:04 From: Marek Rosa Date: 2012-11-29 12:00:04 Subject: [PATCH] Added missing properties and NOTIFY's to logvalue and value axes --- diff --git a/src/axis/logvalueaxis/qlogvalueaxis.cpp b/src/axis/logvalueaxis/qlogvalueaxis.cpp index d2cb924..e6bc569 100644 --- a/src/axis/logvalueaxis/qlogvalueaxis.cpp +++ b/src/axis/logvalueaxis/qlogvalueaxis.cpp @@ -171,6 +171,7 @@ void QLogValueAxis::setLabelFormat(const QString &format) { Q_D(QLogValueAxis); d->m_format = format; + emit labelFormatChanged(format); } QString QLogValueAxis::labelFormat() const diff --git a/src/axis/logvalueaxis/qlogvalueaxis.h b/src/axis/logvalueaxis/qlogvalueaxis.h index 87bf59d..d41a262 100644 --- a/src/axis/logvalueaxis/qlogvalueaxis.h +++ b/src/axis/logvalueaxis/qlogvalueaxis.h @@ -34,7 +34,8 @@ class QTCOMMERCIALCHART_EXPORT QLogValueAxis : public QAbstractAxis Q_OBJECT Q_PROPERTY(qreal min READ min WRITE setMin NOTIFY minChanged) Q_PROPERTY(qreal max READ max WRITE setMax NOTIFY maxChanged) - Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat) + Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged) + Q_PROPERTY(qreal base READ base WRITE setBase NOTIFY baseChanged) public: explicit QLogValueAxis(QObject *parent = 0); @@ -63,6 +64,7 @@ Q_SIGNALS: void minChanged(qreal min); void maxChanged(qreal max); void rangeChanged(qreal min, qreal max); + void labelFormatChanged(const QString &format); void baseChanged(qreal base); private: diff --git a/src/axis/valueaxis/qvalueaxis.cpp b/src/axis/valueaxis/qvalueaxis.cpp index 7b1fe20..17bca86 100644 --- a/src/axis/valueaxis/qvalueaxis.cpp +++ b/src/axis/valueaxis/qvalueaxis.cpp @@ -265,6 +265,7 @@ void QValueAxis::setLabelFormat(const QString &format) { Q_D(QValueAxis); d->m_format = format; + emit labelFormatChanged(format); } QString QValueAxis::labelFormat() const diff --git a/src/axis/valueaxis/qvalueaxis.h b/src/axis/valueaxis/qvalueaxis.h index 0fb6d03..142d21e 100644 --- a/src/axis/valueaxis/qvalueaxis.h +++ b/src/axis/valueaxis/qvalueaxis.h @@ -34,7 +34,7 @@ class QTCOMMERCIALCHART_EXPORT QValueAxis : public QAbstractAxis Q_PROPERTY(bool niceNumbersEnabled READ niceNumbersEnabled WRITE setNiceNumbersEnabled) Q_PROPERTY(qreal min READ min WRITE setMin NOTIFY minChanged) Q_PROPERTY(qreal max READ max WRITE setMax NOTIFY maxChanged) - Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat) + Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged) public: explicit QValueAxis(QObject *parent = 0); @@ -72,6 +72,7 @@ Q_SIGNALS: void maxChanged(qreal max); void rangeChanged(qreal min, qreal max); void tickCountChanged(int tickCount); + void labelFormatChanged(const QString &format); private: Q_DECLARE_PRIVATE(QValueAxis)