From d597861431975d7844ae5e1e3ab098ee84150e07 2012-07-23 13:45:41 From: Marek Rosa Date: 2012-07-23 13:45:41 Subject: [PATCH] Docs update --- diff --git a/src/axis/datetimeaxis/qdatetimeaxis.cpp b/src/axis/datetimeaxis/qdatetimeaxis.cpp index 0d55e04..3232f36 100644 --- a/src/axis/datetimeaxis/qdatetimeaxis.cpp +++ b/src/axis/datetimeaxis/qdatetimeaxis.cpp @@ -79,25 +79,25 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! - \fn void QDateTimeAxis::minChanged(qreal min) + \fn void QDateTimeAxis::minChanged(QDateTime min) Axis emits signal when \a min of axis has changed. */ /*! - \qmlsignal ValuesAxis::onMinChanged(real min) + \qmlsignal ValuesAxis::onMinChanged(QDateTime min) Axis emits signal when \a min of axis has changed. */ /*! - \fn void QDateTimeAxis::maxChanged(qreal max) + \fn void QDateTimeAxis::maxChanged(QDateTime max) Axis emits signal when \a max of axis has changed. */ /*! - \qmlsignal ValuesAxis::onMaxChanged(real max) + \qmlsignal ValuesAxis::onMaxChanged(QDateTime max) Axis emits signal when \a max of axis has changed. */ /*! - \fn void QDateTimeAxis::rangeChanged(qreal min, qreal max) + \fn void QDateTimeAxis::rangeChanged(QDateTime min, QDateTime max) Axis emits signal when \a min or \a max of axis has changed. */ @@ -112,16 +112,6 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! - \property QDateTimeAxis::niceNumbersEnabled - Whether the nice numbers algorithm is enabled or not for the axis. -*/ - -/*! - \qmlproperty bool ValuesAxis::niceNumbersEnabled - Whether the nice numbers algorithm is enabled or not for the axis. -*/ - -/*! Constructs an axis object which is a child of \a parent. */ QDateTimeAxis::QDateTimeAxis(QObject *parent) : @@ -203,12 +193,22 @@ void QDateTimeAxis::setRange(QDateTime min, QDateTime max) } } +/*! + Sets \a format string that is used when creating label for the axis out of the QDateTime object. + Check QDateTime documentation for information on how the string should be defined. + \sa formatString() +*/ void QDateTimeAxis::setFormatString(QString format) { Q_D(QDateTimeAxis); d->m_format = format; } +/*! + Returns the format string that is used when creating label for the axis out of the QDateTime object. + Check QDateTime documentation for information on how the string should be defined. + \sa setFormatString() +*/ QString QDateTimeAxis::formatString() const { Q_D(const QDateTimeAxis); diff --git a/src/axis/intervalsaxis/qintervalsaxis.cpp b/src/axis/intervalsaxis/qintervalsaxis.cpp index ab2a5df..de61df0 100644 --- a/src/axis/intervalsaxis/qintervalsaxis.cpp +++ b/src/axis/intervalsaxis/qintervalsaxis.cpp @@ -71,7 +71,8 @@ QIntervalsAxis::QIntervalsAxis(QIntervalsAxisPrivate &d,QObject *parent):QValues } /*! - Appends \a category to axis + Appends new interval to the axis with an \a intervalLabel. + Parameter \a interval specifies the high end limit of the interval. */ void QIntervalsAxis::append(const QString& intervalLabel, qreal interval) { @@ -91,6 +92,9 @@ void QIntervalsAxis::append(const QString& intervalLabel, qreal interval) } } +/*! + Sets to \a min the low end limit of the first interval on the axis. +*/ void QIntervalsAxis::setFisrtIntervalMinimum(qreal min) { Q_D(QIntervalsAxis); @@ -99,16 +103,21 @@ void QIntervalsAxis::setFisrtIntervalMinimum(qreal min) }else{ Range range = d->m_intervalsMap.value(d->m_intervals.first()); d->m_intervalsMap.insert(d->m_intervals.first(), Range(min, range.second)); -// setRange(min, d->m_min); } } +/*! + Returns the low end limit of the interval specified by an \a intervalLabel +*/ qreal QIntervalsAxis::intervalMin(const QString& intervalLabel) const { Q_D(const QIntervalsAxis); return d->m_intervalsMap.value(intervalLabel).first; } +/*! + Returns the high end limit of the interval specified by an \a intervalLabel +*/ qreal QIntervalsAxis::intervalMax(const QString& intervalLabel) const { Q_D(const QIntervalsAxis); @@ -116,7 +125,7 @@ qreal QIntervalsAxis::intervalMax(const QString& intervalLabel) const } /*! - Removes \a category from axis + Removes \a interval from axis */ void QIntervalsAxis::remove(const QString &intervalLabel) { diff --git a/src/piechart/qpieseries.cpp b/src/piechart/qpieseries.cpp index 5683238..21f2aaf 100644 --- a/src/piechart/qpieseries.cpp +++ b/src/piechart/qpieseries.cpp @@ -151,6 +151,37 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! + \property QPieSeries::donutInnerSize + \brief Defines the donut inner size. + + The value is a relative value to the chart rectangle where: + + \list + \o 0.0 is the minimum size (pie not drawn). + \o 1.0 is the maximum size that can fit the chart. (donut has no width) + \endlist + + The value is never greater then size property. + Default value is 0.5. +*/ + +/*! + \qmlproperty real PieSeries::donutInnerSize + + Defines the donut inner size. + + The value is a relative value to the chart rectangle where: + + \list + \o 0.0 is the minimum size (donut is a pie). + \o 1.0 is the maximum size that can fit the chart. (donut has no width) + \endlist + + The value is never greater then size property. + Default value is 0.5. +*/ + +/*! \property QPieSeries::startAngle \brief Defines the starting angle of the pie. @@ -542,8 +573,8 @@ void QPieSeries::setDonutInnerSize(qreal innerSize) if (innerSize < 0.0) innerSize = 0.0; - if (innerSize > 1.0) - innerSize = 1.0; + if (innerSize > d->m_pieRelativeSize) + innerSize = d->m_pieRelativeSize; d->m_donutRelativeInnerSize = innerSize; d->updateDerivativeData(); diff --git a/src/piechart/qpieseries.h b/src/piechart/qpieseries.h index d78d869..a144e24 100644 --- a/src/piechart/qpieseries.h +++ b/src/piechart/qpieseries.h @@ -38,6 +38,8 @@ class QTCOMMERCIALCHART_EXPORT QPieSeries : public QAbstractSeries Q_PROPERTY(qreal endAngle READ pieEndAngle WRITE setPieEndAngle) Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(qreal sum READ sum NOTIFY sumChanged) + Q_PROPERTY(qreal donutInnerSize READ donutInnerSize WRITE setDonutInnerSize) + Q_PROPERTY(bool donut READ donut WRITE setDonut) public: explicit QPieSeries(QObject *parent = 0); diff --git a/src/piechart/qpieslice.cpp b/src/piechart/qpieslice.cpp index aa4cc3d..5f35b01 100644 --- a/src/piechart/qpieslice.cpp +++ b/src/piechart/qpieslice.cpp @@ -61,7 +61,8 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \value LabelOutside Label is outside the slice with an arm. \value LabelInside Label is centered inside the slice. - + \value LabelInsideTangential Label is centered inside the slice and rotated to be parallel to the tangential of the slice's arc + \value LabelInsideNormal Label is centered inside the slice rotated to be parallel to the normal of the slice's arc. */ /*!