From cf4d50b9c5410562055484c209798967813a4dad 2012-12-10 10:35:46 From: Tero Ahola Date: 2012-12-10 10:35:46 Subject: [PATCH] Documented the new functionality in QChart --- diff --git a/src/qchart.cpp b/src/qchart.cpp index 4c206d7..ba62cc9 100644 --- a/src/qchart.cpp +++ b/src/qchart.cpp @@ -92,6 +92,11 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! + \property QChart::margins + Minimum between the plot area (axes) and the edge of the chart widget. + */ + +/*! \property QChart::theme Theme is a built-in collection of UI style related settings applied for all visual elements of a chart, like colors, pens, brushes and fonts of series, axes, title and legend. \l {Chart themes demo} shows an example with a few @@ -358,6 +363,10 @@ QAbstractAxis *QChart::axisY(QAbstractSeries *series) const return left?left:right; } +/*! + Returns the axes added for the \a series with \a orientation + \sa addAxis(), createDefaultAxes() + */ QList QChart::axes(Qt::Orientations orientation, QAbstractSeries *series) const { QList result ; @@ -571,11 +580,19 @@ void QChart::setAxisY(QAbstractAxis *axis , QAbstractSeries *series) d_ptr->m_dataset->attachAxis(series,axis); } -void QChart::addAxis(QAbstractAxis *axis,Qt::Alignment aligment) +/*! + Adds \a axis to the chart with \a alignment. The chart takes the ownership of the axis. + \sa removeAxis(), createDefaultAxes(), QAbstractSeries::attachAxis() +*/ +void QChart::addAxis(QAbstractAxis *axis, Qt::Alignment alignment) { - d_ptr->m_dataset->addAxis(axis,aligment); + d_ptr->m_dataset->addAxis(axis, alignment); } +/*! + Removes \a axis from the chart. The ownership is returned to the caller. + \sa addAxis(), createDefaultAxes(), QAbstractSeries::detachAxis() +*/ void QChart::removeAxis(QAbstractAxis *axis) { d_ptr->m_dataset->removeAxis(axis); diff --git a/src/qchart.h b/src/qchart.h index 6fdd97a..57d9a03 100644 --- a/src/qchart.h +++ b/src/qchart.h @@ -76,15 +76,14 @@ public: void removeAllSeries(); QList series() const; - //depreciated shit//////////////////////////////////////////////////. + // *** deprecated *** void setAxisX(QAbstractAxis *axis, QAbstractSeries *series = 0); void setAxisY(QAbstractAxis *axis, QAbstractSeries *series = 0); - QAbstractAxis *axisX(QAbstractSeries *series = 0) const; QAbstractAxis *axisY(QAbstractSeries *series = 0) const; - ///////////////////////////////////////////////////////////////////// + // ****************** - void addAxis(QAbstractAxis *axis,Qt::Alignment aligment); + void addAxis(QAbstractAxis *axis,Qt::Alignment alignment); void removeAxis(QAbstractAxis *axis); QList axes(Qt::Orientations orientation = Qt::Horizontal|Qt::Vertical, QAbstractSeries *series = 0) const;