diff --git a/src/axis/chartaxis.cpp b/src/axis/chartaxis.cpp index 061b2fb..e3d2705 100644 --- a/src/axis/chartaxis.cpp +++ b/src/axis/chartaxis.cpp @@ -268,7 +268,7 @@ void ChartAxis::handleAxisUpdated() } else { - if (m_chartAxis->isAxisVisible()) { + if (m_chartAxis->isArrowVisible()) { setAxisOpacity(100); } else { diff --git a/src/axis/qabstractaxis.cpp b/src/axis/qabstractaxis.cpp index be6371e..f990378 100644 --- a/src/axis/qabstractaxis.cpp +++ b/src/axis/qabstractaxis.cpp @@ -172,47 +172,56 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! - \fn void QAbstractAxis::visibleChanged(bool) + \fn void QAbstractAxis::visibleChanged(bool visible) Visiblity of the axis has changed to \a visible. */ - /*! - \fn void QAbstractAxis::labelsVisibleChanged(bool) - Visiblity of the labels of the axis has changed to \a visible. + \qmlsignal AbstractAxis::onVisibleChanged(bool visible) + Visiblity of the axis has changed to \a visible. */ /*! - \fn void QAbstractAxis::gridVisibleChanged(bool) - Visiblity of the grid lines of the axis has changed to \a visible. + \fn void QAbstractAxis::arrowVisibleChanged(bool visible) + Visiblity of the axis arrow has changed to \a visible. */ - -/* - \fn void QAbstractAxis::minChanged(qreal min) - Axis emits signal when \a min of axis has changed. +/*! + \qmlsignal AbstractAxis::onArrowVisibleChanged(bool visible) + Visiblity of the axis arrow has changed to \a visible. */ -/* - \fn void QAbstractAxis::maxChanged(qreal max) - Axis emits signal when \a max of axis has changed. +/*! + \fn void QAbstractAxis::labelsVisibleChanged(bool visible) + Visiblity of the labels of the axis has changed to \a visible. */ - -/* - \fn void QAbstractAxis::rangeChanged(qreal min, qreal max) - Axis emits signal when \a min or \a max of axis has changed. +/*! + \qmlsignal AbstractAxis::onLabelsVisibleChanged(bool visible) + Visiblity of the labels of the axis has changed to \a visible. */ -/* - \fn QChartAxisCategories* QAbstractAxis::categories() - Returns pointer to the list of categories which correspond to the values on the axis. +/*! + \fn void QAbstractAxis::gridVisibleChanged(bool visible) + Visiblity of the grid lines of the axis has changed to \a visible. +*/ +/*! + \qmlsignal AbstractAxis::onGridVisibleChanged(bool visible) + Visiblity of the grid lines of the axis has changed to \a visible. */ /*! - \fn void QAbstractAxis::colorChanged(QColor) + \fn void QAbstractAxis::colorChanged(QColor color) + Emitted if the \a color of the axis is changed. +*/ +/*! + \qmlsignal AbstractAxis::onColorChanged(QColor color) Emitted if the \a color of the axis is changed. */ /*! - \fn void QAbstractAxis::labelsColorChanged(QColor) + \fn void QAbstractAxis::labelsColorChanged(QColor color) + Emitted if the \a color of the axis labels is changed. +*/ +/*! + \qmlsignal AbstractAxis::onLabelsColorChanged(QColor color) Emitted if the \a color of the axis labels is changed. */ @@ -220,9 +229,17 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \fn void QAbstractAxis::shadesVisibleChanged(bool) Emitted if the visibility of the axis shades is changed to \a visible. */ +/*! + \qmlsignal AbstractAxis::onShadesVisibleChanged(bool visible) + Emitted if the visibility of the axis shades is changed to \a visible. +*/ /*! - \fn void QAbstractAxis::shadesColorChanged(QColor) + \fn void QAbstractAxis::shadesColorChanged(QColor color) + Emitted if the \a color of the axis shades is changed. +*/ +/*! + \qmlsignal AbstractAxis::onShadesColorChanged(QColor color) Emitted if the \a color of the axis shades is changed. */ @@ -230,6 +247,10 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \fn void QAbstractAxis::shadesBorderColorChanged(QColor) Emitted if the border \a color of the axis shades is changed. */ +/*! + \qmlsignal AbstractAxis::onBorderColorChanged(QColor color) + Emitted if the border \a color of the axis shades is changed. +*/ /*! Constructs new axis object which is a child of \a parent. Ownership is taken by @@ -287,18 +308,18 @@ QColor QAbstractAxis::axisPenColor() const /*! Sets if axis and ticks are \a visible. */ -void QAbstractAxis::setAxisVisible(bool visible) +void QAbstractAxis::setArrowVisible(bool visible) { - if (d_ptr->m_axisVisible != visible) { - d_ptr->m_axisVisible = visible; + if (d_ptr->m_arrowVisible != visible) { + d_ptr->m_arrowVisible = visible; emit d_ptr->updated(); - emit visibleChanged(visible); + emit arrowVisibleChanged(visible); } } -bool QAbstractAxis::isAxisVisible() const +bool QAbstractAxis::isArrowVisible() const { - return d_ptr->m_axisVisible; + return d_ptr->m_arrowVisible; } void QAbstractAxis::setGridLineVisible(bool visible) @@ -580,7 +601,7 @@ void QAbstractAxis::setRange(const QVariant &min, const QVariant &max) QAbstractAxisPrivate::QAbstractAxisPrivate(QAbstractAxis* q): q_ptr(q), m_visible(false), - m_axisVisible(true), + m_arrowVisible(true), m_gridLineVisible(true), m_labelsVisible(true), m_labelsAngle(0), diff --git a/src/axis/qabstractaxis.h b/src/axis/qabstractaxis.h index 62fcd6d..b8febf6 100644 --- a/src/axis/qabstractaxis.h +++ b/src/axis/qabstractaxis.h @@ -34,7 +34,7 @@ class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject { Q_OBJECT Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) - Q_PROPERTY(bool axisVisible READ isAxisVisible WRITE setAxisVisible NOTIFY visibleChanged) + Q_PROPERTY(bool arrowVisible READ isArrowVisible WRITE setArrowVisible NOTIFY arrowVisibleChanged) Q_PROPERTY(QColor color READ axisPenColor WRITE setAxisPenColor NOTIFY colorChanged) Q_PROPERTY(bool labelsVisible READ labelsVisible WRITE setLabelsVisible NOTIFY labelsVisibleChanged) Q_PROPERTY(int labelsAngle READ labelsAngle WRITE setLabelsAngle) @@ -69,8 +69,8 @@ public: //axis handling - bool isAxisVisible() const; - void setAxisVisible(bool visible = true); + bool isArrowVisible() const; + void setArrowVisible(bool visible = true); void setAxisPen(const QPen &pen); QPen axisPen() const; void setAxisPenColor(QColor color); @@ -118,7 +118,7 @@ public: Q_SIGNALS: void visibleChanged(bool visible); - void axisVisibleChanged(bool visible); + void arrowVisibleChanged(bool visible); void labelsVisibleChanged(bool visible); void gridVisibleChanged(bool visible); void colorChanged(QColor color); diff --git a/src/axis/qabstractaxis_p.h b/src/axis/qabstractaxis_p.h index f79f41f..55bb892 100644 --- a/src/axis/qabstractaxis_p.h +++ b/src/axis/qabstractaxis_p.h @@ -61,7 +61,7 @@ public: QAbstractAxis *q_ptr; bool m_visible; - bool m_axisVisible; + bool m_arrowVisible; QPen m_axisPen; QBrush m_axisBrush; diff --git a/src/axis/qbarcategoriesaxis.cpp b/src/axis/qbarcategoriesaxis.cpp index e3d6119..c93311a 100644 --- a/src/axis/qbarcategoriesaxis.cpp +++ b/src/axis/qbarcategoriesaxis.cpp @@ -69,7 +69,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE Defines the minimum value on the axis. */ /*! - \qmlproperty real BarCategoriesAxis::min + \qmlproperty QString BarCategoriesAxis::min Defines the minimum value on the axis. */ @@ -78,7 +78,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE Defines the maximum value on the axis. */ /*! - \qmlproperty real BarCategoriesAxis::max + \qmlproperty QString BarCategoriesAxis::max Defines the maximum value on the axis. */ @@ -86,11 +86,19 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \fn void QBarCategoriesAxis::minChanged(const QString &min) Axis emits signal when \a min of axis has changed. */ +/*! + \qmlsignal BarCategoriesAxis::onMinChanged(const QString &min) + Axis emits signal when \a min of axis has changed. +*/ /*! \fn void QBarCategoriesAxis::maxChanged(const QString &max) Axis emits signal when \a max of axis has changed. */ +/*! + \qmlsignal BarCategoriesAxis::onMaxChanged(const QString &max) + Axis emits signal when \a max of axis has changed. +*/ /*! \fn void QBarCategoriesAxis::rangeChanged(const QString &min, const QString &max) diff --git a/src/axis/qintervalaxis.cpp b/src/axis/qintervalaxis.cpp index fc9bdfe..05ad6e4 100644 --- a/src/axis/qintervalaxis.cpp +++ b/src/axis/qintervalaxis.cpp @@ -71,7 +71,7 @@ QIntervalAxis::QIntervalAxis(QIntervalAxisPrivate &d,QObject *parent):QValuesAxi } /*! - Appends \a categories to axis + Appends \a category to axis */ void QIntervalAxis::append(const QString& category, qreal x) { diff --git a/src/axis/qvaluesaxis.cpp b/src/axis/qvaluesaxis.cpp index 252c441..cb4d9d0 100644 --- a/src/axis/qvaluesaxis.cpp +++ b/src/axis/qvaluesaxis.cpp @@ -76,11 +76,19 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \fn void QValuesAxis::minChanged(qreal min) Axis emits signal when \a min of axis has changed. */ +/*! + \qmlsignal ValuesAxis::onMinChanged(real min) + Axis emits signal when \a min of axis has changed. +*/ /*! \fn void QValuesAxis::maxChanged(qreal max) Axis emits signal when \a max of axis has changed. */ +/*! + \qmlsignal ValuesAxis::onMaxChanged(real max) + Axis emits signal when \a max of axis has changed. +*/ /*! \fn void QValuesAxis::rangeChanged(qreal min, qreal max) diff --git a/src/charttheme.cpp b/src/charttheme.cpp index 1d9b1ae..8cf74bf 100644 --- a/src/charttheme.cpp +++ b/src/charttheme.cpp @@ -262,7 +262,7 @@ void ChartTheme::decorate(QAbstractAxis *axis,bool axisX) QBrush brush; QFont font; - if (axis->isAxisVisible()) { + if (axis->isArrowVisible()) { if(brush == axis->labelsBrush() || m_force){ axis->setLabelsBrush(m_labelBrush);