##// END OF EJS Templates
Some interval axis docs updates
Marek Rosa -
r1800:0d55302d18fc
parent child
Show More
@@ -34,6 +34,7
34 <li><a href="qabstractaxis.html">QAbstractAxis</a></li>
34 <li><a href="qabstractaxis.html">QAbstractAxis</a></li>
35 <li><a href="qvaluesaxis.html">QValuesAxis</a></li>
35 <li><a href="qvaluesaxis.html">QValuesAxis</a></li>
36 <li><a href="qbarcategoriesaxis.html">QBarCategoriesAxis</a></li>
36 <li><a href="qbarcategoriesaxis.html">QBarCategoriesAxis</a></li>
37 <li><a href="qintervalsaxis.html">QIntervalsAxis</a></li>
37 <li><a href="qlegend.html">QLegend</a></li>
38 <li><a href="qlegend.html">QLegend</a></li>
38 <li><a href="qabstractseries.html">QAbstractSeries</a></li>
39 <li><a href="qabstractseries.html">QAbstractSeries</a></li>
39 <li><a href="qchartglobal.html">QChartGlobal</a></li>
40 <li><a href="qchartglobal.html">QChartGlobal</a></li>
@@ -27,12 +27,9
27
27
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28 QTCOMMERCIALCHART_BEGIN_NAMESPACE
29 /*!
29 /*!
30 \internal
31 \class QIntervalsAxis
30 \class QIntervalsAxis
32 \brief The QIntervalsAxis class is used for manipulating chart's axis.
31 \brief The QIntervalsAxis class is used for manipulating chart's axis.
33 \mainclass
32 \mainclass
34
35 Axis can be setup to show axis line with tick marks, grid lines and shades.
36 */
33 */
37
34
38 /*!
35 /*!
@@ -77,7 +74,7 QIntervalsAxis::QIntervalsAxis(QIntervalsAxisPrivate &d,QObject *parent):QValues
77 /*!
74 /*!
78 Appends new interval to the axis with an \a intervalLabel.
75 Appends new interval to the axis with an \a intervalLabel.
79 Interval label has to be unique.
76 Interval label has to be unique.
80 Parameter \a interval specifies the high end limit of the interval.
77 Parameter \a intervalEnd specifies the high end limit of the interval.
81 It has to be greater than the high end limit of the previous interval.
78 It has to be greater than the high end limit of the previous interval.
82 Otherwise the method returns without adding a new interval.
79 Otherwise the method returns without adding a new interval.
83 */
80 */
@@ -132,7 +129,7 qreal QIntervalsAxis::intervalMax(const QString& intervalLabel) const
132 }
129 }
133
130
134 /*!
131 /*!
135 Removes \a interval from axis
132 Removes an interval specified by the \a intervalLabel from the axis
136 */
133 */
137 void QIntervalsAxis::remove(const QString &intervalLabel)
134 void QIntervalsAxis::remove(const QString &intervalLabel)
138 {
135 {
@@ -162,6 +159,10 void QIntervalsAxis::remove(const QString &intervalLabel)
162 }
159 }
163 }
160 }
164
161
162 /*!
163 Replaces \a oldLabel of an existing interval with a \a newLabel
164 If the old label does not exist the method returns without making any changes.
165 */
165 void QIntervalsAxis::replaceLabel(const QString& oldLabel, const QString& newLabel)
166 void QIntervalsAxis::replaceLabel(const QString& oldLabel, const QString& newLabel)
166 {
167 {
167 Q_D(QIntervalsAxis);
168 Q_D(QIntervalsAxis);
@@ -178,6 +179,9 void QIntervalsAxis::replaceLabel(const QString& oldLabel, const QString& newLab
178
179
179 }
180 }
180
181
182 /*!
183 Returns the list of the intervals labels
184 */
181 QStringList QIntervalsAxis::intervalsLabels()
185 QStringList QIntervalsAxis::intervalsLabels()
182 {
186 {
183 Q_D(QIntervalsAxis);
187 Q_D(QIntervalsAxis);
@@ -293,7 +293,7 void tst_QIntervalsAxis::interval()
293 QCOMPARE(m_intervalsaxis->intervalMax("second"), (qreal)75);
293 QCOMPARE(m_intervalsaxis->intervalMax("second"), (qreal)75);
294
294
295 // remove one interval
295 // remove one interval
296 m_intervalsaxis->replace("second", "replaced");
296 m_intervalsaxis->replaceLabel("second", "replaced");
297 QCOMPARE(m_intervalsaxis->count(), 2);
297 QCOMPARE(m_intervalsaxis->count(), 2);
298 QCOMPARE(m_intervalsaxis->intervalMin("replaced"), (qreal)0); // second interval should extend to firstInterval minimum
298 QCOMPARE(m_intervalsaxis->intervalMin("replaced"), (qreal)0); // second interval should extend to firstInterval minimum
299 QCOMPARE(m_intervalsaxis->intervalMax("replaced"), (qreal)75);
299 QCOMPARE(m_intervalsaxis->intervalMax("replaced"), (qreal)75);
General Comments 0
You need to be logged in to leave comments. Login now