@@ -32,6 +32,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
32 | \brief The QDateTimeAxis class is used for manipulating chart's axis. |
|
32 | \brief The QDateTimeAxis class is used for manipulating chart's axis. | |
33 | \mainclass |
|
33 | \mainclass | |
34 |
|
34 | |||
|
35 | Note that any date before 4800 BCE or after about 1.4 million CE may not be accurately stored. | |||
|
36 | ||||
35 | ValuesAxis can be setup to show axis line with tick marks, grid lines and shades. |
|
37 | ValuesAxis can be setup to show axis line with tick marks, grid lines and shades. | |
36 | Values of axis are drawn to position of ticks |
|
38 | Values of axis are drawn to position of ticks | |
37 | */ |
|
39 | */ |
@@ -40,20 +40,20 private slots: | |||||
40 | void max_raw(); |
|
40 | void max_raw(); | |
41 | void max_data(); |
|
41 | void max_data(); | |
42 | void max(); |
|
42 | void max(); | |
43 |
|
|
43 | void max_animation_data(); | |
44 |
|
|
44 | void max_animation(); | |
45 | void min_raw_data(); |
|
45 | void min_raw_data(); | |
46 | void min_raw(); |
|
46 | void min_raw(); | |
47 | void min_data(); |
|
47 | void min_data(); | |
48 | void min(); |
|
48 | void min(); | |
49 |
|
|
49 | void min_animation_data(); | |
50 |
|
|
50 | void min_animation(); | |
51 | void range_raw_data(); |
|
51 | void range_raw_data(); | |
52 | void range_raw(); |
|
52 | void range_raw(); | |
53 | void range_data(); |
|
53 | void range_data(); | |
54 | void range(); |
|
54 | void range(); | |
55 |
|
|
55 | void range_animation_data(); | |
56 |
|
|
56 | void range_animation(); | |
57 |
|
57 | |||
58 | private: |
|
58 | private: | |
59 | QDateTimeAxis *m_dateTimeAxisX; |
|
59 | QDateTimeAxis *m_dateTimeAxisX; | |
@@ -107,9 +107,6 void tst_QDateTimeAxis::qdatetimeaxis_data() | |||||
107 | void tst_QDateTimeAxis::qdatetimeaxis() |
|
107 | void tst_QDateTimeAxis::qdatetimeaxis() | |
108 | { |
|
108 | { | |
109 | // qabstractaxis(); |
|
109 | // qabstractaxis(); | |
110 |
|
||||
111 | // QVERIFY(m_datetimeaxis->max().toMSecsSinceEpoch() == 0); |
|
|||
112 | // QVERIFY(m_datetimeaxis->min().toMSecsSinceEpoch() == 0); |
|
|||
113 | QCOMPARE(m_dateTimeAxisX->type(), QAbstractAxis::AxisTypeDateTime); |
|
110 | QCOMPARE(m_dateTimeAxisX->type(), QAbstractAxis::AxisTypeDateTime); | |
114 |
|
111 | |||
115 | m_view->show(); |
|
112 | m_view->show(); | |
@@ -141,7 +138,6 void tst_QDateTimeAxis::max_raw() | |||||
141 |
|
138 | |||
142 | m_dateTimeAxisX->setMax(max); |
|
139 | m_dateTimeAxisX->setMax(max); | |
143 |
|
140 | |||
144 |
|
||||
145 | if (valid) { |
|
141 | if (valid) { | |
146 | QVERIFY2(m_dateTimeAxisX->max() == max, "Not equal"); |
|
142 | QVERIFY2(m_dateTimeAxisX->max() == max, "Not equal"); | |
147 | QCOMPARE(spy0.count(), 1); |
|
143 | QCOMPARE(spy0.count(), 1); | |
@@ -168,16 +164,16 void tst_QDateTimeAxis::max() | |||||
168 | max_raw(); |
|
164 | max_raw(); | |
169 | } |
|
165 | } | |
170 |
|
166 | |||
171 |
|
|
167 | void tst_QDateTimeAxis::max_animation_data() | |
172 | //{ |
|
168 | { | |
173 |
|
|
169 | max_data(); | |
174 | //} |
|
170 | } | |
175 |
|
171 | |||
176 |
|
|
172 | void tst_QDateTimeAxis::max_animation() | |
177 | //{ |
|
173 | { | |
178 |
|
|
174 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); | |
179 |
|
|
175 | max(); | |
180 | //} |
|
176 | } | |
181 |
|
177 | |||
182 | void tst_QDateTimeAxis::min_raw_data() |
|
178 | void tst_QDateTimeAxis::min_raw_data() | |
183 | { |
|
179 | { | |
@@ -227,16 +223,16 void tst_QDateTimeAxis::min() | |||||
227 | min_raw(); |
|
223 | min_raw(); | |
228 | } |
|
224 | } | |
229 |
|
225 | |||
230 |
|
|
226 | void tst_QDateTimeAxis::min_animation_data() | |
231 | //{ |
|
227 | { | |
232 |
|
|
228 | min_data(); | |
233 | //} |
|
229 | } | |
234 |
|
230 | |||
235 |
|
|
231 | void tst_QDateTimeAxis::min_animation() | |
236 | //{ |
|
232 | { | |
237 |
|
|
233 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); | |
238 |
|
|
234 | min(); | |
239 | //} |
|
235 | } | |
240 |
|
236 | |||
241 | void tst_QDateTimeAxis::range_raw_data() |
|
237 | void tst_QDateTimeAxis::range_raw_data() | |
242 | { |
|
238 | { | |
@@ -301,16 +297,16 void tst_QDateTimeAxis::range() | |||||
301 | range_raw(); |
|
297 | range_raw(); | |
302 | } |
|
298 | } | |
303 |
|
299 | |||
304 |
|
|
300 | void tst_QDateTimeAxis::range_animation_data() | |
305 | //{ |
|
301 | { | |
306 |
|
|
302 | range_data(); | |
307 | //} |
|
303 | } | |
308 |
|
304 | |||
309 |
|
|
305 | void tst_QDateTimeAxis::range_animation() | |
310 | //{ |
|
306 | { | |
311 |
|
|
307 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); | |
312 |
|
|
308 | range(); | |
313 | //} |
|
309 | } | |
314 |
|
310 | |||
315 | QTEST_MAIN(tst_QDateTimeAxis) |
|
311 | QTEST_MAIN(tst_QDateTimeAxis) | |
316 | #include "tst_qdatetimeaxis.moc" |
|
312 | #include "tst_qdatetimeaxis.moc" |
General Comments 0
You need to be logged in to leave comments.
Login now