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 /src/qabstractseries.cpp | |
parent | 98a5c5ffbaab2879b9b3443561cf13af24097f13 (diff) |
Documented QAbstractSeries axis handling
Diffstat (limited to 'src/qabstractseries.cpp')
-rw-r--r-- | src/qabstractseries.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
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; |