##// END OF EJS Templates
Documented QAbstractSeries axis handling
Tero Ahola -
r2363:4a04f1df73b4
parent child
Show More
@@ -53,7 +53,6 class QTCOMMERCIALCHART_EXPORT QAbstractAxis : public QObject
53 53 //shades
54 54 Q_PROPERTY(bool shadesVisible READ shadesVisible WRITE setShadesVisible NOTIFY shadesVisibleChanged)
55 55 Q_PROPERTY(QColor shadesColor READ shadesColor WRITE setShadesColor NOTIFY shadesColorChanged)
56 //TODO: make wrapping of border for qml
57 56 Q_PROPERTY(QColor shadesBorderColor READ shadesBorderColor WRITE setShadesBorderColor NOTIFY shadesBorderColorChanged)
58 57 Q_PROPERTY(QPen shadesPen READ shadesPen WRITE setShadesPen NOTIFY shadesPenChanged)
59 58 Q_PROPERTY(QBrush shadesBrush READ shadesBrush WRITE setShadesBrush NOTIFY shadesBrushChanged)
@@ -229,20 +229,30 void QAbstractSeries::hide()
229 229 setVisible(false);
230 230 }
231 231
232 /*!
233 Attach \a axis to the series.
234 \return true if the axis was attached successfully, false otherwise.
235 \sa QChart::addAxis(), QChart::createDefaultAxes()
236 */
232 237 bool QAbstractSeries::attachAxis(QAbstractAxis* axis)
233 238 {
234 239 if(d_ptr->m_chart) {
235 return d_ptr->m_chart->d_ptr->m_dataset->attachAxis(this,axis);
240 return d_ptr->m_chart->d_ptr->m_dataset->attachAxis(this, axis);
236 241 } else {
237 242 qWarning()<<"Series not in the chart. Please addSeries to chart first.";
238 243 return false;
239 244 }
240 245 }
241 246
247 /*!
248 Detach \a axis from the series.
249 \return true if the axis was detached successfully, false otherwise.
250 \sa QChart::removeAxis()
251 */
242 252 bool QAbstractSeries::detachAxis(QAbstractAxis* axis)
243 253 {
244 254 if(d_ptr->m_chart) {
245 return d_ptr->m_chart->d_ptr->m_dataset->detachAxis(this,axis);
255 return d_ptr->m_chart->d_ptr->m_dataset->detachAxis(this, axis);
246 256 }
247 257 else {
248 258 qWarning()<<"Series not in the chart. Please addSeries to chart first.";
@@ -250,6 +260,11 bool QAbstractSeries::detachAxis(QAbstractAxis* axis)
250 260 }
251 261 }
252 262
263 /*!
264 Returns the list of axes attached to the series. Usually there is an x-axis and a y-axis attached to a series, except
265 in case of a QPieSeries, which does not have any axes attached.
266 \sa attachAxis(), detachAxis()
267 */
253 268 QList<QAbstractAxis*> QAbstractSeries::attachedAxes()
254 269 {
255 270 return d_ptr->m_axes;
General Comments 0
You need to be logged in to leave comments. Login now