diff options
author | Tero Ahola <tero.ahola@digia.com> | 2012-12-10 12:26:01 +0200 |
---|---|---|
committer | Tero Ahola <tero.ahola@digia.com> | 2012-12-10 12:35:46 +0200 |
commit | 4a04f1df73b4b3636b22c59ef2ad996fef0c1344 (patch) | |
tree | d6ec922425023045548099f8464634adf3b249e2 | |
parent | 98a5c5ffbaab2879b9b3443561cf13af24097f13 (diff) |
Documented QAbstractSeries axis handling
-rw-r--r-- | src/axis/qabstractaxis.h | 1 | ||||
-rw-r--r-- | src/qabstractseries.cpp | 19 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/axis/qabstractaxis.h b/src/axis/qabstractaxis.h index 845b30cd..161bebe1 100644 --- a/src/axis/qabstractaxis.h +++ b/src/axis/qabstractaxis.h @@ -53,7 +53,6 @@ class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject //shades Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged) Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged) - //TODO: make wrapping of border for qml Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged) Q_PROPERTY(QPen shadesPen READ shadesPen WRITE setShadesPen NOTIFY shadesPenChanged) Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged) diff --git a/src/qabstractseries.cpp b/src/qabstractseries.cpp index bd0578de..809fa3da 100644 --- a/src/qabstractseries.cpp +++ b/src/qabstractseries.cpp @@ -229,20 +229,30 @@ void QAbstractSeries::hide() setVisible(false); } +/*! + Attach \a axis to the series. + \return true if the axis was attached successfully, false otherwise. + \sa QChart::addAxis(), QChart::createDefaultAxes() + */ bool QAbstractSeries::attachAxis(QAbstractAxis* axis) { if(d_ptr->m_chart) { - return d_ptr->m_chart->d_ptr->m_dataset->attachAxis(this,axis); + return d_ptr->m_chart->d_ptr->m_dataset->attachAxis(this, axis); } else { qWarning()<<"Series not in the chart. Please addSeries to chart first."; return false; } } +/*! + Detach \a axis from the series. + \return true if the axis was detached successfully, false otherwise. + \sa QChart::removeAxis() + */ bool QAbstractSeries::detachAxis(QAbstractAxis* axis) { if(d_ptr->m_chart) { - return d_ptr->m_chart->d_ptr->m_dataset->detachAxis(this,axis); + return d_ptr->m_chart->d_ptr->m_dataset->detachAxis(this, axis); } else { qWarning()<<"Series not in the chart. Please addSeries to chart first."; @@ -250,6 +260,11 @@ bool QAbstractSeries::detachAxis(QAbstractAxis* axis) } } +/*! + Returns the list of axes attached to the series. Usually there is an x-axis and a y-axis attached to a series, except + in case of a QPieSeries, which does not have any axes attached. + \sa attachAxis(), detachAxis() + */ QList<QAbstractAxis*> QAbstractSeries::attachedAxes() { return d_ptr->m_axes; |