From aeeb738d6b7d25cdf7a9b7ca831a540a327cb27f 2012-08-24 09:12:10 From: Marek Rosa Date: 2012-08-24 09:12:10 Subject: [PATCH] Some axes docs update --- diff --git a/src/axis/categoryaxis/qcategoryaxis.cpp b/src/axis/categoryaxis/qcategoryaxis.cpp index 564f0d9..f0f5cf9 100644 --- a/src/axis/categoryaxis/qcategoryaxis.cpp +++ b/src/axis/categoryaxis/qcategoryaxis.cpp @@ -28,13 +28,26 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! \class QCategoryAxis - \brief The QCategoryAxis class is used for manipulating chart's axis. + \brief The QCategoryAxis class allows putting a named ranges on the axis. \mainclass + + This class can be used when the underlying data needs to be given extra meaning. + Unlike with the QBarCategoryAxis the QCategoryAxis allows the categories ranges widths to be specified freely. */ /*! \qmlclass CategoryAxis QCategoryAxis - \brief The Axis element is used for manipulating chart's axes. + \brief The QCategoryAxis class allows putting a named ranges on the axis. +*/ + +/*! + \property QCategoryAxis::startValue + Defines the low end of the first category on the axis. +*/ + +/*! + \qmlproperty int CategoryAxis::startValue + Defines the low end of the first category on the axis. */ /*! @@ -90,7 +103,16 @@ void QCategoryAxis::append(const QString& categoryLabel, qreal categoryHighEnd) } /*! - Sets to \a min the low end limit of the first category on the axis. + Returns the low end limit of the first category on the axis. +*/ +qreal QCategoryAxis::startValue() const +{ + Q_D(const QCategoryAxis); + return d->m_categoryMinimum; +} + +/*! + Sets \a min to be the low end limit of the first category on the axis. */ void QCategoryAxis::setStartValue(qreal min) { diff --git a/src/axis/categoryaxis/qcategoryaxis.h b/src/axis/categoryaxis/qcategoryaxis.h index ac8b318..1878c72 100644 --- a/src/axis/categoryaxis/qcategoryaxis.h +++ b/src/axis/categoryaxis/qcategoryaxis.h @@ -31,6 +31,7 @@ class QCategoryAxisPrivate; class QTCOMMERCIALCHART_EXPORT QCategoryAxis : public QValueAxis { Q_OBJECT + Q_PROPERTY(qreal startValue READ startValue WRITE setStartValue) public: explicit QCategoryAxis(QObject *parent = 0); @@ -46,6 +47,7 @@ public: void remove(const QString& label); void replaceLabel(const QString& oldLabel, const QString& newLabel); + qreal startValue() const; void setStartValue(qreal min); qreal categoryStart(const QString& categoryLabel) const; @@ -54,7 +56,6 @@ public: QStringList categoriesLabels(); int count() const; - private: Q_DECLARE_PRIVATE(QCategoryAxis) Q_DISABLE_COPY(QCategoryAxis) diff --git a/src/axis/categoryaxis/qcategoryaxis_p.h b/src/axis/categoryaxis/qcategoryaxis_p.h index 38c2410..7a9918c 100644 --- a/src/axis/categoryaxis/qcategoryaxis_p.h +++ b/src/axis/categoryaxis/qcategoryaxis_p.h @@ -45,8 +45,6 @@ public: QCategoryAxisPrivate(QCategoryAxis *q); ~QCategoryAxisPrivate(); - -public: ChartAxis* createGraphics(ChartPresenter* presenter); int ticksCount() const; diff --git a/src/axis/datetimeaxis/qdatetimeaxis.cpp b/src/axis/datetimeaxis/qdatetimeaxis.cpp index aec1123..ed701be 100644 --- a/src/axis/datetimeaxis/qdatetimeaxis.cpp +++ b/src/axis/datetimeaxis/qdatetimeaxis.cpp @@ -33,7 +33,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \mainclass The labels can be configured by setting an appropriate DateTime format. - Note that any date before 4800 BCE or after about 1.4 million CE may not be accurately stored. + Note that any date before 4714 BCE or after about 1.4 million CE may not be accurately stored. QDateTimeAxis can be setup to show axis line with tick marks, grid lines and shades. */ @@ -42,7 +42,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE \brief The DateTimeAxis element is used for manipulating chart's axes The labels can be configured by setting an appropriate DateTime format. - Note that any date before 4800 BCE or after about 1.4 million CE may not be accurately stored. + Note that any date before 4714 BCE or after about 1.4 million CE may not be accurately stored. DateTimeAxis can be setup to show axis line with tick marks, grid lines and shades. */ @@ -175,8 +175,6 @@ void QDateTimeAxis::setRange(QDateTime min, QDateTime max) emit maxChanged(max); } - // if(d->m_niceNumbers) d->looseNiceNumbers(d->m_min, d->m_max, d->m_tickCount); - if (changed) { emit rangeChanged(d->m_min,d->m_max); d->emitUpdated();