This diff has been collapsed as it changes many lines, (1968 lines changed) Show them Hide them | |||||
@@ -1,2120 +1,848 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #include "tst_qabstractaxis.h" |
|
21 | #include "tst_qabstractaxis.h" | |
22 |
|
22 | |||
23 | Q_DECLARE_METATYPE(QPen) |
|
23 | Q_DECLARE_METATYPE(QPen) | |
|
24 | Q_DECLARE_METATYPE(Qt::Orientation) | |||
24 |
|
25 | |||
25 | void tst_QAbstractAxis::initTestCase() |
|
26 | void tst_QAbstractAxis::initTestCase() | |
26 | { |
|
27 | { | |
27 | } |
|
28 | } | |
28 |
|
29 | |||
29 | void tst_QAbstractAxis::cleanupTestCase() |
|
30 | void tst_QAbstractAxis::cleanupTestCase() | |
30 | { |
|
31 | { | |
31 | } |
|
32 | } | |
32 |
|
33 | |||
33 | void tst_QAbstractAxis::init(QAbstractAxis* axis) |
|
34 | void tst_QAbstractAxis::init(QAbstractAxis* axis,QAbstractSeries* series) | |
34 | { |
|
35 | { | |
35 | m_axis = axis; |
|
36 | m_axis = axis; | |
|
37 | m_series = series; | |||
36 | m_view = new QChartView(new QChart()); |
|
38 | m_view = new QChartView(new QChart()); | |
37 | m_chart = m_view->chart(); |
|
39 | m_chart = m_view->chart(); | |
38 | } |
|
40 | } | |
39 |
|
41 | |||
40 | void tst_QAbstractAxis::cleanup() |
|
42 | void tst_QAbstractAxis::cleanup() | |
41 | { |
|
43 | { | |
42 |
|
44 | |||
43 | delete m_view; |
|
45 | delete m_view; | |
44 | m_view = 0; |
|
46 | m_view = 0; | |
45 | m_chart = 0; |
|
47 | m_chart = 0; | |
46 | m_axis = 0; |
|
48 | m_axis = 0; | |
47 | } |
|
49 | } | |
48 |
|
50 | |||
49 | void tst_QAbstractAxis::qabstractaxis() |
|
51 | void tst_QAbstractAxis::qabstractaxis() | |
50 | { |
|
52 | { | |
51 | QCOMPARE(m_axis->axisPen(), QPen()); |
|
53 | QCOMPARE(m_axis->axisPen(), QPen()); | |
52 | //TODO QCOMPARE(m_axis->axisPenColor(), QColor()); |
|
54 | //TODO QCOMPARE(m_axis->axisPenColor(), QColor()); | |
53 | QCOMPARE(m_axis->gridLinePen(), QPen()); |
|
55 | QCOMPARE(m_axis->gridLinePen(), QPen()); | |
54 | QCOMPARE(m_axis->isArrowVisible(), true); |
|
56 | QCOMPARE(m_axis->isArrowVisible(), true); | |
55 | QCOMPARE(m_axis->isGridLineVisible(), true); |
|
57 | QCOMPARE(m_axis->isGridLineVisible(), true); | |
56 | QCOMPARE(m_axis->isVisible(), false); |
|
58 | QCOMPARE(m_axis->isVisible(), false); | |
57 | QCOMPARE(m_axis->labelsAngle(), 0); |
|
59 | QCOMPARE(m_axis->labelsAngle(), 0); | |
58 | QCOMPARE(m_axis->labelsBrush(), QBrush()); |
|
60 | QCOMPARE(m_axis->labelsBrush(), QBrush()); | |
59 | //TODO QCOMPARE(m_axis->labelsColor(), QColor()); |
|
61 | //TODO QCOMPARE(m_axis->labelsColor(), QColor()); | |
60 | QCOMPARE(m_axis->labelsFont(), QFont()); |
|
62 | QCOMPARE(m_axis->labelsFont(), QFont()); | |
61 | QCOMPARE(m_axis->labelsPen(), QPen()); |
|
63 | QCOMPARE(m_axis->labelsPen(), QPen()); | |
62 | QCOMPARE(m_axis->labelsVisible(), true); |
|
64 | QCOMPARE(m_axis->labelsVisible(), true); | |
63 | QCOMPARE(m_axis->orientation(), Qt::Orientation(0)); |
|
65 | QCOMPARE(m_axis->orientation(), Qt::Orientation(0)); | |
64 | m_axis->setArrowVisible(false); |
|
66 | m_axis->setArrowVisible(false); | |
65 | m_axis->setAxisPen(QPen()); |
|
67 | m_axis->setAxisPen(QPen()); | |
66 | m_axis->setAxisPenColor(QColor()); |
|
68 | m_axis->setAxisPenColor(QColor()); | |
67 | m_axis->setGridLinePen(QPen()); |
|
69 | m_axis->setGridLinePen(QPen()); | |
68 | m_axis->setGridLineVisible(false); |
|
70 | m_axis->setGridLineVisible(false); | |
69 | m_axis->setLabelsAngle(-1); |
|
71 | m_axis->setLabelsAngle(-1); | |
70 | m_axis->setLabelsBrush(QBrush()); |
|
72 | m_axis->setLabelsBrush(QBrush()); | |
71 | m_axis->setLabelsColor(QColor()); |
|
73 | m_axis->setLabelsColor(QColor()); | |
72 | m_axis->setLabelsFont(QFont()); |
|
74 | m_axis->setLabelsFont(QFont()); | |
73 | m_axis->setLabelsPen(QPen()); |
|
75 | m_axis->setLabelsPen(QPen()); | |
74 | m_axis->setLabelsVisible(false); |
|
76 | m_axis->setLabelsVisible(false); | |
75 | m_axis->setMax(QVariant()); |
|
77 | m_axis->setMax(QVariant()); | |
76 | m_axis->setMin(QVariant()); |
|
78 | m_axis->setMin(QVariant()); | |
77 | m_axis->setRange(QVariant(), QVariant()); |
|
79 | m_axis->setRange(QVariant(), QVariant()); | |
78 | m_axis->setShadesBorderColor(QColor()); |
|
80 | m_axis->setShadesBorderColor(QColor()); | |
79 | m_axis->setShadesBrush(QBrush()); |
|
81 | m_axis->setShadesBrush(QBrush()); | |
80 | m_axis->setShadesColor(QColor()); |
|
82 | m_axis->setShadesColor(QColor()); | |
81 | m_axis->setShadesPen(QPen()); |
|
83 | m_axis->setShadesPen(QPen()); | |
82 | m_axis->setShadesVisible(false); |
|
84 | m_axis->setShadesVisible(false); | |
83 | m_axis->setVisible(false); |
|
85 | m_axis->setVisible(false); | |
84 | //TODO QCOMPARE(m_axis->shadesBorderColor(), QColor()); |
|
86 | //TODO QCOMPARE(m_axis->shadesBorderColor(), QColor()); | |
85 | //TODO QCOMPARE(m_axis->shadesBrush(), QBrush()); |
|
87 | //TODO QCOMPARE(m_axis->shadesBrush(), QBrush()); | |
86 | //TODO QCOMPARE(m_axis->shadesColor(), QColor()); |
|
88 | //TODO QCOMPARE(m_axis->shadesColor(), QColor()); | |
87 | QCOMPARE(m_axis->shadesPen(), QPen()); |
|
89 | QCOMPARE(m_axis->shadesPen(), QPen()); | |
88 | QCOMPARE(m_axis->shadesVisible(), false); |
|
90 | QCOMPARE(m_axis->shadesVisible(), false); | |
89 | m_axis->show(); |
|
91 | m_axis->show(); | |
90 | m_axis->hide(); |
|
92 | m_axis->hide(); | |
91 | } |
|
93 | } | |
92 |
|
94 | |||
93 | void tst_QAbstractAxis::axisPen_data() |
|
95 | void tst_QAbstractAxis::axisPen_data() | |
94 | { |
|
96 | { | |
95 | QTest::addColumn<QPen>("axisPen"); |
|
97 | QTest::addColumn<QPen>("axisPen"); | |
96 | QTest::newRow("null") << QPen(); |
|
98 | QTest::newRow("null") << QPen(); | |
97 | QTest::newRow("blue") << QPen(Qt::blue); |
|
99 | QTest::newRow("blue") << QPen(Qt::blue); | |
98 | QTest::newRow("black") << QPen(Qt::black); |
|
100 | QTest::newRow("black") << QPen(Qt::black); | |
99 | QTest::newRow("red") << QPen(Qt::red); |
|
101 | QTest::newRow("red") << QPen(Qt::red); | |
100 | } |
|
102 | } | |
101 |
|
103 | |||
102 | void tst_QAbstractAxis::axisPen() |
|
104 | void tst_QAbstractAxis::axisPen() | |
103 | { |
|
105 | { | |
104 |
|
||||
105 | QFETCH(QPen, axisPen); |
|
106 | QFETCH(QPen, axisPen); | |
106 |
|
107 | |||
107 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); |
|
108 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
108 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); |
|
109 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
109 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); |
|
110 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
110 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); |
|
111 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
111 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); |
|
112 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
112 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
113 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
113 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); |
|
114 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
114 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); |
|
115 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
115 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); |
|
116 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
116 |
|
117 | |||
117 | m_axis->setAxisPen(axisPen); |
|
118 | m_axis->setAxisPen(axisPen); | |
118 | QCOMPARE(m_axis->axisPen(), axisPen); |
|
119 | QCOMPARE(m_axis->axisPen(), axisPen); | |
119 |
|
120 | |||
120 | QCOMPARE(spy0.count(), 0); |
|
121 | QCOMPARE(spy0.count(), 0); | |
121 | QCOMPARE(spy1.count(), 0); |
|
122 | QCOMPARE(spy1.count(), 0); | |
122 | QCOMPARE(spy2.count(), 0); |
|
123 | QCOMPARE(spy2.count(), 0); | |
123 | QCOMPARE(spy3.count(), 0); |
|
124 | QCOMPARE(spy3.count(), 0); | |
124 | QCOMPARE(spy4.count(), 0); |
|
125 | QCOMPARE(spy4.count(), 0); | |
125 | QCOMPARE(spy5.count(), 0); |
|
126 | QCOMPARE(spy5.count(), 0); | |
126 | QCOMPARE(spy6.count(), 0); |
|
127 | QCOMPARE(spy6.count(), 0); | |
127 | QCOMPARE(spy7.count(), 0); |
|
128 | QCOMPARE(spy7.count(), 0); | |
128 | QCOMPARE(spy8.count(), 0); |
|
129 | QCOMPARE(spy8.count(), 0); | |
129 |
|
130 | |||
|
131 | m_chart->setAxisX(m_axis, m_series); | |||
|
132 | m_view->show(); | |||
|
133 | QTest::qWaitForWindowShown(m_view); | |||
|
134 | //TODO QCOMPARE(m_axis->axisPen(), axisPen); | |||
130 | } |
|
135 | } | |
131 |
|
136 | |||
132 | void tst_QAbstractAxis::axisPenColor_data() |
|
137 | void tst_QAbstractAxis::axisPenColor_data() | |
133 | { |
|
138 | { | |
134 | #if 0 |
|
|||
135 | QTest::addColumn<QColor>("axisPenColor"); |
|
|||
136 | QTest::newRow("null") << QColor(); |
|
|||
137 | #endif |
|
|||
138 | } |
|
139 | } | |
139 |
|
140 | |||
140 | void tst_QAbstractAxis::axisPenColor() |
|
141 | void tst_QAbstractAxis::axisPenColor() | |
141 | { |
|
142 | { | |
142 | #if 0 |
|
143 | QSKIP("Test is not implemented. This is depreciated function", SkipAll); | |
143 | QFETCH(QColor, axisPenColor); |
|
|||
144 |
|
||||
145 | SubQAbstractAxis axis; |
|
|||
146 |
|
||||
147 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
148 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
149 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
150 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
151 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
152 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
153 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
154 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
155 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
156 |
|
||||
157 | QCOMPARE(axis.axisPenColor(), axisPenColor); |
|
|||
158 |
|
||||
159 | QCOMPARE(spy0.count(), 0); |
|
|||
160 | QCOMPARE(spy1.count(), 0); |
|
|||
161 | QCOMPARE(spy2.count(), 0); |
|
|||
162 | QCOMPARE(spy3.count(), 0); |
|
|||
163 | QCOMPARE(spy4.count(), 0); |
|
|||
164 | QCOMPARE(spy5.count(), 0); |
|
|||
165 | QCOMPARE(spy6.count(), 0); |
|
|||
166 | QCOMPARE(spy7.count(), 0); |
|
|||
167 | QCOMPARE(spy8.count(), 0); |
|
|||
168 | #endif |
|
|||
169 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
170 | } |
|
144 | } | |
171 |
|
145 | |||
172 | void tst_QAbstractAxis::gridLinePen_data() |
|
146 | void tst_QAbstractAxis::gridLinePen_data() | |
173 | { |
|
147 | { | |
174 |
|
148 | |||
175 | QTest::addColumn<QPen>("gridLinePen"); |
|
149 | QTest::addColumn<QPen>("gridLinePen"); | |
176 | QTest::newRow("null") << QPen(); |
|
150 | QTest::newRow("null") << QPen(); | |
177 | QTest::newRow("blue") << QPen(Qt::blue); |
|
151 | QTest::newRow("blue") << QPen(Qt::blue); | |
178 | QTest::newRow("black") << QPen(Qt::black); |
|
152 | QTest::newRow("black") << QPen(Qt::black); | |
179 | QTest::newRow("red") << QPen(Qt::red); |
|
153 | QTest::newRow("red") << QPen(Qt::red); | |
180 |
|
154 | |||
181 | } |
|
155 | } | |
182 |
|
156 | |||
183 | void tst_QAbstractAxis::gridLinePen() |
|
157 | void tst_QAbstractAxis::gridLinePen() | |
184 | { |
|
158 | { | |
185 | QFETCH(QPen, gridLinePen); |
|
159 | QFETCH(QPen, gridLinePen); | |
186 |
|
160 | |||
187 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); |
|
161 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
188 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); |
|
162 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
189 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); |
|
163 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
190 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); |
|
164 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
191 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); |
|
165 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
192 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
166 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
193 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); |
|
167 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
194 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); |
|
168 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
195 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); |
|
169 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
196 |
|
170 | |||
197 | m_axis->setGridLinePen(gridLinePen); |
|
171 | m_axis->setGridLinePen(gridLinePen); | |
198 | QCOMPARE(m_axis->gridLinePen(), gridLinePen); |
|
172 | QCOMPARE(m_axis->gridLinePen(), gridLinePen); | |
199 |
|
173 | |||
200 | QCOMPARE(spy0.count(), 0); |
|
174 | QCOMPARE(spy0.count(), 0); | |
201 | QCOMPARE(spy1.count(), 0); |
|
175 | QCOMPARE(spy1.count(), 0); | |
202 | QCOMPARE(spy2.count(), 0); |
|
176 | QCOMPARE(spy2.count(), 0); | |
203 | QCOMPARE(spy3.count(), 0); |
|
177 | QCOMPARE(spy3.count(), 0); | |
204 | QCOMPARE(spy4.count(), 0); |
|
178 | QCOMPARE(spy4.count(), 0); | |
205 | QCOMPARE(spy5.count(), 0); |
|
179 | QCOMPARE(spy5.count(), 0); | |
206 | QCOMPARE(spy6.count(), 0); |
|
180 | QCOMPARE(spy6.count(), 0); | |
207 | QCOMPARE(spy7.count(), 0); |
|
181 | QCOMPARE(spy7.count(), 0); | |
208 | QCOMPARE(spy8.count(), 0); |
|
182 | QCOMPARE(spy8.count(), 0); | |
209 |
|
183 | |||
|
184 | m_chart->setAxisX(m_axis, m_series); | |||
|
185 | m_view->show(); | |||
|
186 | QTest::qWaitForWindowShown(m_view); | |||
|
187 | //TODO QCOMPARE(m_axis->gridLinePen(), gridLinePen); | |||
210 | } |
|
188 | } | |
211 |
|
189 | |||
212 |
void tst_QAbstractAxis:: |
|
190 | void tst_QAbstractAxis::arrowVisible_data() | |
213 | { |
|
|||
214 | QTest::addColumn<int>("foo"); |
|
|||
215 | QTest::newRow("0") << 0; |
|
|||
216 | QTest::newRow("-1") << -1; |
|
|||
217 | } |
|
|||
218 |
|
||||
219 | // public void hide() |
|
|||
220 | void tst_QAbstractAxis::hide() |
|
|||
221 | { |
|
|||
222 | #if 0 |
|
|||
223 | QFETCH(int, foo); |
|
|||
224 |
|
||||
225 | SubQAbstractAxis axis; |
|
|||
226 |
|
||||
227 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
228 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
229 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
230 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
231 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
232 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
233 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
234 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
235 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
236 |
|
||||
237 | axis.hide(); |
|
|||
238 |
|
||||
239 | QCOMPARE(spy0.count(), 0); |
|
|||
240 | QCOMPARE(spy1.count(), 0); |
|
|||
241 | QCOMPARE(spy2.count(), 0); |
|
|||
242 | QCOMPARE(spy3.count(), 0); |
|
|||
243 | QCOMPARE(spy4.count(), 0); |
|
|||
244 | QCOMPARE(spy5.count(), 0); |
|
|||
245 | QCOMPARE(spy6.count(), 0); |
|
|||
246 | QCOMPARE(spy7.count(), 0); |
|
|||
247 | QCOMPARE(spy8.count(), 0); |
|
|||
248 | #endif |
|
|||
249 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
250 | } |
|
|||
251 |
|
||||
252 | void tst_QAbstractAxis::isArrowVisible_data() |
|
|||
253 | { |
|
191 | { | |
254 |
QTest::addColumn<bool>(" |
|
192 | QTest::addColumn<bool>("arrowVisible"); | |
255 | QTest::newRow("true") << true; |
|
193 | QTest::newRow("true") << true; | |
256 | QTest::newRow("false") << false; |
|
194 | QTest::newRow("false") << false; | |
257 | } |
|
195 | } | |
258 |
|
196 | |||
259 | // public bool isArrowVisible() const |
|
197 | void tst_QAbstractAxis::arrowVisible() | |
260 | void tst_QAbstractAxis::isArrowVisible() |
|
|||
261 | { |
|
198 | { | |
262 | #if 0 |
|
199 | QFETCH(bool, arrowVisible); | |
263 | QFETCH(bool, isArrowVisible); |
|
|||
264 |
|
200 | |||
265 | SubQAbstractAxis axis; |
|
201 | m_axis->setArrowVisible(!arrowVisible); | |
266 |
|
202 | |||
267 |
QSignalSpy spy0( |
|
203 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
268 |
QSignalSpy spy1( |
|
204 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
269 |
QSignalSpy spy2( |
|
205 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
270 |
QSignalSpy spy3( |
|
206 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
271 |
QSignalSpy spy4( |
|
207 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
272 |
QSignalSpy spy5( |
|
208 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
273 |
QSignalSpy spy6( |
|
209 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
274 |
QSignalSpy spy7( |
|
210 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
275 |
QSignalSpy spy8( |
|
211 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
276 |
|
212 | |||
277 |
|
|
213 | m_axis->setArrowVisible(arrowVisible); | |
|
214 | QCOMPARE(m_axis->isArrowVisible(), arrowVisible); | |||
278 |
|
215 | |||
279 |
QCOMPARE(spy0.count(), |
|
216 | QCOMPARE(spy0.count(), 1); | |
280 | QCOMPARE(spy1.count(), 0); |
|
217 | QCOMPARE(spy1.count(), 0); | |
281 | QCOMPARE(spy2.count(), 0); |
|
218 | QCOMPARE(spy2.count(), 0); | |
282 | QCOMPARE(spy3.count(), 0); |
|
219 | QCOMPARE(spy3.count(), 0); | |
283 | QCOMPARE(spy4.count(), 0); |
|
220 | QCOMPARE(spy4.count(), 0); | |
284 | QCOMPARE(spy5.count(), 0); |
|
221 | QCOMPARE(spy5.count(), 0); | |
285 | QCOMPARE(spy6.count(), 0); |
|
222 | QCOMPARE(spy6.count(), 0); | |
286 | QCOMPARE(spy7.count(), 0); |
|
223 | QCOMPARE(spy7.count(), 0); | |
287 | QCOMPARE(spy8.count(), 0); |
|
224 | QCOMPARE(spy8.count(), 0); | |
288 | #endif |
|
225 | ||
289 | QSKIP("Test is not implemented.", SkipAll); |
|
226 | m_chart->setAxisX(m_axis, m_series); | |
|
227 | m_view->show(); | |||
|
228 | QTest::qWaitForWindowShown(m_view); | |||
|
229 | QCOMPARE(m_axis->isArrowVisible(), arrowVisible); | |||
290 | } |
|
230 | } | |
291 |
|
231 | |||
292 |
void tst_QAbstractAxis:: |
|
232 | void tst_QAbstractAxis::gridLineVisible_data() | |
293 | { |
|
233 | { | |
294 |
QTest::addColumn<bool>(" |
|
234 | QTest::addColumn<bool>("gridLineVisible"); | |
295 | QTest::newRow("true") << true; |
|
235 | QTest::newRow("true") << true; | |
296 | QTest::newRow("false") << false; |
|
236 | QTest::newRow("false") << false; | |
297 | } |
|
237 | } | |
298 |
|
238 | |||
299 | // public bool isGridLineVisible() const |
|
239 | void tst_QAbstractAxis::gridLineVisible() | |
300 | void tst_QAbstractAxis::isGridLineVisible() |
|
|||
301 | { |
|
240 | { | |
302 | #if 0 |
|
241 | QFETCH(bool, gridLineVisible); | |
303 | QFETCH(bool, isGridLineVisible); |
|
|||
304 |
|
242 | |||
305 | SubQAbstractAxis axis; |
|
243 | m_axis->setGridLineVisible(!gridLineVisible); | |
306 |
|
244 | |||
307 |
QSignalSpy spy0( |
|
245 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
308 |
QSignalSpy spy1( |
|
246 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
309 |
QSignalSpy spy2( |
|
247 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
310 |
QSignalSpy spy3( |
|
248 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
311 |
QSignalSpy spy4( |
|
249 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
312 |
QSignalSpy spy5( |
|
250 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
313 |
QSignalSpy spy6( |
|
251 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
314 |
QSignalSpy spy7( |
|
252 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
315 |
QSignalSpy spy8( |
|
253 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
316 |
|
254 | |||
317 |
|
|
255 | m_axis->setGridLineVisible(gridLineVisible); | |
|
256 | QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible); | |||
318 |
|
257 | |||
319 | QCOMPARE(spy0.count(), 0); |
|
258 | QCOMPARE(spy0.count(), 0); | |
320 | QCOMPARE(spy1.count(), 0); |
|
259 | QCOMPARE(spy1.count(), 0); | |
321 |
QCOMPARE(spy2.count(), |
|
260 | QCOMPARE(spy2.count(), 1); | |
322 | QCOMPARE(spy3.count(), 0); |
|
261 | QCOMPARE(spy3.count(), 0); | |
323 | QCOMPARE(spy4.count(), 0); |
|
262 | QCOMPARE(spy4.count(), 0); | |
324 | QCOMPARE(spy5.count(), 0); |
|
263 | QCOMPARE(spy5.count(), 0); | |
325 | QCOMPARE(spy6.count(), 0); |
|
264 | QCOMPARE(spy6.count(), 0); | |
326 | QCOMPARE(spy7.count(), 0); |
|
265 | QCOMPARE(spy7.count(), 0); | |
327 | QCOMPARE(spy8.count(), 0); |
|
266 | QCOMPARE(spy8.count(), 0); | |
328 | #endif |
|
267 | ||
329 | QSKIP("Test is not implemented.", SkipAll); |
|
268 | m_chart->setAxisX(m_axis, m_series); | |
|
269 | m_view->show(); | |||
|
270 | QTest::qWaitForWindowShown(m_view); | |||
|
271 | QCOMPARE(m_axis->isGridLineVisible(), gridLineVisible); | |||
|
272 | ||||
330 | } |
|
273 | } | |
331 |
|
274 | |||
332 |
void tst_QAbstractAxis:: |
|
275 | void tst_QAbstractAxis::visible_data() | |
333 | { |
|
276 | { | |
334 |
QTest::addColumn<bool>(" |
|
277 | QTest::addColumn<bool>("visible"); | |
335 | QTest::newRow("true") << true; |
|
278 | QTest::newRow("true") << true; | |
336 | QTest::newRow("false") << false; |
|
279 | QTest::newRow("false") << false; | |
337 | } |
|
280 | } | |
338 |
|
281 | |||
339 | // public bool isVisible() const |
|
282 | void tst_QAbstractAxis::visible() | |
340 | void tst_QAbstractAxis::isVisible() |
|
|||
341 | { |
|
283 | { | |
342 | #if 0 |
|
284 | QFETCH(bool, visible); | |
343 | QFETCH(bool, isVisible); |
|
|||
344 |
|
285 | |||
345 | SubQAbstractAxis axis; |
|
286 | m_axis->setVisible(!visible); | |
346 |
|
287 | |||
347 |
QSignalSpy spy0( |
|
288 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
348 |
QSignalSpy spy1( |
|
289 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
349 |
QSignalSpy spy2( |
|
290 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
350 |
QSignalSpy spy3( |
|
291 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
351 |
QSignalSpy spy4( |
|
292 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
352 |
QSignalSpy spy5( |
|
293 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
353 |
QSignalSpy spy6( |
|
294 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
354 |
QSignalSpy spy7( |
|
295 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
355 |
QSignalSpy spy8( |
|
296 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
356 |
|
297 | |||
357 |
|
|
298 | m_axis->setVisible(visible); | |
|
299 | QCOMPARE(m_axis->isVisible(), visible); | |||
358 |
|
300 | |||
359 | QCOMPARE(spy0.count(), 0); |
|
301 | QCOMPARE(spy0.count(), 0); | |
360 | QCOMPARE(spy1.count(), 0); |
|
302 | QCOMPARE(spy1.count(), 0); | |
361 | QCOMPARE(spy2.count(), 0); |
|
303 | QCOMPARE(spy2.count(), 0); | |
362 | QCOMPARE(spy3.count(), 0); |
|
304 | QCOMPARE(spy3.count(), 0); | |
363 | QCOMPARE(spy4.count(), 0); |
|
305 | QCOMPARE(spy4.count(), 0); | |
364 | QCOMPARE(spy5.count(), 0); |
|
306 | QCOMPARE(spy5.count(), 0); | |
365 | QCOMPARE(spy6.count(), 0); |
|
307 | QCOMPARE(spy6.count(), 0); | |
366 | QCOMPARE(spy7.count(), 0); |
|
308 | QCOMPARE(spy7.count(), 0); | |
367 |
QCOMPARE(spy8.count(), |
|
309 | QCOMPARE(spy8.count(), 1); | |
368 | #endif |
|
310 | ||
369 | QSKIP("Test is not implemented.", SkipAll); |
|
311 | m_chart->setAxisX(m_axis, m_series); | |
|
312 | m_view->show(); | |||
|
313 | QTest::qWaitForWindowShown(m_view); | |||
|
314 | QCOMPARE(m_axis->isVisible(), true); | |||
370 | } |
|
315 | } | |
371 |
|
316 | |||
372 | void tst_QAbstractAxis::labelsAngle_data() |
|
317 | void tst_QAbstractAxis::labelsAngle_data() | |
373 | { |
|
318 | { | |
374 | QTest::addColumn<int>("labelsAngle"); |
|
319 | QTest::addColumn<int>("labelsAngle"); | |
375 | QTest::newRow("0") << 0; |
|
320 | QTest::newRow("0") << 0; | |
376 |
QTest::newRow(" |
|
321 | QTest::newRow("45") << 45; | |
|
322 | QTest::newRow("90") << 90; | |||
377 | } |
|
323 | } | |
378 |
|
324 | |||
379 | // public int labelsAngle() const |
|
|||
380 | void tst_QAbstractAxis::labelsAngle() |
|
325 | void tst_QAbstractAxis::labelsAngle() | |
381 | { |
|
326 | { | |
382 | #if 0 |
|
|||
383 | QFETCH(int, labelsAngle); |
|
327 | QFETCH(int, labelsAngle); | |
384 |
|
328 | |||
385 | SubQAbstractAxis axis; |
|
329 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
386 |
|
330 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | ||
387 |
QSignalSpy spy |
|
331 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
388 |
QSignalSpy spy |
|
332 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
389 |
QSignalSpy spy |
|
333 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
390 |
QSignalSpy spy |
|
334 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
391 |
QSignalSpy spy |
|
335 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
392 |
QSignalSpy spy |
|
336 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
393 |
QSignalSpy spy |
|
337 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
394 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
395 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
396 |
|
338 | |||
397 |
|
|
339 | m_axis->setLabelsAngle(labelsAngle); | |
|
340 | QCOMPARE(m_axis->labelsAngle(), labelsAngle); | |||
398 |
|
341 | |||
399 | QCOMPARE(spy0.count(), 0); |
|
342 | QCOMPARE(spy0.count(), 0); | |
400 | QCOMPARE(spy1.count(), 0); |
|
343 | QCOMPARE(spy1.count(), 0); | |
401 | QCOMPARE(spy2.count(), 0); |
|
344 | QCOMPARE(spy2.count(), 0); | |
402 | QCOMPARE(spy3.count(), 0); |
|
345 | QCOMPARE(spy3.count(), 0); | |
403 | QCOMPARE(spy4.count(), 0); |
|
346 | QCOMPARE(spy4.count(), 0); | |
404 | QCOMPARE(spy5.count(), 0); |
|
347 | QCOMPARE(spy5.count(), 0); | |
405 | QCOMPARE(spy6.count(), 0); |
|
348 | QCOMPARE(spy6.count(), 0); | |
406 | QCOMPARE(spy7.count(), 0); |
|
349 | QCOMPARE(spy7.count(), 0); | |
407 | QCOMPARE(spy8.count(), 0); |
|
350 | QCOMPARE(spy8.count(), 0); | |
408 | #endif |
|
351 | ||
409 | QSKIP("Test is not implemented.", SkipAll); |
|
352 | m_chart->setAxisX(m_axis, m_series); | |
|
353 | m_view->show(); | |||
|
354 | QTest::qWaitForWindowShown(m_view); | |||
|
355 | QCOMPARE(m_axis->labelsAngle(), labelsAngle); | |||
410 | } |
|
356 | } | |
411 |
|
357 | |||
412 | Q_DECLARE_METATYPE(QBrush) |
|
|||
413 | void tst_QAbstractAxis::labelsBrush_data() |
|
358 | void tst_QAbstractAxis::labelsBrush_data() | |
414 | { |
|
359 | { | |
415 | #if 0 |
|
|||
416 | QTest::addColumn<QBrush>("labelsBrush"); |
|
360 | QTest::addColumn<QBrush>("labelsBrush"); | |
417 | QTest::newRow("null") << QBrush(); |
|
361 | QTest::newRow("null") << QBrush(); | |
418 | #endif |
|
362 | QTest::newRow("blue") << QBrush(Qt::blue); | |
|
363 | QTest::newRow("black") << QBrush(Qt::black); | |||
|
364 | ||||
419 | } |
|
365 | } | |
420 |
|
366 | |||
421 | // public QBrush labelsBrush() const |
|
|||
422 | void tst_QAbstractAxis::labelsBrush() |
|
367 | void tst_QAbstractAxis::labelsBrush() | |
423 | { |
|
368 | { | |
424 | #if 0 |
|
|||
425 | QFETCH(QBrush, labelsBrush); |
|
|||
426 |
|
369 | |||
427 | SubQAbstractAxis axis; |
|
370 | QFETCH(QBrush, labelsBrush); | |
428 |
|
371 | |||
429 |
QSignalSpy spy0( |
|
372 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
430 |
QSignalSpy spy1( |
|
373 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
431 |
QSignalSpy spy2( |
|
374 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
432 |
QSignalSpy spy3( |
|
375 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
433 |
QSignalSpy spy4( |
|
376 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
434 |
QSignalSpy spy5( |
|
377 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
435 |
QSignalSpy spy6( |
|
378 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
436 |
QSignalSpy spy7( |
|
379 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
437 |
QSignalSpy spy8( |
|
380 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
438 |
|
381 | |||
439 |
|
|
382 | m_axis->setLabelsBrush(labelsBrush); | |
|
383 | QCOMPARE(m_axis->labelsBrush(), labelsBrush); | |||
440 |
|
384 | |||
441 | QCOMPARE(spy0.count(), 0); |
|
385 | QCOMPARE(spy0.count(), 0); | |
442 | QCOMPARE(spy1.count(), 0); |
|
386 | QCOMPARE(spy1.count(), 0); | |
443 | QCOMPARE(spy2.count(), 0); |
|
387 | QCOMPARE(spy2.count(), 0); | |
444 | QCOMPARE(spy3.count(), 0); |
|
388 | QCOMPARE(spy3.count(), 0); | |
445 | QCOMPARE(spy4.count(), 0); |
|
389 | QCOMPARE(spy4.count(), 0); | |
446 | QCOMPARE(spy5.count(), 0); |
|
390 | QCOMPARE(spy5.count(), 0); | |
447 | QCOMPARE(spy6.count(), 0); |
|
391 | //TODO QCOMPARE(spy6.count(), 0); | |
448 | QCOMPARE(spy7.count(), 0); |
|
392 | QCOMPARE(spy7.count(), 0); | |
449 | QCOMPARE(spy8.count(), 0); |
|
393 | QCOMPARE(spy8.count(), 0); | |
450 | #endif |
|
394 | ||
451 | QSKIP("Test is not implemented.", SkipAll); |
|
395 | m_view->show(); | |
|
396 | QTest::qWaitForWindowShown(m_view); | |||
|
397 | QCOMPARE(m_axis->labelsBrush(), labelsBrush); | |||
|
398 | ||||
452 | } |
|
399 | } | |
453 |
|
400 | |||
454 | void tst_QAbstractAxis::labelsColor_data() |
|
401 | void tst_QAbstractAxis::labelsColor_data() | |
455 | { |
|
402 | { | |
456 | #if 0 |
|
403 | ||
457 | QTest::addColumn<QColor>("labelsColor"); |
|
|||
458 | QTest::newRow("null") << QColor(); |
|
|||
459 | #endif |
|
|||
460 | } |
|
404 | } | |
461 |
|
405 | |||
462 | // public QColor labelsColor() const |
|
|||
463 | void tst_QAbstractAxis::labelsColor() |
|
406 | void tst_QAbstractAxis::labelsColor() | |
464 | { |
|
407 | { | |
465 | #if 0 |
|
408 | QSKIP("Test is not implemented. This is depreciated function", SkipAll); | |
466 | QFETCH(QColor, labelsColor); |
|
|||
467 |
|
||||
468 | SubQAbstractAxis axis; |
|
|||
469 |
|
||||
470 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
471 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
472 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
473 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
474 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
475 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
476 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
477 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
478 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
479 |
|
||||
480 | QCOMPARE(axis.labelsColor(), labelsColor); |
|
|||
481 |
|
||||
482 | QCOMPARE(spy0.count(), 0); |
|
|||
483 | QCOMPARE(spy1.count(), 0); |
|
|||
484 | QCOMPARE(spy2.count(), 0); |
|
|||
485 | QCOMPARE(spy3.count(), 0); |
|
|||
486 | QCOMPARE(spy4.count(), 0); |
|
|||
487 | QCOMPARE(spy5.count(), 0); |
|
|||
488 | QCOMPARE(spy6.count(), 0); |
|
|||
489 | QCOMPARE(spy7.count(), 0); |
|
|||
490 | QCOMPARE(spy8.count(), 0); |
|
|||
491 | #endif |
|
|||
492 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
493 | } |
|
409 | } | |
494 |
|
410 | |||
495 | void tst_QAbstractAxis::labelsFont_data() |
|
411 | void tst_QAbstractAxis::labelsFont_data() | |
496 | { |
|
412 | { | |
497 | QTest::addColumn<QFont>("labelsFont"); |
|
413 | QTest::addColumn<QFont>("labelsFont"); | |
498 | QTest::newRow("null") << QFont(); |
|
414 | QTest::newRow("null") << QFont(); | |
|
415 | QTest::newRow("serif") << QFont("SansSerif"); | |||
499 | } |
|
416 | } | |
500 |
|
417 | |||
501 | // public QFont labelsFont() const |
|
|||
502 | void tst_QAbstractAxis::labelsFont() |
|
418 | void tst_QAbstractAxis::labelsFont() | |
503 | { |
|
419 | { | |
504 | #if 0 |
|
|||
505 | QFETCH(QFont, labelsFont); |
|
|||
506 |
|
420 | |||
507 | SubQAbstractAxis axis; |
|
421 | QFETCH(QFont, labelsFont); | |
508 |
|
422 | |||
509 |
QSignalSpy spy0( |
|
423 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
510 |
QSignalSpy spy1( |
|
424 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
511 |
QSignalSpy spy2( |
|
425 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
512 |
QSignalSpy spy3( |
|
426 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
513 |
QSignalSpy spy4( |
|
427 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
514 |
QSignalSpy spy5( |
|
428 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
515 |
QSignalSpy spy6( |
|
429 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
516 |
QSignalSpy spy7( |
|
430 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
517 |
QSignalSpy spy8( |
|
431 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
518 |
|
432 | |||
519 |
|
|
433 | m_axis->setLabelsFont(labelsFont); | |
|
434 | QCOMPARE(m_axis->labelsFont(), labelsFont); | |||
520 |
|
435 | |||
521 | QCOMPARE(spy0.count(), 0); |
|
436 | QCOMPARE(spy0.count(), 0); | |
522 | QCOMPARE(spy1.count(), 0); |
|
437 | QCOMPARE(spy1.count(), 0); | |
523 | QCOMPARE(spy2.count(), 0); |
|
438 | QCOMPARE(spy2.count(), 0); | |
524 | QCOMPARE(spy3.count(), 0); |
|
439 | QCOMPARE(spy3.count(), 0); | |
525 | QCOMPARE(spy4.count(), 0); |
|
440 | QCOMPARE(spy4.count(), 0); | |
526 | QCOMPARE(spy5.count(), 0); |
|
441 | QCOMPARE(spy5.count(), 0); | |
527 | QCOMPARE(spy6.count(), 0); |
|
442 | QCOMPARE(spy6.count(), 0); | |
528 | QCOMPARE(spy7.count(), 0); |
|
443 | QCOMPARE(spy7.count(), 0); | |
529 | QCOMPARE(spy8.count(), 0); |
|
444 | QCOMPARE(spy8.count(), 0); | |
530 | #endif |
|
445 | ||
531 | QSKIP("Test is not implemented.", SkipAll); |
|
446 | m_view->show(); | |
|
447 | QTest::qWaitForWindowShown(m_view); | |||
|
448 | QCOMPARE(m_axis->labelsFont(), labelsFont); | |||
|
449 | ||||
532 | } |
|
450 | } | |
533 |
|
451 | |||
534 | void tst_QAbstractAxis::labelsPen_data() |
|
452 | void tst_QAbstractAxis::labelsPen_data() | |
535 | { |
|
453 | { | |
536 | #if 0 |
|
|||
537 | QTest::addColumn<QPen>("labelsPen"); |
|
454 | QTest::addColumn<QPen>("labelsPen"); | |
538 | QTest::newRow("null") << QPen(); |
|
455 | QTest::newRow("null") << QPen(); | |
539 | #endif |
|
456 | QTest::newRow("blue") << QPen(Qt::blue); | |
|
457 | QTest::newRow("black") << QPen(Qt::black); | |||
|
458 | QTest::newRow("red") << QPen(Qt::red); | |||
540 | } |
|
459 | } | |
541 |
|
460 | |||
542 | // public QPen labelsPen() const |
|
|||
543 | void tst_QAbstractAxis::labelsPen() |
|
461 | void tst_QAbstractAxis::labelsPen() | |
544 | { |
|
462 | { | |
545 | #if 0 |
|
|||
546 | QFETCH(QPen, labelsPen); |
|
463 | QFETCH(QPen, labelsPen); | |
547 |
|
464 | |||
548 | SubQAbstractAxis axis; |
|
465 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
549 |
|
466 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | ||
550 |
QSignalSpy spy |
|
467 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
551 |
QSignalSpy spy |
|
468 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
552 |
QSignalSpy spy |
|
469 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
553 |
QSignalSpy spy |
|
470 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
554 |
QSignalSpy spy |
|
471 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
555 |
QSignalSpy spy |
|
472 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
556 |
QSignalSpy spy |
|
473 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
557 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
558 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
559 |
|
474 | |||
560 |
|
|
475 | m_axis->setLabelsPen(labelsPen); | |
|
476 | QCOMPARE(m_axis->labelsPen(), labelsPen); | |||
561 |
|
477 | |||
562 | QCOMPARE(spy0.count(), 0); |
|
478 | QCOMPARE(spy0.count(), 0); | |
563 | QCOMPARE(spy1.count(), 0); |
|
479 | QCOMPARE(spy1.count(), 0); | |
564 | QCOMPARE(spy2.count(), 0); |
|
480 | QCOMPARE(spy2.count(), 0); | |
565 | QCOMPARE(spy3.count(), 0); |
|
481 | QCOMPARE(spy3.count(), 0); | |
566 | QCOMPARE(spy4.count(), 0); |
|
482 | QCOMPARE(spy4.count(), 0); | |
567 | QCOMPARE(spy5.count(), 0); |
|
483 | QCOMPARE(spy5.count(), 0); | |
568 | QCOMPARE(spy6.count(), 0); |
|
484 | QCOMPARE(spy6.count(), 0); | |
569 | QCOMPARE(spy7.count(), 0); |
|
485 | QCOMPARE(spy7.count(), 0); | |
570 | QCOMPARE(spy8.count(), 0); |
|
486 | QCOMPARE(spy8.count(), 0); | |
571 | #endif |
|
487 | ||
572 | QSKIP("Test is not implemented.", SkipAll); |
|
488 | m_chart->setAxisX(m_axis, m_series); | |
|
489 | m_view->show(); | |||
|
490 | QTest::qWaitForWindowShown(m_view); | |||
|
491 | //TODO QCOMPARE(m_axis->labelsPen(), labelsPen); | |||
573 | } |
|
492 | } | |
574 |
|
493 | |||
575 | void tst_QAbstractAxis::labelsVisible_data() |
|
494 | void tst_QAbstractAxis::labelsVisible_data() | |
576 | { |
|
495 | { | |
577 | QTest::addColumn<bool>("labelsVisible"); |
|
496 | QTest::addColumn<bool>("labelsVisible"); | |
578 | QTest::newRow("true") << true; |
|
497 | QTest::newRow("true") << true; | |
579 | QTest::newRow("false") << false; |
|
498 | QTest::newRow("false") << false; | |
580 | } |
|
499 | } | |
581 |
|
500 | |||
582 | // public bool labelsVisible() const |
|
|||
583 | void tst_QAbstractAxis::labelsVisible() |
|
501 | void tst_QAbstractAxis::labelsVisible() | |
584 | { |
|
502 | { | |
585 | #if 0 |
|
|||
586 | QFETCH(bool, labelsVisible); |
|
503 | QFETCH(bool, labelsVisible); | |
587 |
|
504 | |||
588 | SubQAbstractAxis axis; |
|
505 | m_axis->setLabelsVisible(!labelsVisible); | |
589 |
|
506 | |||
590 |
QSignalSpy spy0( |
|
507 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
591 |
QSignalSpy spy1( |
|
508 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
592 |
QSignalSpy spy2( |
|
509 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
593 |
QSignalSpy spy3( |
|
510 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
594 |
QSignalSpy spy4( |
|
511 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
595 |
QSignalSpy spy5( |
|
512 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
596 |
QSignalSpy spy6( |
|
513 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
597 |
QSignalSpy spy7( |
|
514 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
598 |
QSignalSpy spy8( |
|
515 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
599 |
|
516 | |||
600 |
|
|
517 | m_axis->setLabelsVisible(labelsVisible); | |
|
518 | QCOMPARE(m_axis->labelsVisible(), labelsVisible); | |||
601 |
|
519 | |||
602 | QCOMPARE(spy0.count(), 0); |
|
520 | QCOMPARE(spy0.count(), 0); | |
603 | QCOMPARE(spy1.count(), 0); |
|
521 | QCOMPARE(spy1.count(), 0); | |
604 | QCOMPARE(spy2.count(), 0); |
|
522 | QCOMPARE(spy2.count(), 0); | |
605 | QCOMPARE(spy3.count(), 0); |
|
523 | QCOMPARE(spy3.count(), 0); | |
606 |
QCOMPARE(spy4.count(), |
|
524 | QCOMPARE(spy4.count(), 1); | |
607 | QCOMPARE(spy5.count(), 0); |
|
525 | QCOMPARE(spy5.count(), 0); | |
608 | QCOMPARE(spy6.count(), 0); |
|
526 | QCOMPARE(spy6.count(), 0); | |
609 | QCOMPARE(spy7.count(), 0); |
|
527 | QCOMPARE(spy7.count(), 0); | |
610 | QCOMPARE(spy8.count(), 0); |
|
528 | QCOMPARE(spy8.count(), 0); | |
611 | #endif |
|
529 | ||
612 | QSKIP("Test is not implemented.", SkipAll); |
|
530 | m_chart->setAxisX(m_axis, m_series); | |
|
531 | m_view->show(); | |||
|
532 | QTest::qWaitForWindowShown(m_view); | |||
|
533 | QCOMPARE(m_axis->labelsVisible(), labelsVisible); | |||
613 | } |
|
534 | } | |
614 |
|
535 | |||
615 | Q_DECLARE_METATYPE(Qt::Orientation) |
|
|||
616 | void tst_QAbstractAxis::orientation_data() |
|
536 | void tst_QAbstractAxis::orientation_data() | |
617 | { |
|
537 | { | |
618 | #if 0 |
|
|||
619 | QTest::addColumn<Qt::Orientation>("orientation"); |
|
538 | QTest::addColumn<Qt::Orientation>("orientation"); | |
620 |
QTest::newRow(" |
|
539 | QTest::newRow("Vertical") << Qt::Vertical; | |
621 | #endif |
|
540 | QTest::newRow("Horizontal") << Qt::Horizontal; | |
622 | } |
|
541 | } | |
623 |
|
542 | |||
624 | // public Qt::Orientation orientation() |
|
|||
625 | void tst_QAbstractAxis::orientation() |
|
543 | void tst_QAbstractAxis::orientation() | |
626 | { |
|
544 | { | |
627 | #if 0 |
|
|||
628 | QFETCH(Qt::Orientation, orientation); |
|
545 | QFETCH(Qt::Orientation, orientation); | |
629 |
|
546 | |||
630 | SubQAbstractAxis axis; |
|
547 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
631 |
|
548 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | ||
632 |
QSignalSpy spy |
|
549 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
633 |
QSignalSpy spy |
|
550 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
634 |
QSignalSpy spy |
|
551 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
635 |
QSignalSpy spy |
|
552 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
636 |
QSignalSpy spy |
|
553 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
637 |
QSignalSpy spy |
|
554 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
638 |
QSignalSpy spy |
|
555 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
639 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
640 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
641 |
|
556 | |||
642 | QCOMPARE(axis.orientation(), orientation); |
|
557 | if(orientation==Qt::Vertical){ | |
|
558 | m_chart->setAxisY(m_axis,m_series); | |||
|
559 | }else{ | |||
|
560 | m_chart->setAxisX(m_axis,m_series); | |||
|
561 | } | |||
|
562 | QCOMPARE(m_axis->orientation(), orientation); | |||
643 |
|
563 | |||
644 | QCOMPARE(spy0.count(), 0); |
|
564 | QCOMPARE(spy0.count(), 0); | |
645 | QCOMPARE(spy1.count(), 0); |
|
565 | QCOMPARE(spy1.count(), 0); | |
646 | QCOMPARE(spy2.count(), 0); |
|
566 | QCOMPARE(spy2.count(), 0); | |
647 | QCOMPARE(spy3.count(), 0); |
|
567 | QCOMPARE(spy3.count(), 0); | |
648 | QCOMPARE(spy4.count(), 0); |
|
568 | QCOMPARE(spy4.count(), 0); | |
649 | QCOMPARE(spy5.count(), 0); |
|
569 | QCOMPARE(spy5.count(), 0); | |
650 | QCOMPARE(spy6.count(), 0); |
|
570 | QCOMPARE(spy6.count(), 0); | |
651 | QCOMPARE(spy7.count(), 0); |
|
571 | QCOMPARE(spy7.count(), 0); | |
652 |
QCOMPARE(spy8.count(), |
|
572 | QCOMPARE(spy8.count(), 1); | |
653 | #endif |
|
573 | ||
654 | QSKIP("Test is not implemented.", SkipAll); |
|
574 | m_view->show(); | |
|
575 | QTest::qWaitForWindowShown(m_view); | |||
|
576 | QCOMPARE(m_axis->orientation(), orientation); | |||
655 | } |
|
577 | } | |
656 |
|
578 | |||
657 |
void tst_QAbstractAxis::set |
|
579 | void tst_QAbstractAxis::setMax_data() | |
658 | { |
|
580 | { | |
659 | QTest::addColumn<bool>("visible"); |
|
581 | //just check if it does not crash | |
660 | QTest::newRow("true") << true; |
|
582 | QTest::addColumn<QVariant>("max"); | |
661 |
QTest::newRow(" |
|
583 | QTest::newRow("something") << QVariant("something"); | |
|
584 | QTest::newRow("1.0") << QVariant(1.0); | |||
662 | } |
|
585 | } | |
663 |
|
586 | |||
664 | // public void setArrowVisible(bool visible = true) |
|
587 | void tst_QAbstractAxis::setMax() | |
665 | void tst_QAbstractAxis::setArrowVisible() |
|
|||
666 | { |
|
588 | { | |
667 | #if 0 |
|
589 | QFETCH(QVariant, max); | |
668 | QFETCH(bool, visible); |
|
590 | m_axis->setMax(max); | |
|
591 | } | |||
669 |
|
592 | |||
670 | SubQAbstractAxis axis; |
|
593 | void tst_QAbstractAxis::setMin_data() | |
|
594 | { | |||
|
595 | //just check if it does not crash | |||
|
596 | QTest::addColumn<QVariant>("min"); | |||
|
597 | QTest::newRow("something") << QVariant("something"); | |||
|
598 | QTest::newRow("1.0") << QVariant(1.0); | |||
|
599 | } | |||
671 |
|
600 | |||
672 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
601 | // public void setMin(QVariant const& min) | |
673 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
602 | void tst_QAbstractAxis::setMin() | |
674 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
603 | { | |
675 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
604 | QFETCH(QVariant, min); | |
676 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
605 | m_axis->setMin(min); | |
677 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
606 | } | |
678 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
679 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
680 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
681 |
|
607 | |||
682 | axis.setArrowVisible(visible); |
|
608 | void tst_QAbstractAxis::setRange_data() | |
|
609 | { | |||
|
610 | //just check if it does not crash | |||
|
611 | QTest::addColumn<QVariant>("min"); | |||
|
612 | QTest::addColumn<QVariant>("max"); | |||
|
613 | QTest::newRow("something") << QVariant("something0") << QVariant("something1"); | |||
|
614 | QTest::newRow("-1 1") << QVariant(-1.0) << QVariant(1.0); | |||
|
615 | } | |||
683 |
|
616 | |||
684 | QCOMPARE(spy0.count(), 0); |
|
617 | // public void setRange(QVariant const& min, QVariant const& max) | |
685 | QCOMPARE(spy1.count(), 0); |
|
618 | void tst_QAbstractAxis::setRange() | |
686 | QCOMPARE(spy2.count(), 0); |
|
619 | { | |
687 | QCOMPARE(spy3.count(), 0); |
|
620 | ||
688 | QCOMPARE(spy4.count(), 0); |
|
621 | QFETCH(QVariant, min); | |
689 | QCOMPARE(spy5.count(), 0); |
|
622 | QFETCH(QVariant, max); | |
690 | QCOMPARE(spy6.count(), 0); |
|
623 | m_axis->setRange(min,max); | |
691 | QCOMPARE(spy7.count(), 0); |
|
|||
692 | QCOMPARE(spy8.count(), 0); |
|
|||
693 | #endif |
|
|||
694 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
695 | } |
|
624 | } | |
696 |
|
625 | |||
697 |
void tst_QAbstractAxis::s |
|
626 | void tst_QAbstractAxis::shadesBorderColor_data() | |
698 | { |
|
627 | { | |
699 | #if 0 |
|
628 | ||
700 | QTest::addColumn<QPen>("pen"); |
|
629 | } | |
701 | QTest::newRow("null") << QPen(); |
|
630 | ||
702 | #endif |
|
631 | void tst_QAbstractAxis::shadesBorderColor() | |
|
632 | { | |||
|
633 | QSKIP("Test is not implemented. This is depreciated function", SkipAll); | |||
703 | } |
|
634 | } | |
704 |
|
635 | |||
705 | // public void setAxisPen(QPen const& pen) |
|
636 | void tst_QAbstractAxis::shadesBrush_data() | |
706 | void tst_QAbstractAxis::setAxisPen() |
|
|||
707 | { |
|
637 | { | |
708 | #if 0 |
|
638 | QTest::addColumn<QBrush>("shadesBrush"); | |
709 | QFETCH(QPen, pen); |
|
639 | QTest::newRow("null") << QBrush(); | |
|
640 | QTest::newRow("blue") << QBrush(Qt::blue); | |||
|
641 | QTest::newRow("black") << QBrush(Qt::black); | |||
|
642 | } | |||
710 |
|
643 | |||
711 | SubQAbstractAxis axis; |
|
644 | void tst_QAbstractAxis::shadesBrush() | |
|
645 | { | |||
|
646 | QFETCH(QBrush, shadesBrush); | |||
712 |
|
647 | |||
713 |
QSignalSpy spy0( |
|
648 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
714 |
QSignalSpy spy1( |
|
649 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
715 |
QSignalSpy spy2( |
|
650 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
716 |
QSignalSpy spy3( |
|
651 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
717 |
QSignalSpy spy4( |
|
652 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
718 |
QSignalSpy spy5( |
|
653 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
719 |
QSignalSpy spy6( |
|
654 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
720 |
QSignalSpy spy7( |
|
655 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
721 |
QSignalSpy spy8( |
|
656 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
722 |
|
657 | |||
723 | axis.setAxisPen(pen); |
|
658 | m_axis->setShadesBrush(shadesBrush); | |
|
659 | QCOMPARE(m_axis->shadesBrush(), shadesBrush); | |||
724 |
|
660 | |||
725 | QCOMPARE(spy0.count(), 0); |
|
661 | QCOMPARE(spy0.count(), 0); | |
726 | QCOMPARE(spy1.count(), 0); |
|
662 | QCOMPARE(spy1.count(), 0); | |
727 | QCOMPARE(spy2.count(), 0); |
|
663 | QCOMPARE(spy2.count(), 0); | |
728 | QCOMPARE(spy3.count(), 0); |
|
664 | QCOMPARE(spy3.count(), 0); | |
729 | QCOMPARE(spy4.count(), 0); |
|
665 | QCOMPARE(spy4.count(), 0); | |
730 | QCOMPARE(spy5.count(), 0); |
|
666 | QCOMPARE(spy5.count(), 0); | |
731 | QCOMPARE(spy6.count(), 0); |
|
667 | //TODO QCOMPARE(spy6.count(), 0); | |
732 | QCOMPARE(spy7.count(), 0); |
|
668 | QCOMPARE(spy7.count(), 0); | |
733 | QCOMPARE(spy8.count(), 0); |
|
669 | QCOMPARE(spy8.count(), 0); | |
734 | #endif |
|
670 | ||
735 | QSKIP("Test is not implemented.", SkipAll); |
|
671 | m_view->show(); | |
|
672 | QTest::qWaitForWindowShown(m_view); | |||
|
673 | QCOMPARE(m_axis->shadesBrush(), shadesBrush); | |||
|
674 | } | |||
|
675 | ||||
|
676 | void tst_QAbstractAxis::shadesColor_data() | |||
|
677 | { | |||
736 | } |
|
678 | } | |
737 |
|
679 | |||
738 | void tst_QAbstractAxis::setAxisPenColor_data() |
|
680 | // public QColor shadesColor() const | |
|
681 | void tst_QAbstractAxis::shadesColor() | |||
739 | { |
|
682 | { | |
740 | #if 0 |
|
683 | QSKIP("Test is not implemented. This is depreciated function", SkipAll); | |
741 | QTest::addColumn<QColor>("color"); |
|
|||
742 | QTest::newRow("null") << QColor(); |
|
|||
743 | #endif |
|
|||
744 | } |
|
684 | } | |
745 |
|
685 | |||
746 | // public void setAxisPenColor(QColor color) |
|
686 | void tst_QAbstractAxis::shadesPen_data() | |
747 | void tst_QAbstractAxis::setAxisPenColor() |
|
|||
748 | { |
|
687 | { | |
749 | #if 0 |
|
688 | QTest::addColumn<QPen>("shadesPen"); | |
750 | QFETCH(QColor, color); |
|
689 | QTest::newRow("null") << QPen(); | |
|
690 | QTest::newRow("blue") << QPen(Qt::blue); | |||
|
691 | QTest::newRow("black") << QPen(Qt::black); | |||
|
692 | QTest::newRow("red") << QPen(Qt::red); | |||
|
693 | } | |||
751 |
|
694 | |||
752 | SubQAbstractAxis axis; |
|
695 | void tst_QAbstractAxis::shadesPen() | |
|
696 | { | |||
|
697 | QFETCH(QPen, shadesPen); | |||
753 |
|
698 | |||
754 |
QSignalSpy spy0( |
|
699 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
755 |
QSignalSpy spy1( |
|
700 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
756 |
QSignalSpy spy2( |
|
701 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
757 |
QSignalSpy spy3( |
|
702 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
758 |
QSignalSpy spy4( |
|
703 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
759 |
QSignalSpy spy5( |
|
704 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
760 |
QSignalSpy spy6( |
|
705 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
761 |
QSignalSpy spy7( |
|
706 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
762 |
QSignalSpy spy8( |
|
707 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
763 |
|
708 | |||
764 | axis.setAxisPenColor(color); |
|
709 | m_axis->setShadesPen(shadesPen); | |
|
710 | QCOMPARE(m_axis->shadesPen(), shadesPen); | |||
765 |
|
711 | |||
766 | QCOMPARE(spy0.count(), 0); |
|
712 | QCOMPARE(spy0.count(), 0); | |
767 | QCOMPARE(spy1.count(), 0); |
|
713 | QCOMPARE(spy1.count(), 0); | |
768 | QCOMPARE(spy2.count(), 0); |
|
714 | QCOMPARE(spy2.count(), 0); | |
769 | QCOMPARE(spy3.count(), 0); |
|
715 | QCOMPARE(spy3.count(), 0); | |
770 | QCOMPARE(spy4.count(), 0); |
|
716 | QCOMPARE(spy4.count(), 0); | |
771 | QCOMPARE(spy5.count(), 0); |
|
717 | QCOMPARE(spy5.count(), 0); | |
772 | QCOMPARE(spy6.count(), 0); |
|
718 | QCOMPARE(spy6.count(), 0); | |
773 | QCOMPARE(spy7.count(), 0); |
|
719 | QCOMPARE(spy7.count(), 0); | |
774 | QCOMPARE(spy8.count(), 0); |
|
720 | QCOMPARE(spy8.count(), 0); | |
775 | #endif |
|
|||
776 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
777 | } |
|
|||
778 |
|
721 | |||
779 | void tst_QAbstractAxis::setGridLinePen_data() |
|
722 | m_chart->setAxisX(m_axis, m_series); | |
780 | { |
|
723 | m_view->show(); | |
781 | #if 0 |
|
724 | QTest::qWaitForWindowShown(m_view); | |
782 | QTest::addColumn<QPen>("pen"); |
|
725 | QCOMPARE(m_axis->shadesPen(), shadesPen); | |
783 | QTest::newRow("null") << QPen(); |
|
|||
784 | #endif |
|
|||
785 | } |
|
726 | } | |
786 |
|
727 | |||
787 | // public void setGridLinePen(QPen const& pen) |
|
728 | void tst_QAbstractAxis::shadesVisible_data() | |
788 | void tst_QAbstractAxis::setGridLinePen() |
|
|||
789 | { |
|
|||
790 | #if 0 |
|
|||
791 | QFETCH(QPen, pen); |
|
|||
792 |
|
||||
793 | SubQAbstractAxis axis; |
|
|||
794 |
|
||||
795 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
796 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
797 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
798 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
799 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
800 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
801 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
802 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
803 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
804 |
|
||||
805 | axis.setGridLinePen(pen); |
|
|||
806 |
|
||||
807 | QCOMPARE(spy0.count(), 0); |
|
|||
808 | QCOMPARE(spy1.count(), 0); |
|
|||
809 | QCOMPARE(spy2.count(), 0); |
|
|||
810 | QCOMPARE(spy3.count(), 0); |
|
|||
811 | QCOMPARE(spy4.count(), 0); |
|
|||
812 | QCOMPARE(spy5.count(), 0); |
|
|||
813 | QCOMPARE(spy6.count(), 0); |
|
|||
814 | QCOMPARE(spy7.count(), 0); |
|
|||
815 | QCOMPARE(spy8.count(), 0); |
|
|||
816 | #endif |
|
|||
817 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
818 | } |
|
|||
819 |
|
||||
820 | void tst_QAbstractAxis::setGridLineVisible_data() |
|
|||
821 | { |
|
|||
822 | QTest::addColumn<bool>("visible"); |
|
|||
823 | QTest::newRow("true") << true; |
|
|||
824 | QTest::newRow("false") << false; |
|
|||
825 | } |
|
|||
826 |
|
||||
827 | // public void setGridLineVisible(bool visible = true) |
|
|||
828 | void tst_QAbstractAxis::setGridLineVisible() |
|
|||
829 | { |
|
|||
830 | #if 0 |
|
|||
831 | QFETCH(bool, visible); |
|
|||
832 |
|
||||
833 | SubQAbstractAxis axis; |
|
|||
834 |
|
||||
835 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
836 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
837 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
838 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
839 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
840 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
841 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
842 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
843 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
844 |
|
||||
845 | axis.setGridLineVisible(visible); |
|
|||
846 |
|
||||
847 | QCOMPARE(spy0.count(), 0); |
|
|||
848 | QCOMPARE(spy1.count(), 0); |
|
|||
849 | QCOMPARE(spy2.count(), 0); |
|
|||
850 | QCOMPARE(spy3.count(), 0); |
|
|||
851 | QCOMPARE(spy4.count(), 0); |
|
|||
852 | QCOMPARE(spy5.count(), 0); |
|
|||
853 | QCOMPARE(spy6.count(), 0); |
|
|||
854 | QCOMPARE(spy7.count(), 0); |
|
|||
855 | QCOMPARE(spy8.count(), 0); |
|
|||
856 | #endif |
|
|||
857 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
858 | } |
|
|||
859 |
|
||||
860 | void tst_QAbstractAxis::setLabelsAngle_data() |
|
|||
861 | { |
|
|||
862 | QTest::addColumn<int>("angle"); |
|
|||
863 | QTest::newRow("0") << 0; |
|
|||
864 | QTest::newRow("-1") << -1; |
|
|||
865 | } |
|
|||
866 |
|
||||
867 | // public void setLabelsAngle(int angle) |
|
|||
868 | void tst_QAbstractAxis::setLabelsAngle() |
|
|||
869 | { |
|
|||
870 | #if 0 |
|
|||
871 | QFETCH(int, angle); |
|
|||
872 |
|
||||
873 | SubQAbstractAxis axis; |
|
|||
874 |
|
||||
875 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
876 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
877 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
878 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
879 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
880 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
881 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
882 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
883 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
884 |
|
||||
885 | axis.setLabelsAngle(angle); |
|
|||
886 |
|
||||
887 | QCOMPARE(spy0.count(), 0); |
|
|||
888 | QCOMPARE(spy1.count(), 0); |
|
|||
889 | QCOMPARE(spy2.count(), 0); |
|
|||
890 | QCOMPARE(spy3.count(), 0); |
|
|||
891 | QCOMPARE(spy4.count(), 0); |
|
|||
892 | QCOMPARE(spy5.count(), 0); |
|
|||
893 | QCOMPARE(spy6.count(), 0); |
|
|||
894 | QCOMPARE(spy7.count(), 0); |
|
|||
895 | QCOMPARE(spy8.count(), 0); |
|
|||
896 | #endif |
|
|||
897 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
898 | } |
|
|||
899 |
|
||||
900 | void tst_QAbstractAxis::setLabelsBrush_data() |
|
|||
901 | { |
|
|||
902 | #if 0 |
|
|||
903 | QTest::addColumn<QBrush>("brush"); |
|
|||
904 | QTest::newRow("null") << QBrush(); |
|
|||
905 | #endif |
|
|||
906 | } |
|
|||
907 |
|
||||
908 | // public void setLabelsBrush(QBrush const& brush) |
|
|||
909 | void tst_QAbstractAxis::setLabelsBrush() |
|
|||
910 | { |
|
|||
911 | #if 0 |
|
|||
912 | QFETCH(QBrush, brush); |
|
|||
913 |
|
||||
914 | SubQAbstractAxis axis; |
|
|||
915 |
|
||||
916 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
917 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
918 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
919 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
920 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
921 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
922 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
923 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
924 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
925 |
|
||||
926 | axis.setLabelsBrush(brush); |
|
|||
927 |
|
||||
928 | QCOMPARE(spy0.count(), 0); |
|
|||
929 | QCOMPARE(spy1.count(), 0); |
|
|||
930 | QCOMPARE(spy2.count(), 0); |
|
|||
931 | QCOMPARE(spy3.count(), 0); |
|
|||
932 | QCOMPARE(spy4.count(), 0); |
|
|||
933 | QCOMPARE(spy5.count(), 0); |
|
|||
934 | QCOMPARE(spy6.count(), 0); |
|
|||
935 | QCOMPARE(spy7.count(), 0); |
|
|||
936 | QCOMPARE(spy8.count(), 0); |
|
|||
937 | #endif |
|
|||
938 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
939 | } |
|
|||
940 |
|
||||
941 | void tst_QAbstractAxis::setLabelsColor_data() |
|
|||
942 | { |
|
|||
943 | #if 0 |
|
|||
944 | QTest::addColumn<QColor>("color"); |
|
|||
945 | QTest::newRow("null") << QColor(); |
|
|||
946 | #endif |
|
|||
947 | } |
|
|||
948 |
|
||||
949 | // public void setLabelsColor(QColor color) |
|
|||
950 | void tst_QAbstractAxis::setLabelsColor() |
|
|||
951 | { |
|
|||
952 | #if 0 |
|
|||
953 | QFETCH(QColor, color); |
|
|||
954 |
|
||||
955 | SubQAbstractAxis axis; |
|
|||
956 |
|
||||
957 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
958 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
959 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
960 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
961 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
962 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
963 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
964 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
965 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
966 |
|
||||
967 | axis.setLabelsColor(color); |
|
|||
968 |
|
||||
969 | QCOMPARE(spy0.count(), 0); |
|
|||
970 | QCOMPARE(spy1.count(), 0); |
|
|||
971 | QCOMPARE(spy2.count(), 0); |
|
|||
972 | QCOMPARE(spy3.count(), 0); |
|
|||
973 | QCOMPARE(spy4.count(), 0); |
|
|||
974 | QCOMPARE(spy5.count(), 0); |
|
|||
975 | QCOMPARE(spy6.count(), 0); |
|
|||
976 | QCOMPARE(spy7.count(), 0); |
|
|||
977 | QCOMPARE(spy8.count(), 0); |
|
|||
978 | #endif |
|
|||
979 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
980 | } |
|
|||
981 |
|
||||
982 | void tst_QAbstractAxis::setLabelsFont_data() |
|
|||
983 | { |
|
|||
984 | QTest::addColumn<QFont>("font"); |
|
|||
985 | QTest::newRow("null") << QFont(); |
|
|||
986 | } |
|
|||
987 |
|
||||
988 | // public void setLabelsFont(QFont const& font) |
|
|||
989 | void tst_QAbstractAxis::setLabelsFont() |
|
|||
990 | { |
|
|||
991 | #if 0 |
|
|||
992 | QFETCH(QFont, font); |
|
|||
993 |
|
||||
994 | SubQAbstractAxis axis; |
|
|||
995 |
|
||||
996 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
997 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
998 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
999 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1000 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1001 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1002 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1003 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1004 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1005 |
|
||||
1006 | axis.setLabelsFont(font); |
|
|||
1007 |
|
||||
1008 | QCOMPARE(spy0.count(), 0); |
|
|||
1009 | QCOMPARE(spy1.count(), 0); |
|
|||
1010 | QCOMPARE(spy2.count(), 0); |
|
|||
1011 | QCOMPARE(spy3.count(), 0); |
|
|||
1012 | QCOMPARE(spy4.count(), 0); |
|
|||
1013 | QCOMPARE(spy5.count(), 0); |
|
|||
1014 | QCOMPARE(spy6.count(), 0); |
|
|||
1015 | QCOMPARE(spy7.count(), 0); |
|
|||
1016 | QCOMPARE(spy8.count(), 0); |
|
|||
1017 | #endif |
|
|||
1018 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1019 | } |
|
|||
1020 |
|
||||
1021 | void tst_QAbstractAxis::setLabelsPen_data() |
|
|||
1022 | { |
|
|||
1023 | #if 0 |
|
|||
1024 | QTest::addColumn<QPen>("pen"); |
|
|||
1025 | QTest::newRow("null") << QPen(); |
|
|||
1026 | #endif |
|
|||
1027 | } |
|
|||
1028 |
|
||||
1029 | // public void setLabelsPen(QPen const& pen) |
|
|||
1030 | void tst_QAbstractAxis::setLabelsPen() |
|
|||
1031 | { |
|
|||
1032 | #if 0 |
|
|||
1033 | QFETCH(QPen, pen); |
|
|||
1034 |
|
||||
1035 | SubQAbstractAxis axis; |
|
|||
1036 |
|
||||
1037 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1038 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1039 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1040 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1041 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1042 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1043 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1044 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1045 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1046 |
|
||||
1047 | axis.setLabelsPen(pen); |
|
|||
1048 |
|
||||
1049 | QCOMPARE(spy0.count(), 0); |
|
|||
1050 | QCOMPARE(spy1.count(), 0); |
|
|||
1051 | QCOMPARE(spy2.count(), 0); |
|
|||
1052 | QCOMPARE(spy3.count(), 0); |
|
|||
1053 | QCOMPARE(spy4.count(), 0); |
|
|||
1054 | QCOMPARE(spy5.count(), 0); |
|
|||
1055 | QCOMPARE(spy6.count(), 0); |
|
|||
1056 | QCOMPARE(spy7.count(), 0); |
|
|||
1057 | QCOMPARE(spy8.count(), 0); |
|
|||
1058 | #endif |
|
|||
1059 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1060 | } |
|
|||
1061 |
|
||||
1062 | void tst_QAbstractAxis::setLabelsVisible_data() |
|
|||
1063 | { |
|
|||
1064 | QTest::addColumn<bool>("visible"); |
|
|||
1065 | QTest::newRow("true") << true; |
|
|||
1066 | QTest::newRow("false") << false; |
|
|||
1067 | } |
|
|||
1068 |
|
||||
1069 | // public void setLabelsVisible(bool visible = true) |
|
|||
1070 | void tst_QAbstractAxis::setLabelsVisible() |
|
|||
1071 | { |
|
|||
1072 | #if 0 |
|
|||
1073 | QFETCH(bool, visible); |
|
|||
1074 |
|
||||
1075 | SubQAbstractAxis axis; |
|
|||
1076 |
|
||||
1077 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1078 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1079 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1080 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1081 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1082 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1083 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1084 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1085 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1086 |
|
||||
1087 | axis.setLabelsVisible(visible); |
|
|||
1088 |
|
||||
1089 | QCOMPARE(spy0.count(), 0); |
|
|||
1090 | QCOMPARE(spy1.count(), 0); |
|
|||
1091 | QCOMPARE(spy2.count(), 0); |
|
|||
1092 | QCOMPARE(spy3.count(), 0); |
|
|||
1093 | QCOMPARE(spy4.count(), 0); |
|
|||
1094 | QCOMPARE(spy5.count(), 0); |
|
|||
1095 | QCOMPARE(spy6.count(), 0); |
|
|||
1096 | QCOMPARE(spy7.count(), 0); |
|
|||
1097 | QCOMPARE(spy8.count(), 0); |
|
|||
1098 | #endif |
|
|||
1099 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1100 | } |
|
|||
1101 |
|
||||
1102 | Q_DECLARE_METATYPE(QVariant) |
|
|||
1103 | void tst_QAbstractAxis::setMax_data() |
|
|||
1104 | { |
|
|||
1105 | #if 0 |
|
|||
1106 | QTest::addColumn<QVariant>("max"); |
|
|||
1107 | QTest::newRow("null") << QVariant(); |
|
|||
1108 | #endif |
|
|||
1109 | } |
|
|||
1110 |
|
||||
1111 | // public void setMax(QVariant const& max) |
|
|||
1112 | void tst_QAbstractAxis::setMax() |
|
|||
1113 | { |
|
|||
1114 | #if 0 |
|
|||
1115 | QFETCH(QVariant, max); |
|
|||
1116 |
|
||||
1117 | SubQAbstractAxis axis; |
|
|||
1118 |
|
||||
1119 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1120 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1121 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1122 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1123 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1124 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1125 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1126 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1127 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1128 |
|
||||
1129 | axis.setMax(max); |
|
|||
1130 |
|
||||
1131 | QCOMPARE(spy0.count(), 0); |
|
|||
1132 | QCOMPARE(spy1.count(), 0); |
|
|||
1133 | QCOMPARE(spy2.count(), 0); |
|
|||
1134 | QCOMPARE(spy3.count(), 0); |
|
|||
1135 | QCOMPARE(spy4.count(), 0); |
|
|||
1136 | QCOMPARE(spy5.count(), 0); |
|
|||
1137 | QCOMPARE(spy6.count(), 0); |
|
|||
1138 | QCOMPARE(spy7.count(), 0); |
|
|||
1139 | QCOMPARE(spy8.count(), 0); |
|
|||
1140 | #endif |
|
|||
1141 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1142 | } |
|
|||
1143 |
|
||||
1144 | void tst_QAbstractAxis::setMin_data() |
|
|||
1145 | { |
|
|||
1146 | #if 0 |
|
|||
1147 | QTest::addColumn<QVariant>("min"); |
|
|||
1148 | QTest::newRow("null") << QVariant(); |
|
|||
1149 | #endif |
|
|||
1150 | } |
|
|||
1151 |
|
||||
1152 | // public void setMin(QVariant const& min) |
|
|||
1153 | void tst_QAbstractAxis::setMin() |
|
|||
1154 | { |
|
|||
1155 | #if 0 |
|
|||
1156 | QFETCH(QVariant, min); |
|
|||
1157 |
|
||||
1158 | SubQAbstractAxis axis; |
|
|||
1159 |
|
||||
1160 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1161 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1162 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1163 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1164 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1165 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1166 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1167 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1168 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1169 |
|
||||
1170 | axis.setMin(min); |
|
|||
1171 |
|
||||
1172 | QCOMPARE(spy0.count(), 0); |
|
|||
1173 | QCOMPARE(spy1.count(), 0); |
|
|||
1174 | QCOMPARE(spy2.count(), 0); |
|
|||
1175 | QCOMPARE(spy3.count(), 0); |
|
|||
1176 | QCOMPARE(spy4.count(), 0); |
|
|||
1177 | QCOMPARE(spy5.count(), 0); |
|
|||
1178 | QCOMPARE(spy6.count(), 0); |
|
|||
1179 | QCOMPARE(spy7.count(), 0); |
|
|||
1180 | QCOMPARE(spy8.count(), 0); |
|
|||
1181 | #endif |
|
|||
1182 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1183 | } |
|
|||
1184 |
|
||||
1185 | void tst_QAbstractAxis::setRange_data() |
|
|||
1186 | { |
|
|||
1187 | #if 0 |
|
|||
1188 | QTest::addColumn<QVariant>("min"); |
|
|||
1189 | QTest::addColumn<QVariant>("max"); |
|
|||
1190 | QTest::newRow("null") << QVariant() << QVariant(); |
|
|||
1191 | #endif |
|
|||
1192 | } |
|
|||
1193 |
|
||||
1194 | // public void setRange(QVariant const& min, QVariant const& max) |
|
|||
1195 | void tst_QAbstractAxis::setRange() |
|
|||
1196 | { |
|
|||
1197 | #if 0 |
|
|||
1198 | QFETCH(QVariant, min); |
|
|||
1199 | QFETCH(QVariant, max); |
|
|||
1200 |
|
||||
1201 | SubQAbstractAxis axis; |
|
|||
1202 |
|
||||
1203 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1204 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1205 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1206 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1207 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1208 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1209 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1210 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1211 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1212 |
|
||||
1213 | axis.setRange(min, max); |
|
|||
1214 |
|
||||
1215 | QCOMPARE(spy0.count(), 0); |
|
|||
1216 | QCOMPARE(spy1.count(), 0); |
|
|||
1217 | QCOMPARE(spy2.count(), 0); |
|
|||
1218 | QCOMPARE(spy3.count(), 0); |
|
|||
1219 | QCOMPARE(spy4.count(), 0); |
|
|||
1220 | QCOMPARE(spy5.count(), 0); |
|
|||
1221 | QCOMPARE(spy6.count(), 0); |
|
|||
1222 | QCOMPARE(spy7.count(), 0); |
|
|||
1223 | QCOMPARE(spy8.count(), 0); |
|
|||
1224 | #endif |
|
|||
1225 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1226 | } |
|
|||
1227 |
|
||||
1228 | void tst_QAbstractAxis::setShadesBorderColor_data() |
|
|||
1229 | { |
|
|||
1230 | #if 0 |
|
|||
1231 | QTest::addColumn<QColor>("color"); |
|
|||
1232 | QTest::newRow("null") << QColor(); |
|
|||
1233 | #endif |
|
|||
1234 | } |
|
|||
1235 |
|
||||
1236 | // public void setShadesBorderColor(QColor color) |
|
|||
1237 | void tst_QAbstractAxis::setShadesBorderColor() |
|
|||
1238 | { |
|
|||
1239 | #if 0 |
|
|||
1240 | QFETCH(QColor, color); |
|
|||
1241 |
|
||||
1242 | SubQAbstractAxis axis; |
|
|||
1243 |
|
||||
1244 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1245 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1246 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1247 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1248 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1249 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1250 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1251 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1252 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1253 |
|
||||
1254 | axis.setShadesBorderColor(color); |
|
|||
1255 |
|
||||
1256 | QCOMPARE(spy0.count(), 0); |
|
|||
1257 | QCOMPARE(spy1.count(), 0); |
|
|||
1258 | QCOMPARE(spy2.count(), 0); |
|
|||
1259 | QCOMPARE(spy3.count(), 0); |
|
|||
1260 | QCOMPARE(spy4.count(), 0); |
|
|||
1261 | QCOMPARE(spy5.count(), 0); |
|
|||
1262 | QCOMPARE(spy6.count(), 0); |
|
|||
1263 | QCOMPARE(spy7.count(), 0); |
|
|||
1264 | QCOMPARE(spy8.count(), 0); |
|
|||
1265 | #endif |
|
|||
1266 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1267 | } |
|
|||
1268 |
|
||||
1269 | void tst_QAbstractAxis::setShadesBrush_data() |
|
|||
1270 | { |
|
|||
1271 | #if 0 |
|
|||
1272 | QTest::addColumn<QBrush>("brush"); |
|
|||
1273 | QTest::newRow("null") << QBrush(); |
|
|||
1274 | #endif |
|
|||
1275 | } |
|
|||
1276 |
|
||||
1277 | // public void setShadesBrush(QBrush const& brush) |
|
|||
1278 | void tst_QAbstractAxis::setShadesBrush() |
|
|||
1279 | { |
|
|||
1280 | #if 0 |
|
|||
1281 | QFETCH(QBrush, brush); |
|
|||
1282 |
|
||||
1283 | SubQAbstractAxis axis; |
|
|||
1284 |
|
||||
1285 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1286 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1287 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1288 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1289 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1290 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1291 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1292 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1293 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1294 |
|
||||
1295 | axis.setShadesBrush(brush); |
|
|||
1296 |
|
||||
1297 | QCOMPARE(spy0.count(), 0); |
|
|||
1298 | QCOMPARE(spy1.count(), 0); |
|
|||
1299 | QCOMPARE(spy2.count(), 0); |
|
|||
1300 | QCOMPARE(spy3.count(), 0); |
|
|||
1301 | QCOMPARE(spy4.count(), 0); |
|
|||
1302 | QCOMPARE(spy5.count(), 0); |
|
|||
1303 | QCOMPARE(spy6.count(), 0); |
|
|||
1304 | QCOMPARE(spy7.count(), 0); |
|
|||
1305 | QCOMPARE(spy8.count(), 0); |
|
|||
1306 | #endif |
|
|||
1307 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1308 | } |
|
|||
1309 |
|
||||
1310 | void tst_QAbstractAxis::setShadesColor_data() |
|
|||
1311 | { |
|
|||
1312 | #if 0 |
|
|||
1313 | QTest::addColumn<QColor>("color"); |
|
|||
1314 | QTest::newRow("null") << QColor(); |
|
|||
1315 | #endif |
|
|||
1316 | } |
|
|||
1317 |
|
||||
1318 | // public void setShadesColor(QColor color) |
|
|||
1319 | void tst_QAbstractAxis::setShadesColor() |
|
|||
1320 | { |
|
|||
1321 | #if 0 |
|
|||
1322 | QFETCH(QColor, color); |
|
|||
1323 |
|
||||
1324 | SubQAbstractAxis axis; |
|
|||
1325 |
|
||||
1326 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1327 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1328 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1329 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1330 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1331 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1332 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1333 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1334 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1335 |
|
||||
1336 | axis.setShadesColor(color); |
|
|||
1337 |
|
||||
1338 | QCOMPARE(spy0.count(), 0); |
|
|||
1339 | QCOMPARE(spy1.count(), 0); |
|
|||
1340 | QCOMPARE(spy2.count(), 0); |
|
|||
1341 | QCOMPARE(spy3.count(), 0); |
|
|||
1342 | QCOMPARE(spy4.count(), 0); |
|
|||
1343 | QCOMPARE(spy5.count(), 0); |
|
|||
1344 | QCOMPARE(spy6.count(), 0); |
|
|||
1345 | QCOMPARE(spy7.count(), 0); |
|
|||
1346 | QCOMPARE(spy8.count(), 0); |
|
|||
1347 | #endif |
|
|||
1348 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1349 | } |
|
|||
1350 |
|
||||
1351 | void tst_QAbstractAxis::setShadesPen_data() |
|
|||
1352 | { |
|
|||
1353 | #if 0 |
|
|||
1354 | QTest::addColumn<QPen>("pen"); |
|
|||
1355 | QTest::newRow("null") << QPen(); |
|
|||
1356 | #endif |
|
|||
1357 | } |
|
|||
1358 |
|
||||
1359 | // public void setShadesPen(QPen const& pen) |
|
|||
1360 | void tst_QAbstractAxis::setShadesPen() |
|
|||
1361 | { |
|
|||
1362 | #if 0 |
|
|||
1363 | QFETCH(QPen, pen); |
|
|||
1364 |
|
||||
1365 | SubQAbstractAxis axis; |
|
|||
1366 |
|
||||
1367 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1368 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1369 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1370 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1371 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1372 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1373 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1374 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1375 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1376 |
|
||||
1377 | axis.setShadesPen(pen); |
|
|||
1378 |
|
||||
1379 | QCOMPARE(spy0.count(), 0); |
|
|||
1380 | QCOMPARE(spy1.count(), 0); |
|
|||
1381 | QCOMPARE(spy2.count(), 0); |
|
|||
1382 | QCOMPARE(spy3.count(), 0); |
|
|||
1383 | QCOMPARE(spy4.count(), 0); |
|
|||
1384 | QCOMPARE(spy5.count(), 0); |
|
|||
1385 | QCOMPARE(spy6.count(), 0); |
|
|||
1386 | QCOMPARE(spy7.count(), 0); |
|
|||
1387 | QCOMPARE(spy8.count(), 0); |
|
|||
1388 | #endif |
|
|||
1389 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1390 | } |
|
|||
1391 |
|
||||
1392 | void tst_QAbstractAxis::setShadesVisible_data() |
|
|||
1393 | { |
|
|||
1394 | QTest::addColumn<bool>("visible"); |
|
|||
1395 | QTest::newRow("true") << true; |
|
|||
1396 | QTest::newRow("false") << false; |
|
|||
1397 | } |
|
|||
1398 |
|
||||
1399 | // public void setShadesVisible(bool visible = true) |
|
|||
1400 | void tst_QAbstractAxis::setShadesVisible() |
|
|||
1401 | { |
|
|||
1402 | #if 0 |
|
|||
1403 | QFETCH(bool, visible); |
|
|||
1404 |
|
||||
1405 | SubQAbstractAxis axis; |
|
|||
1406 |
|
||||
1407 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1408 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1409 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1410 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1411 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1412 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1413 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1414 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1415 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1416 |
|
||||
1417 | axis.setShadesVisible(visible); |
|
|||
1418 |
|
||||
1419 | QCOMPARE(spy0.count(), 0); |
|
|||
1420 | QCOMPARE(spy1.count(), 0); |
|
|||
1421 | QCOMPARE(spy2.count(), 0); |
|
|||
1422 | QCOMPARE(spy3.count(), 0); |
|
|||
1423 | QCOMPARE(spy4.count(), 0); |
|
|||
1424 | QCOMPARE(spy5.count(), 0); |
|
|||
1425 | QCOMPARE(spy6.count(), 0); |
|
|||
1426 | QCOMPARE(spy7.count(), 0); |
|
|||
1427 | QCOMPARE(spy8.count(), 0); |
|
|||
1428 | #endif |
|
|||
1429 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1430 | } |
|
|||
1431 |
|
||||
1432 | void tst_QAbstractAxis::setVisible_data() |
|
|||
1433 | { |
|
|||
1434 | QTest::addColumn<bool>("visible"); |
|
|||
1435 | QTest::newRow("true") << true; |
|
|||
1436 | QTest::newRow("false") << false; |
|
|||
1437 | } |
|
|||
1438 |
|
||||
1439 | // public void setVisible(bool visible = true) |
|
|||
1440 | void tst_QAbstractAxis::setVisible() |
|
|||
1441 | { |
|
|||
1442 | #if 0 |
|
|||
1443 | QFETCH(bool, visible); |
|
|||
1444 |
|
||||
1445 | SubQAbstractAxis axis; |
|
|||
1446 |
|
||||
1447 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1448 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1449 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1450 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1451 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1452 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1453 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1454 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1455 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1456 |
|
||||
1457 | axis.setVisible(visible); |
|
|||
1458 |
|
||||
1459 | QCOMPARE(spy0.count(), 0); |
|
|||
1460 | QCOMPARE(spy1.count(), 0); |
|
|||
1461 | QCOMPARE(spy2.count(), 0); |
|
|||
1462 | QCOMPARE(spy3.count(), 0); |
|
|||
1463 | QCOMPARE(spy4.count(), 0); |
|
|||
1464 | QCOMPARE(spy5.count(), 0); |
|
|||
1465 | QCOMPARE(spy6.count(), 0); |
|
|||
1466 | QCOMPARE(spy7.count(), 0); |
|
|||
1467 | QCOMPARE(spy8.count(), 0); |
|
|||
1468 | #endif |
|
|||
1469 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1470 | } |
|
|||
1471 |
|
||||
1472 | void tst_QAbstractAxis::shadesBorderColor_data() |
|
|||
1473 | { |
|
|||
1474 | #if 0 |
|
|||
1475 | QTest::addColumn<QColor>("shadesBorderColor"); |
|
|||
1476 | QTest::newRow("null") << QColor(); |
|
|||
1477 | #endif |
|
|||
1478 | } |
|
|||
1479 |
|
||||
1480 | // public QColor shadesBorderColor() const |
|
|||
1481 | void tst_QAbstractAxis::shadesBorderColor() |
|
|||
1482 | { |
|
|||
1483 | #if 0 |
|
|||
1484 | QFETCH(QColor, shadesBorderColor); |
|
|||
1485 |
|
||||
1486 | SubQAbstractAxis axis; |
|
|||
1487 |
|
||||
1488 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1489 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1490 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1491 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1492 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1493 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1494 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1495 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1496 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1497 |
|
||||
1498 | QCOMPARE(axis.shadesBorderColor(), shadesBorderColor); |
|
|||
1499 |
|
||||
1500 | QCOMPARE(spy0.count(), 0); |
|
|||
1501 | QCOMPARE(spy1.count(), 0); |
|
|||
1502 | QCOMPARE(spy2.count(), 0); |
|
|||
1503 | QCOMPARE(spy3.count(), 0); |
|
|||
1504 | QCOMPARE(spy4.count(), 0); |
|
|||
1505 | QCOMPARE(spy5.count(), 0); |
|
|||
1506 | QCOMPARE(spy6.count(), 0); |
|
|||
1507 | QCOMPARE(spy7.count(), 0); |
|
|||
1508 | QCOMPARE(spy8.count(), 0); |
|
|||
1509 | #endif |
|
|||
1510 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1511 | } |
|
|||
1512 |
|
||||
1513 | void tst_QAbstractAxis::shadesBrush_data() |
|
|||
1514 | { |
|
|||
1515 | #if 0 |
|
|||
1516 | QTest::addColumn<QBrush>("shadesBrush"); |
|
|||
1517 | QTest::newRow("null") << QBrush(); |
|
|||
1518 | #endif |
|
|||
1519 | } |
|
|||
1520 |
|
||||
1521 | // public QBrush shadesBrush() const |
|
|||
1522 | void tst_QAbstractAxis::shadesBrush() |
|
|||
1523 | { |
|
|||
1524 | #if 0 |
|
|||
1525 | QFETCH(QBrush, shadesBrush); |
|
|||
1526 |
|
||||
1527 | SubQAbstractAxis axis; |
|
|||
1528 |
|
||||
1529 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1530 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1531 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1532 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1533 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1534 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1535 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1536 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1537 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1538 |
|
||||
1539 | QCOMPARE(axis.shadesBrush(), shadesBrush); |
|
|||
1540 |
|
||||
1541 | QCOMPARE(spy0.count(), 0); |
|
|||
1542 | QCOMPARE(spy1.count(), 0); |
|
|||
1543 | QCOMPARE(spy2.count(), 0); |
|
|||
1544 | QCOMPARE(spy3.count(), 0); |
|
|||
1545 | QCOMPARE(spy4.count(), 0); |
|
|||
1546 | QCOMPARE(spy5.count(), 0); |
|
|||
1547 | QCOMPARE(spy6.count(), 0); |
|
|||
1548 | QCOMPARE(spy7.count(), 0); |
|
|||
1549 | QCOMPARE(spy8.count(), 0); |
|
|||
1550 | #endif |
|
|||
1551 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1552 | } |
|
|||
1553 |
|
||||
1554 | void tst_QAbstractAxis::shadesColor_data() |
|
|||
1555 | { |
|
|||
1556 | #if 0 |
|
|||
1557 | QTest::addColumn<QColor>("shadesColor"); |
|
|||
1558 | QTest::newRow("null") << QColor(); |
|
|||
1559 | #endif |
|
|||
1560 | } |
|
|||
1561 |
|
||||
1562 | // public QColor shadesColor() const |
|
|||
1563 | void tst_QAbstractAxis::shadesColor() |
|
|||
1564 | { |
|
|||
1565 | #if 0 |
|
|||
1566 | QFETCH(QColor, shadesColor); |
|
|||
1567 |
|
||||
1568 | SubQAbstractAxis axis; |
|
|||
1569 |
|
||||
1570 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1571 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1572 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1573 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1574 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1575 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1576 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1577 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1578 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1579 |
|
||||
1580 | QCOMPARE(axis.shadesColor(), shadesColor); |
|
|||
1581 |
|
||||
1582 | QCOMPARE(spy0.count(), 0); |
|
|||
1583 | QCOMPARE(spy1.count(), 0); |
|
|||
1584 | QCOMPARE(spy2.count(), 0); |
|
|||
1585 | QCOMPARE(spy3.count(), 0); |
|
|||
1586 | QCOMPARE(spy4.count(), 0); |
|
|||
1587 | QCOMPARE(spy5.count(), 0); |
|
|||
1588 | QCOMPARE(spy6.count(), 0); |
|
|||
1589 | QCOMPARE(spy7.count(), 0); |
|
|||
1590 | QCOMPARE(spy8.count(), 0); |
|
|||
1591 | #endif |
|
|||
1592 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1593 | } |
|
|||
1594 |
|
||||
1595 | void tst_QAbstractAxis::shadesPen_data() |
|
|||
1596 | { |
|
|||
1597 | #if 0 |
|
|||
1598 | QTest::addColumn<QPen>("shadesPen"); |
|
|||
1599 | QTest::newRow("null") << QPen(); |
|
|||
1600 | #endif |
|
|||
1601 | } |
|
|||
1602 |
|
||||
1603 | // public QPen shadesPen() const |
|
|||
1604 | void tst_QAbstractAxis::shadesPen() |
|
|||
1605 | { |
|
|||
1606 | #if 0 |
|
|||
1607 | QFETCH(QPen, shadesPen); |
|
|||
1608 |
|
||||
1609 | SubQAbstractAxis axis; |
|
|||
1610 |
|
||||
1611 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1612 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1613 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1614 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1615 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1616 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1617 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1618 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1619 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1620 |
|
||||
1621 | QCOMPARE(axis.shadesPen(), shadesPen); |
|
|||
1622 |
|
||||
1623 | QCOMPARE(spy0.count(), 0); |
|
|||
1624 | QCOMPARE(spy1.count(), 0); |
|
|||
1625 | QCOMPARE(spy2.count(), 0); |
|
|||
1626 | QCOMPARE(spy3.count(), 0); |
|
|||
1627 | QCOMPARE(spy4.count(), 0); |
|
|||
1628 | QCOMPARE(spy5.count(), 0); |
|
|||
1629 | QCOMPARE(spy6.count(), 0); |
|
|||
1630 | QCOMPARE(spy7.count(), 0); |
|
|||
1631 | QCOMPARE(spy8.count(), 0); |
|
|||
1632 | #endif |
|
|||
1633 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1634 | } |
|
|||
1635 |
|
||||
1636 | void tst_QAbstractAxis::shadesVisible_data() |
|
|||
1637 | { |
|
729 | { | |
1638 | QTest::addColumn<bool>("shadesVisible"); |
|
730 | QTest::addColumn<bool>("shadesVisible"); | |
1639 | QTest::newRow("true") << true; |
|
731 | QTest::newRow("true") << true; | |
1640 | QTest::newRow("false") << false; |
|
732 | QTest::newRow("false") << false; | |
1641 | } |
|
733 | } | |
1642 |
|
734 | |||
1643 | // public bool shadesVisible() const |
|
|||
1644 | void tst_QAbstractAxis::shadesVisible() |
|
735 | void tst_QAbstractAxis::shadesVisible() | |
1645 | { |
|
736 | { | |
1646 | #if 0 |
|
|||
1647 | QFETCH(bool, shadesVisible); |
|
737 | QFETCH(bool, shadesVisible); | |
1648 |
|
738 | |||
1649 | SubQAbstractAxis axis; |
|
739 | m_axis->setShadesVisible(!shadesVisible); | |
1650 |
|
||||
1651 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1652 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1653 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1654 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1655 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1656 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1657 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1658 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1659 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1660 |
|
||||
1661 | QCOMPARE(axis.shadesVisible(), shadesVisible); |
|
|||
1662 |
|
||||
1663 | QCOMPARE(spy0.count(), 0); |
|
|||
1664 | QCOMPARE(spy1.count(), 0); |
|
|||
1665 | QCOMPARE(spy2.count(), 0); |
|
|||
1666 | QCOMPARE(spy3.count(), 0); |
|
|||
1667 | QCOMPARE(spy4.count(), 0); |
|
|||
1668 | QCOMPARE(spy5.count(), 0); |
|
|||
1669 | QCOMPARE(spy6.count(), 0); |
|
|||
1670 | QCOMPARE(spy7.count(), 0); |
|
|||
1671 | QCOMPARE(spy8.count(), 0); |
|
|||
1672 | #endif |
|
|||
1673 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1674 | } |
|
|||
1675 |
|
||||
1676 | void tst_QAbstractAxis::show_data() |
|
|||
1677 | { |
|
|||
1678 | QTest::addColumn<int>("foo"); |
|
|||
1679 | QTest::newRow("0") << 0; |
|
|||
1680 | QTest::newRow("-1") << -1; |
|
|||
1681 | } |
|
|||
1682 |
|
||||
1683 | // public void show() |
|
|||
1684 | void tst_QAbstractAxis::show() |
|
|||
1685 | { |
|
|||
1686 | #if 0 |
|
|||
1687 | QFETCH(int, foo); |
|
|||
1688 |
|
||||
1689 | SubQAbstractAxis axis; |
|
|||
1690 |
|
||||
1691 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1692 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1693 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1694 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1695 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1696 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1697 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1698 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1699 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1700 |
|
||||
1701 | axis.show(); |
|
|||
1702 |
|
||||
1703 | QCOMPARE(spy0.count(), 0); |
|
|||
1704 | QCOMPARE(spy1.count(), 0); |
|
|||
1705 | QCOMPARE(spy2.count(), 0); |
|
|||
1706 | QCOMPARE(spy3.count(), 0); |
|
|||
1707 | QCOMPARE(spy4.count(), 0); |
|
|||
1708 | QCOMPARE(spy5.count(), 0); |
|
|||
1709 | QCOMPARE(spy6.count(), 0); |
|
|||
1710 | QCOMPARE(spy7.count(), 0); |
|
|||
1711 | QCOMPARE(spy8.count(), 0); |
|
|||
1712 | #endif |
|
|||
1713 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1714 | } |
|
|||
1715 |
|
||||
1716 | Q_DECLARE_METATYPE(QAbstractAxis::AxisType) |
|
|||
1717 | void tst_QAbstractAxis::type_data() |
|
|||
1718 | { |
|
|||
1719 | #if 0 |
|
|||
1720 | QTest::addColumn<QAbstractAxis::AxisType>("type"); |
|
|||
1721 | QTest::newRow("null") << QAbstractAxis::AxisType(); |
|
|||
1722 | #endif |
|
|||
1723 | } |
|
|||
1724 |
|
||||
1725 | // public QAbstractAxis::AxisType type() const |
|
|||
1726 | void tst_QAbstractAxis::type() |
|
|||
1727 | { |
|
|||
1728 | #if 0 |
|
|||
1729 | QFETCH(QAbstractAxis::AxisType, type); |
|
|||
1730 |
|
||||
1731 | SubQAbstractAxis axis; |
|
|||
1732 |
|
||||
1733 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1734 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1735 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1736 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1737 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1738 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1739 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1740 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1741 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1742 |
|
||||
1743 | QCOMPARE(axis.type(), type); |
|
|||
1744 |
|
||||
1745 | QCOMPARE(spy0.count(), 0); |
|
|||
1746 | QCOMPARE(spy1.count(), 0); |
|
|||
1747 | QCOMPARE(spy2.count(), 0); |
|
|||
1748 | QCOMPARE(spy3.count(), 0); |
|
|||
1749 | QCOMPARE(spy4.count(), 0); |
|
|||
1750 | QCOMPARE(spy5.count(), 0); |
|
|||
1751 | QCOMPARE(spy6.count(), 0); |
|
|||
1752 | QCOMPARE(spy7.count(), 0); |
|
|||
1753 | QCOMPARE(spy8.count(), 0); |
|
|||
1754 | #endif |
|
|||
1755 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1756 | } |
|
|||
1757 |
|
||||
1758 | void tst_QAbstractAxis::arrowVisibleChanged_data() |
|
|||
1759 | { |
|
|||
1760 | QTest::addColumn<bool>("visible"); |
|
|||
1761 | QTest::newRow("true") << true; |
|
|||
1762 | QTest::newRow("false") << false; |
|
|||
1763 | } |
|
|||
1764 |
|
||||
1765 | // protected void arrowVisibleChanged(bool visible) |
|
|||
1766 | void tst_QAbstractAxis::arrowVisibleChanged() |
|
|||
1767 | { |
|
|||
1768 | #if 0 |
|
|||
1769 | QFETCH(bool, visible); |
|
|||
1770 |
|
||||
1771 | SubQAbstractAxis axis; |
|
|||
1772 |
|
||||
1773 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1774 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1775 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1776 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1777 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1778 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1779 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1780 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1781 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1782 |
|
||||
1783 | axis.call_arrowVisibleChanged(visible); |
|
|||
1784 |
|
||||
1785 | QCOMPARE(spy0.count(), 0); |
|
|||
1786 | QCOMPARE(spy1.count(), 0); |
|
|||
1787 | QCOMPARE(spy2.count(), 0); |
|
|||
1788 | QCOMPARE(spy3.count(), 0); |
|
|||
1789 | QCOMPARE(spy4.count(), 0); |
|
|||
1790 | QCOMPARE(spy5.count(), 0); |
|
|||
1791 | QCOMPARE(spy6.count(), 0); |
|
|||
1792 | QCOMPARE(spy7.count(), 0); |
|
|||
1793 | QCOMPARE(spy8.count(), 0); |
|
|||
1794 | #endif |
|
|||
1795 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1796 | } |
|
|||
1797 |
|
||||
1798 | void tst_QAbstractAxis::colorChanged_data() |
|
|||
1799 | { |
|
|||
1800 | #if 0 |
|
|||
1801 | QTest::addColumn<QColor>("color"); |
|
|||
1802 | QTest::newRow("null") << QColor(); |
|
|||
1803 | #endif |
|
|||
1804 | } |
|
|||
1805 |
|
||||
1806 | // protected void colorChanged(QColor color) |
|
|||
1807 | void tst_QAbstractAxis::colorChanged() |
|
|||
1808 | { |
|
|||
1809 | #if 0 |
|
|||
1810 | QFETCH(QColor, color); |
|
|||
1811 |
|
||||
1812 | SubQAbstractAxis axis; |
|
|||
1813 |
|
||||
1814 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1815 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1816 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1817 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1818 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1819 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1820 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1821 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1822 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1823 |
|
||||
1824 | axis.call_colorChanged(color); |
|
|||
1825 |
|
||||
1826 | QCOMPARE(spy0.count(), 0); |
|
|||
1827 | QCOMPARE(spy1.count(), 0); |
|
|||
1828 | QCOMPARE(spy2.count(), 0); |
|
|||
1829 | QCOMPARE(spy3.count(), 0); |
|
|||
1830 | QCOMPARE(spy4.count(), 0); |
|
|||
1831 | QCOMPARE(spy5.count(), 0); |
|
|||
1832 | QCOMPARE(spy6.count(), 0); |
|
|||
1833 | QCOMPARE(spy7.count(), 0); |
|
|||
1834 | QCOMPARE(spy8.count(), 0); |
|
|||
1835 | #endif |
|
|||
1836 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1837 | } |
|
|||
1838 |
|
||||
1839 | void tst_QAbstractAxis::gridVisibleChanged_data() |
|
|||
1840 | { |
|
|||
1841 | QTest::addColumn<bool>("visible"); |
|
|||
1842 | QTest::newRow("true") << true; |
|
|||
1843 | QTest::newRow("false") << false; |
|
|||
1844 | } |
|
|||
1845 |
|
||||
1846 | // protected void gridVisibleChanged(bool visible) |
|
|||
1847 | void tst_QAbstractAxis::gridVisibleChanged() |
|
|||
1848 | { |
|
|||
1849 | #if 0 |
|
|||
1850 | QFETCH(bool, visible); |
|
|||
1851 |
|
||||
1852 | SubQAbstractAxis axis; |
|
|||
1853 |
|
740 | |||
1854 |
QSignalSpy spy0( |
|
741 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
1855 |
QSignalSpy spy1( |
|
742 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
1856 |
QSignalSpy spy2( |
|
743 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
1857 |
QSignalSpy spy3( |
|
744 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
1858 |
QSignalSpy spy4( |
|
745 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
1859 |
QSignalSpy spy5( |
|
746 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
1860 |
QSignalSpy spy6( |
|
747 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
1861 |
QSignalSpy spy7( |
|
748 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
1862 |
QSignalSpy spy8( |
|
749 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
1863 |
|
750 | |||
1864 |
|
|
751 | m_axis->setShadesVisible(shadesVisible); | |
|
752 | QCOMPARE(m_axis->shadesVisible(), shadesVisible); | |||
1865 |
|
753 | |||
1866 | QCOMPARE(spy0.count(), 0); |
|
754 | QCOMPARE(spy0.count(), 0); | |
1867 | QCOMPARE(spy1.count(), 0); |
|
755 | QCOMPARE(spy1.count(), 0); | |
1868 | QCOMPARE(spy2.count(), 0); |
|
756 | QCOMPARE(spy2.count(), 0); | |
1869 | QCOMPARE(spy3.count(), 0); |
|
757 | QCOMPARE(spy3.count(), 0); | |
1870 | QCOMPARE(spy4.count(), 0); |
|
758 | QCOMPARE(spy4.count(), 0); | |
1871 | QCOMPARE(spy5.count(), 0); |
|
759 | QCOMPARE(spy5.count(), 0); | |
1872 | QCOMPARE(spy6.count(), 0); |
|
760 | QCOMPARE(spy6.count(), 0); | |
1873 |
QCOMPARE(spy7.count(), |
|
761 | QCOMPARE(spy7.count(), 1); | |
1874 | QCOMPARE(spy8.count(), 0); |
|
762 | QCOMPARE(spy8.count(), 0); | |
1875 | #endif |
|
|||
1876 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1877 | } |
|
|||
1878 |
|
763 | |||
1879 | void tst_QAbstractAxis::labelsColorChanged_data() |
|
764 | m_chart->setAxisX(m_axis, m_series); | |
1880 | { |
|
765 | m_view->show(); | |
1881 | #if 0 |
|
766 | QTest::qWaitForWindowShown(m_view); | |
1882 | QTest::addColumn<QColor>("color"); |
|
767 | QCOMPARE(m_axis->shadesVisible(), shadesVisible); | |
1883 | QTest::newRow("null") << QColor(); |
|
|||
1884 | #endif |
|
|||
1885 | } |
|
768 | } | |
1886 |
|
769 | |||
1887 | // protected void labelsColorChanged(QColor color) |
|
770 | void tst_QAbstractAxis::show_data() | |
1888 | void tst_QAbstractAxis::labelsColorChanged() |
|
|||
1889 | { |
|
771 | { | |
1890 | #if 0 |
|
|||
1891 | QFETCH(QColor, color); |
|
|||
1892 |
|
||||
1893 | SubQAbstractAxis axis; |
|
|||
1894 |
|
||||
1895 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1896 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1897 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1898 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1899 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1900 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1901 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1902 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1903 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1904 |
|
||||
1905 | axis.call_labelsColorChanged(color); |
|
|||
1906 |
|
||||
1907 | QCOMPARE(spy0.count(), 0); |
|
|||
1908 | QCOMPARE(spy1.count(), 0); |
|
|||
1909 | QCOMPARE(spy2.count(), 0); |
|
|||
1910 | QCOMPARE(spy3.count(), 0); |
|
|||
1911 | QCOMPARE(spy4.count(), 0); |
|
|||
1912 | QCOMPARE(spy5.count(), 0); |
|
|||
1913 | QCOMPARE(spy6.count(), 0); |
|
|||
1914 | QCOMPARE(spy7.count(), 0); |
|
|||
1915 | QCOMPARE(spy8.count(), 0); |
|
|||
1916 | #endif |
|
|||
1917 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1918 | } |
|
|||
1919 |
|
772 | |||
1920 | void tst_QAbstractAxis::labelsVisibleChanged_data() |
|
|||
1921 | { |
|
|||
1922 | QTest::addColumn<bool>("visible"); |
|
|||
1923 | QTest::newRow("true") << true; |
|
|||
1924 | QTest::newRow("false") << false; |
|
|||
1925 | } |
|
773 | } | |
1926 |
|
774 | |||
1927 | // protected void labelsVisibleChanged(bool visible) |
|
775 | void tst_QAbstractAxis::show() | |
1928 | void tst_QAbstractAxis::labelsVisibleChanged() |
|
|||
1929 | { |
|
776 | { | |
1930 | #if 0 |
|
777 | m_axis->hide(); | |
1931 | QFETCH(bool, visible); |
|
778 | QCOMPARE(m_axis->isVisible(), false); | |
1932 |
|
||||
1933 | SubQAbstractAxis axis; |
|
|||
1934 |
|
779 | |||
1935 |
QSignalSpy spy0( |
|
780 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
1936 |
QSignalSpy spy1( |
|
781 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
1937 |
QSignalSpy spy2( |
|
782 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
1938 |
QSignalSpy spy3( |
|
783 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
1939 |
QSignalSpy spy4( |
|
784 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
1940 |
QSignalSpy spy5( |
|
785 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
1941 |
QSignalSpy spy6( |
|
786 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
1942 |
QSignalSpy spy7( |
|
787 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
1943 |
QSignalSpy spy8( |
|
788 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
1944 |
|
789 | |||
1945 | axis.call_labelsVisibleChanged(visible); |
|
790 | m_axis->show(); | |
1946 |
|
791 | |||
1947 | QCOMPARE(spy0.count(), 0); |
|
792 | QCOMPARE(spy0.count(), 0); | |
1948 | QCOMPARE(spy1.count(), 0); |
|
793 | QCOMPARE(spy1.count(), 0); | |
1949 | QCOMPARE(spy2.count(), 0); |
|
794 | QCOMPARE(spy2.count(), 0); | |
1950 | QCOMPARE(spy3.count(), 0); |
|
795 | QCOMPARE(spy3.count(), 0); | |
1951 | QCOMPARE(spy4.count(), 0); |
|
796 | QCOMPARE(spy4.count(), 0); | |
1952 | QCOMPARE(spy5.count(), 0); |
|
797 | QCOMPARE(spy5.count(), 0); | |
1953 | QCOMPARE(spy6.count(), 0); |
|
798 | QCOMPARE(spy6.count(), 0); | |
1954 | QCOMPARE(spy7.count(), 0); |
|
799 | QCOMPARE(spy7.count(), 0); | |
1955 |
QCOMPARE(spy8.count(), |
|
800 | QCOMPARE(spy8.count(), 1); | |
1956 | #endif |
|
801 | QCOMPARE(m_axis->isVisible(), true); | |
1957 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1958 | } |
|
|||
1959 |
|
||||
1960 | void tst_QAbstractAxis::shadesBorderColorChanged_data() |
|
|||
1961 | { |
|
|||
1962 | #if 0 |
|
|||
1963 | QTest::addColumn<QColor>("color"); |
|
|||
1964 | QTest::newRow("null") << QColor(); |
|
|||
1965 | #endif |
|
|||
1966 | } |
|
802 | } | |
1967 |
|
803 | |||
1968 | // protected void shadesBorderColorChanged(QColor color) |
|
804 | void tst_QAbstractAxis::hide_data() | |
1969 | void tst_QAbstractAxis::shadesBorderColorChanged() |
|
|||
1970 | { |
|
805 | { | |
1971 | #if 0 |
|
|||
1972 | QFETCH(QColor, color); |
|
|||
1973 |
|
||||
1974 | SubQAbstractAxis axis; |
|
|||
1975 |
|
||||
1976 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
1977 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
1978 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
1979 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
1980 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
1981 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
1982 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
1983 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
1984 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
1985 |
|
||||
1986 | axis.call_shadesBorderColorChanged(color); |
|
|||
1987 |
|
||||
1988 | QCOMPARE(spy0.count(), 0); |
|
|||
1989 | QCOMPARE(spy1.count(), 0); |
|
|||
1990 | QCOMPARE(spy2.count(), 0); |
|
|||
1991 | QCOMPARE(spy3.count(), 0); |
|
|||
1992 | QCOMPARE(spy4.count(), 0); |
|
|||
1993 | QCOMPARE(spy5.count(), 0); |
|
|||
1994 | QCOMPARE(spy6.count(), 0); |
|
|||
1995 | QCOMPARE(spy7.count(), 0); |
|
|||
1996 | QCOMPARE(spy8.count(), 0); |
|
|||
1997 | #endif |
|
|||
1998 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
1999 | } |
|
|||
2000 |
|
806 | |||
2001 | void tst_QAbstractAxis::shadesColorChanged_data() |
|
|||
2002 | { |
|
|||
2003 | #if 0 |
|
|||
2004 | QTest::addColumn<QColor>("color"); |
|
|||
2005 | QTest::newRow("null") << QColor(); |
|
|||
2006 | #endif |
|
|||
2007 | } |
|
807 | } | |
2008 |
|
808 | |||
2009 | // protected void shadesColorChanged(QColor color) |
|
809 | void tst_QAbstractAxis::hide() | |
2010 | void tst_QAbstractAxis::shadesColorChanged() |
|
|||
2011 | { |
|
810 | { | |
2012 | #if 0 |
|
811 | m_axis->show(); | |
2013 | QFETCH(QColor, color); |
|
812 | QCOMPARE(m_axis->isVisible(),true); | |
2014 |
|
||||
2015 | SubQAbstractAxis axis; |
|
|||
2016 |
|
813 | |||
2017 |
QSignalSpy spy0( |
|
814 | QSignalSpy spy0(m_axis, SIGNAL(arrowVisibleChanged(bool))); | |
2018 |
QSignalSpy spy1( |
|
815 | QSignalSpy spy1(m_axis, SIGNAL(colorChanged(QColor))); | |
2019 |
QSignalSpy spy2( |
|
816 | QSignalSpy spy2(m_axis, SIGNAL(gridVisibleChanged(bool))); | |
2020 |
QSignalSpy spy3( |
|
817 | QSignalSpy spy3(m_axis, SIGNAL(labelsColorChanged(QColor))); | |
2021 |
QSignalSpy spy4( |
|
818 | QSignalSpy spy4(m_axis, SIGNAL(labelsVisibleChanged(bool))); | |
2022 |
QSignalSpy spy5( |
|
819 | QSignalSpy spy5(m_axis, SIGNAL(shadesBorderColorChanged(QColor))); | |
2023 |
QSignalSpy spy6( |
|
820 | QSignalSpy spy6(m_axis, SIGNAL(shadesColorChanged(QColor))); | |
2024 |
QSignalSpy spy7( |
|
821 | QSignalSpy spy7(m_axis, SIGNAL(shadesVisibleChanged(bool))); | |
2025 |
QSignalSpy spy8( |
|
822 | QSignalSpy spy8(m_axis, SIGNAL(visibleChanged(bool))); | |
2026 |
|
823 | |||
2027 | axis.call_shadesColorChanged(color); |
|
824 | m_axis->hide(); | |
2028 |
|
825 | |||
2029 | QCOMPARE(spy0.count(), 0); |
|
826 | QCOMPARE(spy0.count(), 0); | |
2030 | QCOMPARE(spy1.count(), 0); |
|
827 | QCOMPARE(spy1.count(), 0); | |
2031 | QCOMPARE(spy2.count(), 0); |
|
828 | QCOMPARE(spy2.count(), 0); | |
2032 | QCOMPARE(spy3.count(), 0); |
|
829 | QCOMPARE(spy3.count(), 0); | |
2033 | QCOMPARE(spy4.count(), 0); |
|
830 | QCOMPARE(spy4.count(), 0); | |
2034 | QCOMPARE(spy5.count(), 0); |
|
831 | QCOMPARE(spy5.count(), 0); | |
2035 | QCOMPARE(spy6.count(), 0); |
|
832 | QCOMPARE(spy6.count(), 0); | |
2036 | QCOMPARE(spy7.count(), 0); |
|
833 | QCOMPARE(spy7.count(), 0); | |
2037 |
QCOMPARE(spy8.count(), |
|
834 | QCOMPARE(spy8.count(), 1); | |
2038 | #endif |
|
835 | QCOMPARE(m_axis->isVisible(),false); | |
2039 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
2040 | } |
|
836 | } | |
2041 |
|
837 | |||
2042 | void tst_QAbstractAxis::shadesVisibleChanged_data() |
|
|||
2043 | { |
|
|||
2044 | QTest::addColumn<bool>("visible"); |
|
|||
2045 | QTest::newRow("true") << true; |
|
|||
2046 | QTest::newRow("false") << false; |
|
|||
2047 | } |
|
|||
2048 |
|
838 | |||
2049 | // protected void shadesVisibleChanged(bool visible) |
|
|||
2050 | void tst_QAbstractAxis::shadesVisibleChanged() |
|
|||
2051 | { |
|
|||
2052 | #if 0 |
|
|||
2053 | QFETCH(bool, visible); |
|
|||
2054 |
|
839 | |||
2055 | SubQAbstractAxis axis; |
|
|||
2056 |
|
840 | |||
2057 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
2058 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
2059 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
2060 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
2061 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
2062 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
2063 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
2064 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
2065 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
2066 |
|
841 | |||
2067 | axis.call_shadesVisibleChanged(visible); |
|
|||
2068 |
|
842 | |||
2069 | QCOMPARE(spy0.count(), 0); |
|
|||
2070 | QCOMPARE(spy1.count(), 0); |
|
|||
2071 | QCOMPARE(spy2.count(), 0); |
|
|||
2072 | QCOMPARE(spy3.count(), 0); |
|
|||
2073 | QCOMPARE(spy4.count(), 0); |
|
|||
2074 | QCOMPARE(spy5.count(), 0); |
|
|||
2075 | QCOMPARE(spy6.count(), 0); |
|
|||
2076 | QCOMPARE(spy7.count(), 0); |
|
|||
2077 | QCOMPARE(spy8.count(), 0); |
|
|||
2078 | #endif |
|
|||
2079 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
2080 | } |
|
|||
2081 |
|
843 | |||
2082 | void tst_QAbstractAxis::visibleChanged_data() |
|
|||
2083 | { |
|
|||
2084 | QTest::addColumn<bool>("visible"); |
|
|||
2085 | QTest::newRow("true") << true; |
|
|||
2086 | QTest::newRow("false") << false; |
|
|||
2087 | } |
|
|||
2088 |
|
844 | |||
2089 | // protected void visibleChanged(bool visible) |
|
|||
2090 | void tst_QAbstractAxis::visibleChanged() |
|
|||
2091 | { |
|
|||
2092 | #if 0 |
|
|||
2093 | QFETCH(bool, visible); |
|
|||
2094 |
|
845 | |||
2095 | SubQAbstractAxis axis; |
|
|||
2096 |
|
846 | |||
2097 | QSignalSpy spy0(&axis, SIGNAL(arrowVisibleChanged(bool))); |
|
|||
2098 | QSignalSpy spy1(&axis, SIGNAL(colorChanged(QColor))); |
|
|||
2099 | QSignalSpy spy2(&axis, SIGNAL(gridVisibleChanged(bool))); |
|
|||
2100 | QSignalSpy spy3(&axis, SIGNAL(labelsColorChanged(QColor))); |
|
|||
2101 | QSignalSpy spy4(&axis, SIGNAL(labelsVisibleChanged(bool))); |
|
|||
2102 | QSignalSpy spy5(&axis, SIGNAL(shadesBorderColorChanged(QColor))); |
|
|||
2103 | QSignalSpy spy6(&axis, SIGNAL(shadesColorChanged(QColor))); |
|
|||
2104 | QSignalSpy spy7(&axis, SIGNAL(shadesVisibleChanged(bool))); |
|
|||
2105 | QSignalSpy spy8(&axis, SIGNAL(visibleChanged(bool))); |
|
|||
2106 |
|
847 | |||
2107 | axis.call_visibleChanged(visible); |
|
|||
2108 |
|
848 | |||
2109 | QCOMPARE(spy0.count(), 0); |
|
|||
2110 | QCOMPARE(spy1.count(), 0); |
|
|||
2111 | QCOMPARE(spy2.count(), 0); |
|
|||
2112 | QCOMPARE(spy3.count(), 0); |
|
|||
2113 | QCOMPARE(spy4.count(), 0); |
|
|||
2114 | QCOMPARE(spy5.count(), 0); |
|
|||
2115 | QCOMPARE(spy6.count(), 0); |
|
|||
2116 | QCOMPARE(spy7.count(), 0); |
|
|||
2117 | QCOMPARE(spy8.count(), 0); |
|
|||
2118 | #endif |
|
|||
2119 | QSKIP("Test is not implemented.", SkipAll); |
|
|||
2120 | } |
|
@@ -1,151 +1,98 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #ifndef TST_QABSTRACTSERIES_H |
|
21 | #ifndef TST_QABSTRACTSERIES_H | |
22 | #define TST_QABSTRACTSERIES_H |
|
22 | #define TST_QABSTRACTSERIES_H | |
23 |
|
23 | |||
24 | #include <QtTest/QtTest> |
|
24 | #include <QtTest/QtTest> | |
25 | #include <tst_definitions.h> |
|
25 | #include <tst_definitions.h> | |
26 | #include <qabstractaxis.h> |
|
26 | #include <qabstractaxis.h> | |
27 | #include <qchartview.h> |
|
27 | #include <qchartview.h> | |
28 |
|
28 | |||
29 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
29 | QTCOMMERCIALCHART_USE_NAMESPACE | |
30 |
|
30 | |||
31 | class tst_QAbstractAxis : public QObject |
|
31 | class tst_QAbstractAxis : public QObject | |
32 | { |
|
32 | { | |
33 | Q_OBJECT |
|
33 | Q_OBJECT | |
34 |
|
34 | |||
35 | public slots: |
|
35 | public slots: | |
36 | virtual void initTestCase(); |
|
36 | virtual void initTestCase(); | |
37 | virtual void cleanupTestCase(); |
|
37 | virtual void cleanupTestCase(); | |
38 | virtual void init(QAbstractAxis* axis); |
|
38 | virtual void init(QAbstractAxis* axis,QAbstractSeries* series); | |
39 | virtual void cleanup(); |
|
39 | virtual void cleanup(); | |
40 |
|
40 | |||
41 | private slots: |
|
41 | private slots: | |
42 | void axisPen_data(); |
|
42 | void axisPen_data(); | |
43 | void axisPen(); |
|
43 | void axisPen(); | |
44 | void axisPenColor_data(); |
|
44 | void axisPenColor_data(); | |
45 | void axisPenColor(); |
|
45 | void axisPenColor(); | |
46 | void gridLinePen_data(); |
|
46 | void gridLinePen_data(); | |
47 | void gridLinePen(); |
|
47 | void gridLinePen(); | |
48 |
void |
|
48 | void arrowVisible_data(); | |
49 |
void |
|
49 | void arrowVisible(); | |
50 |
void |
|
50 | void gridLineVisible_data(); | |
51 |
void |
|
51 | void gridLineVisible(); | |
52 |
void |
|
52 | void visible_data(); | |
53 |
void |
|
53 | void visible(); | |
54 | void isVisible_data(); |
|
|||
55 | void isVisible(); |
|
|||
56 | void labelsAngle_data(); |
|
54 | void labelsAngle_data(); | |
57 | void labelsAngle(); |
|
55 | void labelsAngle(); | |
58 | void labelsBrush_data(); |
|
56 | void labelsBrush_data(); | |
59 | void labelsBrush(); |
|
57 | void labelsBrush(); | |
60 | void labelsColor_data(); |
|
58 | void labelsColor_data(); | |
61 | void labelsColor(); |
|
59 | void labelsColor(); | |
62 | void labelsFont_data(); |
|
60 | void labelsFont_data(); | |
63 | void labelsFont(); |
|
61 | void labelsFont(); | |
64 | void labelsPen_data(); |
|
62 | void labelsPen_data(); | |
65 | void labelsPen(); |
|
63 | void labelsPen(); | |
66 | void labelsVisible_data(); |
|
64 | void labelsVisible_data(); | |
67 | void labelsVisible(); |
|
65 | void labelsVisible(); | |
68 | void orientation_data(); |
|
66 | void orientation_data(); | |
69 | void orientation(); |
|
67 | void orientation(); | |
70 | void setArrowVisible_data(); |
|
|||
71 | void setArrowVisible(); |
|
|||
72 | void setAxisPen_data(); |
|
|||
73 | void setAxisPen(); |
|
|||
74 | void setAxisPenColor_data(); |
|
|||
75 | void setAxisPenColor(); |
|
|||
76 | void setGridLinePen_data(); |
|
|||
77 | void setGridLinePen(); |
|
|||
78 | void setGridLineVisible_data(); |
|
|||
79 | void setGridLineVisible(); |
|
|||
80 | void setLabelsAngle_data(); |
|
|||
81 | void setLabelsAngle(); |
|
|||
82 | void setLabelsBrush_data(); |
|
|||
83 | void setLabelsBrush(); |
|
|||
84 | void setLabelsColor_data(); |
|
|||
85 | void setLabelsColor(); |
|
|||
86 | void setLabelsFont_data(); |
|
|||
87 | void setLabelsFont(); |
|
|||
88 | void setLabelsPen_data(); |
|
|||
89 | void setLabelsPen(); |
|
|||
90 | void setLabelsVisible_data(); |
|
|||
91 | void setLabelsVisible(); |
|
|||
92 | void setMax_data(); |
|
68 | void setMax_data(); | |
93 | void setMax(); |
|
69 | void setMax(); | |
94 | void setMin_data(); |
|
70 | void setMin_data(); | |
95 | void setMin(); |
|
71 | void setMin(); | |
96 | void setRange_data(); |
|
72 | void setRange_data(); | |
97 | void setRange(); |
|
73 | void setRange(); | |
98 | void setShadesBorderColor_data(); |
|
|||
99 | void setShadesBorderColor(); |
|
|||
100 | void setShadesBrush_data(); |
|
|||
101 | void setShadesBrush(); |
|
|||
102 | void setShadesColor_data(); |
|
|||
103 | void setShadesColor(); |
|
|||
104 | void setShadesPen_data(); |
|
|||
105 | void setShadesPen(); |
|
|||
106 | void setShadesVisible_data(); |
|
|||
107 | void setShadesVisible(); |
|
|||
108 | void setVisible_data(); |
|
|||
109 | void setVisible(); |
|
|||
110 | void shadesBorderColor_data(); |
|
74 | void shadesBorderColor_data(); | |
111 | void shadesBorderColor(); |
|
75 | void shadesBorderColor(); | |
112 | void shadesBrush_data(); |
|
76 | void shadesBrush_data(); | |
113 | void shadesBrush(); |
|
77 | void shadesBrush(); | |
114 | void shadesColor_data(); |
|
78 | void shadesColor_data(); | |
115 | void shadesColor(); |
|
79 | void shadesColor(); | |
116 | void shadesPen_data(); |
|
80 | void shadesPen_data(); | |
117 | void shadesPen(); |
|
81 | void shadesPen(); | |
118 | void shadesVisible_data(); |
|
82 | void shadesVisible_data(); | |
119 | void shadesVisible(); |
|
83 | void shadesVisible(); | |
120 | void show_data(); |
|
84 | void show_data(); | |
121 | void show(); |
|
85 | void show(); | |
122 |
void |
|
86 | void hide_data(); | |
123 |
void |
|
87 | void hide(); | |
124 | void arrowVisibleChanged_data(); |
|
|||
125 | void arrowVisibleChanged(); |
|
|||
126 | void colorChanged_data(); |
|
|||
127 | void colorChanged(); |
|
|||
128 | void gridVisibleChanged_data(); |
|
|||
129 | void gridVisibleChanged(); |
|
|||
130 | void labelsColorChanged_data(); |
|
|||
131 | void labelsColorChanged(); |
|
|||
132 | void labelsVisibleChanged_data(); |
|
|||
133 | void labelsVisibleChanged(); |
|
|||
134 | void shadesBorderColorChanged_data(); |
|
|||
135 | void shadesBorderColorChanged(); |
|
|||
136 | void shadesColorChanged_data(); |
|
|||
137 | void shadesColorChanged(); |
|
|||
138 | void shadesVisibleChanged_data(); |
|
|||
139 | void shadesVisibleChanged(); |
|
|||
140 | void visibleChanged_data(); |
|
|||
141 | void visibleChanged(); |
|
|||
142 |
|
88 | |||
143 | protected: |
|
89 | protected: | |
144 | void qabstractaxis(); |
|
90 | void qabstractaxis(); | |
145 | protected: |
|
91 | protected: | |
146 | QChartView* m_view; |
|
92 | QChartView* m_view; | |
147 | QChart* m_chart; |
|
93 | QChart* m_chart; | |
148 | QAbstractAxis* m_axis; |
|
94 | QAbstractAxis* m_axis; | |
|
95 | QAbstractSeries* m_series; | |||
149 | }; |
|
96 | }; | |
150 |
|
97 | |||
151 | #endif |
|
98 | #endif |
@@ -1,351 +1,351 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #include "../qabstractaxis/tst_qabstractaxis.h" |
|
21 | #include "../qabstractaxis/tst_qabstractaxis.h" | |
22 | #include "qvaluesaxis.h" |
|
22 | #include "qvaluesaxis.h" | |
23 | #include <qlineseries.h> |
|
23 | #include <qlineseries.h> | |
24 |
|
24 | |||
25 | class tst_QValuesAxis: public tst_QAbstractAxis |
|
25 | class tst_QValuesAxis: public tst_QAbstractAxis | |
26 | { |
|
26 | { | |
27 | Q_OBJECT |
|
27 | Q_OBJECT | |
28 |
|
28 | |||
29 | public slots: |
|
29 | public slots: | |
30 | void initTestCase(); |
|
30 | void initTestCase(); | |
31 | void cleanupTestCase(); |
|
31 | void cleanupTestCase(); | |
32 | void init(); |
|
32 | void init(); | |
33 | void cleanup(); |
|
33 | void cleanup(); | |
34 |
|
34 | |||
35 | private slots: |
|
35 | private slots: | |
36 | void qvaluesaxis_data(); |
|
36 | void qvaluesaxis_data(); | |
37 | void qvaluesaxis(); |
|
37 | void qvaluesaxis(); | |
38 |
|
38 | |||
39 | void max_raw_data(); |
|
39 | void max_raw_data(); | |
40 | void max_raw(); |
|
40 | void max_raw(); | |
41 | void max_data(); |
|
41 | void max_data(); | |
42 | void max(); |
|
42 | void max(); | |
43 | void max_animation_data(); |
|
43 | void max_animation_data(); | |
44 | void max_animation(); |
|
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 | void min_animation_data(); |
|
49 | void min_animation_data(); | |
50 | void min_animation(); |
|
50 | void min_animation(); | |
51 | void niceNumbersEnabled_data(); |
|
51 | void niceNumbersEnabled_data(); | |
52 | void niceNumbersEnabled(); |
|
52 | void niceNumbersEnabled(); | |
53 | void range_raw_data(); |
|
53 | void range_raw_data(); | |
54 | void range_raw(); |
|
54 | void range_raw(); | |
55 | void range_data(); |
|
55 | void range_data(); | |
56 | void range(); |
|
56 | void range(); | |
57 | void range_animation_data(); |
|
57 | void range_animation_data(); | |
58 | void range_animation(); |
|
58 | void range_animation(); | |
59 | void ticksCount_data(); |
|
59 | void ticksCount_data(); | |
60 | void ticksCount(); |
|
60 | void ticksCount(); | |
61 |
|
61 | |||
62 | private: |
|
62 | private: | |
63 | QValuesAxis* m_valuesaxis; |
|
63 | QValuesAxis* m_valuesaxis; | |
64 | QLineSeries* m_series; |
|
64 | QLineSeries* m_series; | |
65 | }; |
|
65 | }; | |
66 |
|
66 | |||
67 | void tst_QValuesAxis::initTestCase() |
|
67 | void tst_QValuesAxis::initTestCase() | |
68 | { |
|
68 | { | |
69 | } |
|
69 | } | |
70 |
|
70 | |||
71 | void tst_QValuesAxis::cleanupTestCase() |
|
71 | void tst_QValuesAxis::cleanupTestCase() | |
72 | { |
|
72 | { | |
73 | } |
|
73 | } | |
74 |
|
74 | |||
75 | void tst_QValuesAxis::init() |
|
75 | void tst_QValuesAxis::init() | |
76 | { |
|
76 | { | |
77 | m_valuesaxis = new QValuesAxis(); |
|
77 | m_valuesaxis = new QValuesAxis(); | |
78 | tst_QAbstractAxis::init(m_valuesaxis); |
|
|||
79 | m_series = new QLineSeries(); |
|
78 | m_series = new QLineSeries(); | |
80 | *m_series << QPointF(-100, -100) << QPointF(0, 0) << QPointF(100, 100); |
|
79 | *m_series << QPointF(-100, -100) << QPointF(0, 0) << QPointF(100, 100); | |
|
80 | tst_QAbstractAxis::init(m_valuesaxis,m_series); | |||
81 | m_chart->addSeries(m_series); |
|
81 | m_chart->addSeries(m_series); | |
82 | m_chart->createDefaultAxes(); |
|
82 | m_chart->createDefaultAxes(); | |
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 | void tst_QValuesAxis::cleanup() |
|
85 | void tst_QValuesAxis::cleanup() | |
86 | { |
|
86 | { | |
87 | delete m_series; |
|
87 | delete m_series; | |
88 | delete m_valuesaxis; |
|
88 | delete m_valuesaxis; | |
89 | m_series = 0; |
|
89 | m_series = 0; | |
90 | m_valuesaxis = 0; |
|
90 | m_valuesaxis = 0; | |
91 | tst_QAbstractAxis::cleanup(); |
|
91 | tst_QAbstractAxis::cleanup(); | |
92 | } |
|
92 | } | |
93 |
|
93 | |||
94 | void tst_QValuesAxis::qvaluesaxis_data() |
|
94 | void tst_QValuesAxis::qvaluesaxis_data() | |
95 | { |
|
95 | { | |
96 | } |
|
96 | } | |
97 |
|
97 | |||
98 | void tst_QValuesAxis::qvaluesaxis() |
|
98 | void tst_QValuesAxis::qvaluesaxis() | |
99 | { |
|
99 | { | |
100 | qabstractaxis(); |
|
100 | qabstractaxis(); | |
101 |
|
101 | |||
102 | QVERIFY(qFuzzyIsNull(m_valuesaxis->max())); |
|
102 | QVERIFY(qFuzzyIsNull(m_valuesaxis->max())); | |
103 | QVERIFY(qFuzzyIsNull(m_valuesaxis->min())); |
|
103 | QVERIFY(qFuzzyIsNull(m_valuesaxis->min())); | |
104 | QCOMPARE(m_valuesaxis->niceNumbersEnabled(), false); |
|
104 | QCOMPARE(m_valuesaxis->niceNumbersEnabled(), false); | |
105 | QCOMPARE(m_valuesaxis->ticksCount(), 5); |
|
105 | QCOMPARE(m_valuesaxis->ticksCount(), 5); | |
106 | QCOMPARE(m_valuesaxis->type(), QAbstractAxis::AxisTypeValues); |
|
106 | QCOMPARE(m_valuesaxis->type(), QAbstractAxis::AxisTypeValues); | |
107 |
|
107 | |||
108 | m_chart->setAxisX(m_valuesaxis, m_series); |
|
108 | m_chart->setAxisX(m_valuesaxis, m_series); | |
109 | m_view->show(); |
|
109 | m_view->show(); | |
110 | QTest::qWaitForWindowShown(m_view); |
|
110 | QTest::qWaitForWindowShown(m_view); | |
111 |
|
111 | |||
112 | QVERIFY(!qFuzzyIsNull(m_valuesaxis->max())); |
|
112 | QVERIFY(!qFuzzyIsNull(m_valuesaxis->max())); | |
113 | QVERIFY(!qFuzzyIsNull(m_valuesaxis->min())); |
|
113 | QVERIFY(!qFuzzyIsNull(m_valuesaxis->min())); | |
114 | QCOMPARE(m_valuesaxis->niceNumbersEnabled(), false); |
|
114 | QCOMPARE(m_valuesaxis->niceNumbersEnabled(), false); | |
115 | QCOMPARE(m_valuesaxis->ticksCount(), 5); |
|
115 | QCOMPARE(m_valuesaxis->ticksCount(), 5); | |
116 | } |
|
116 | } | |
117 |
|
117 | |||
118 | void tst_QValuesAxis::max_raw_data() |
|
118 | void tst_QValuesAxis::max_raw_data() | |
119 | { |
|
119 | { | |
120 | QTest::addColumn<qreal>("max"); |
|
120 | QTest::addColumn<qreal>("max"); | |
121 | QTest::newRow("1.0") << 1.0; |
|
121 | QTest::newRow("1.0") << 1.0; | |
122 | QTest::newRow("50.0") << 50.0; |
|
122 | QTest::newRow("50.0") << 50.0; | |
123 | QTest::newRow("101.0") << 101.0; |
|
123 | QTest::newRow("101.0") << 101.0; | |
124 | } |
|
124 | } | |
125 |
|
125 | |||
126 | void tst_QValuesAxis::max_raw() |
|
126 | void tst_QValuesAxis::max_raw() | |
127 | { |
|
127 | { | |
128 | QFETCH(qreal, max); |
|
128 | QFETCH(qreal, max); | |
129 |
|
129 | |||
130 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); |
|
130 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); | |
131 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); |
|
131 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); | |
132 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); |
|
132 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); | |
133 |
|
133 | |||
134 | m_valuesaxis->setMax(max); |
|
134 | m_valuesaxis->setMax(max); | |
135 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->max() - max), "Not equal"); |
|
135 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->max() - max), "Not equal"); | |
136 |
|
136 | |||
137 | QCOMPARE(spy0.count(), 1); |
|
137 | QCOMPARE(spy0.count(), 1); | |
138 | QCOMPARE(spy1.count(), 0); |
|
138 | QCOMPARE(spy1.count(), 0); | |
139 | QCOMPARE(spy2.count(), 1); |
|
139 | QCOMPARE(spy2.count(), 1); | |
140 |
|
140 | |||
141 | } |
|
141 | } | |
142 |
|
142 | |||
143 | void tst_QValuesAxis::max_data() |
|
143 | void tst_QValuesAxis::max_data() | |
144 | { |
|
144 | { | |
145 | max_raw_data(); |
|
145 | max_raw_data(); | |
146 | } |
|
146 | } | |
147 |
|
147 | |||
148 | void tst_QValuesAxis::max() |
|
148 | void tst_QValuesAxis::max() | |
149 | { |
|
149 | { | |
150 | m_chart->setAxisX(m_valuesaxis, m_series); |
|
150 | m_chart->setAxisX(m_valuesaxis, m_series); | |
151 | m_view->show(); |
|
151 | m_view->show(); | |
152 | QTest::qWaitForWindowShown(m_view); |
|
152 | QTest::qWaitForWindowShown(m_view); | |
153 | max_raw(); |
|
153 | max_raw(); | |
154 | } |
|
154 | } | |
155 |
|
155 | |||
156 | void tst_QValuesAxis::max_animation_data() |
|
156 | void tst_QValuesAxis::max_animation_data() | |
157 | { |
|
157 | { | |
158 | max_data(); |
|
158 | max_data(); | |
159 | } |
|
159 | } | |
160 |
|
160 | |||
161 | void tst_QValuesAxis::max_animation() |
|
161 | void tst_QValuesAxis::max_animation() | |
162 | { |
|
162 | { | |
163 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); |
|
163 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); | |
164 | max(); |
|
164 | max(); | |
165 | } |
|
165 | } | |
166 |
|
166 | |||
167 | void tst_QValuesAxis::min_raw_data() |
|
167 | void tst_QValuesAxis::min_raw_data() | |
168 | { |
|
168 | { | |
169 | QTest::addColumn<qreal>("min"); |
|
169 | QTest::addColumn<qreal>("min"); | |
170 | QTest::newRow("-1.0") << -1.0; |
|
170 | QTest::newRow("-1.0") << -1.0; | |
171 | QTest::newRow("-50.0") << -50.0; |
|
171 | QTest::newRow("-50.0") << -50.0; | |
172 | QTest::newRow("-101.0") << -101.0; |
|
172 | QTest::newRow("-101.0") << -101.0; | |
173 | } |
|
173 | } | |
174 |
|
174 | |||
175 | void tst_QValuesAxis::min_raw() |
|
175 | void tst_QValuesAxis::min_raw() | |
176 | { |
|
176 | { | |
177 | QFETCH(qreal, min); |
|
177 | QFETCH(qreal, min); | |
178 |
|
178 | |||
179 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); |
|
179 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); | |
180 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); |
|
180 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); | |
181 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); |
|
181 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); | |
182 |
|
182 | |||
183 | m_valuesaxis->setMin(min); |
|
183 | m_valuesaxis->setMin(min); | |
184 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->min() - min), "Not equal"); |
|
184 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->min() - min), "Not equal"); | |
185 |
|
185 | |||
186 | QCOMPARE(spy0.count(), 0); |
|
186 | QCOMPARE(spy0.count(), 0); | |
187 | QCOMPARE(spy1.count(), 1); |
|
187 | QCOMPARE(spy1.count(), 1); | |
188 | QCOMPARE(spy2.count(), 1); |
|
188 | QCOMPARE(spy2.count(), 1); | |
189 | } |
|
189 | } | |
190 |
|
190 | |||
191 | void tst_QValuesAxis::min_data() |
|
191 | void tst_QValuesAxis::min_data() | |
192 | { |
|
192 | { | |
193 | min_raw_data(); |
|
193 | min_raw_data(); | |
194 | } |
|
194 | } | |
195 |
|
195 | |||
196 | void tst_QValuesAxis::min() |
|
196 | void tst_QValuesAxis::min() | |
197 | { |
|
197 | { | |
198 | m_chart->setAxisX(m_valuesaxis, m_series); |
|
198 | m_chart->setAxisX(m_valuesaxis, m_series); | |
199 | m_view->show(); |
|
199 | m_view->show(); | |
200 | QTest::qWaitForWindowShown(m_view); |
|
200 | QTest::qWaitForWindowShown(m_view); | |
201 | min_raw(); |
|
201 | min_raw(); | |
202 | } |
|
202 | } | |
203 |
|
203 | |||
204 | void tst_QValuesAxis::min_animation_data() |
|
204 | void tst_QValuesAxis::min_animation_data() | |
205 | { |
|
205 | { | |
206 | min_data(); |
|
206 | min_data(); | |
207 | } |
|
207 | } | |
208 |
|
208 | |||
209 | void tst_QValuesAxis::min_animation() |
|
209 | void tst_QValuesAxis::min_animation() | |
210 | { |
|
210 | { | |
211 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); |
|
211 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); | |
212 | min(); |
|
212 | min(); | |
213 | } |
|
213 | } | |
214 |
|
214 | |||
215 | void tst_QValuesAxis::niceNumbersEnabled_data() |
|
215 | void tst_QValuesAxis::niceNumbersEnabled_data() | |
216 | { |
|
216 | { | |
217 | QTest::addColumn<bool>("niceNumbersEnabled"); |
|
217 | QTest::addColumn<bool>("niceNumbersEnabled"); | |
218 | QTest::addColumn<qreal>("min"); |
|
218 | QTest::addColumn<qreal>("min"); | |
219 | QTest::addColumn<qreal>("max"); |
|
219 | QTest::addColumn<qreal>("max"); | |
220 | QTest::addColumn<int>("ticks"); |
|
220 | QTest::addColumn<int>("ticks"); | |
221 | QTest::addColumn<qreal>("expectedMin"); |
|
221 | QTest::addColumn<qreal>("expectedMin"); | |
222 | QTest::addColumn<qreal>("expectedMax"); |
|
222 | QTest::addColumn<qreal>("expectedMax"); | |
223 | QTest::addColumn<int>("expectedTicks"); |
|
223 | QTest::addColumn<int>("expectedTicks"); | |
224 | QTest::newRow("true 0.1 , 99.0 , 5") << true << 0.1 << 99.0 << 5 << 0.0 << 100.0 << 6; |
|
224 | QTest::newRow("true 0.1 , 99.0 , 5") << true << 0.1 << 99.0 << 5 << 0.0 << 100.0 << 6; | |
225 | QTest::newRow("true 1 , 10.0 , 5") << true << 1.0 << 10.0 << 5 << 0.0 << 10.0 << 6; |
|
225 | QTest::newRow("true 1 , 10.0 , 5") << true << 1.0 << 10.0 << 5 << 0.0 << 10.0 << 6; | |
226 | QTest::newRow("true 0.1 , 6.6 , 5") << true << 0.1 << 6.6 << 5 << 0.0 << 8.0 << 5; |
|
226 | QTest::newRow("true 0.1 , 6.6 , 5") << true << 0.1 << 6.6 << 5 << 0.0 << 8.0 << 5; | |
227 | QTest::newRow("false 0.1 , 6.6 , 5") << false << 0.1 << 6.6 << 5 << 0.1 << 6.6 << 5; |
|
227 | QTest::newRow("false 0.1 , 6.6 , 5") << false << 0.1 << 6.6 << 5 << 0.1 << 6.6 << 5; | |
228 | QTest::newRow("true 0.1, 99, 5") << true << 0.1 << 99.0 << 5 << 0.0 << 100.0 << 6; |
|
228 | QTest::newRow("true 0.1, 99, 5") << true << 0.1 << 99.0 << 5 << 0.0 << 100.0 << 6; | |
229 | QTest::newRow("true 5, 93.5 , 5") << true << 5.0 << 93.5 << 5 << 0.0 << 100.0 << 6; |
|
229 | QTest::newRow("true 5, 93.5 , 5") << true << 5.0 << 93.5 << 5 << 0.0 << 100.0 << 6; | |
230 | } |
|
230 | } | |
231 |
|
231 | |||
232 | void tst_QValuesAxis::niceNumbersEnabled() |
|
232 | void tst_QValuesAxis::niceNumbersEnabled() | |
233 | { |
|
233 | { | |
234 | QFETCH(bool, niceNumbersEnabled); |
|
234 | QFETCH(bool, niceNumbersEnabled); | |
235 | QFETCH(qreal, min); |
|
235 | QFETCH(qreal, min); | |
236 | QFETCH(qreal, max); |
|
236 | QFETCH(qreal, max); | |
237 | QFETCH(int, ticks); |
|
237 | QFETCH(int, ticks); | |
238 | QFETCH(qreal, expectedMin); |
|
238 | QFETCH(qreal, expectedMin); | |
239 | QFETCH(qreal, expectedMax); |
|
239 | QFETCH(qreal, expectedMax); | |
240 | QFETCH(int, expectedTicks); |
|
240 | QFETCH(int, expectedTicks); | |
241 |
|
241 | |||
242 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); |
|
242 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); | |
243 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); |
|
243 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); | |
244 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); |
|
244 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); | |
245 |
|
245 | |||
246 | m_valuesaxis->setNiceNumbersEnabled(niceNumbersEnabled); |
|
246 | m_valuesaxis->setNiceNumbersEnabled(niceNumbersEnabled); | |
247 | QCOMPARE(m_valuesaxis->niceNumbersEnabled(), niceNumbersEnabled); |
|
247 | QCOMPARE(m_valuesaxis->niceNumbersEnabled(), niceNumbersEnabled); | |
248 |
|
248 | |||
249 | QCOMPARE(spy0.count(), 0); |
|
249 | QCOMPARE(spy0.count(), 0); | |
250 | QCOMPARE(spy1.count(), 0); |
|
250 | QCOMPARE(spy1.count(), 0); | |
251 | QCOMPARE(spy2.count(), 0); |
|
251 | QCOMPARE(spy2.count(), 0); | |
252 |
|
252 | |||
253 | m_valuesaxis->setTicksCount(ticks); |
|
253 | m_valuesaxis->setTicksCount(ticks); | |
254 | m_valuesaxis->setRange(min, max); |
|
254 | m_valuesaxis->setRange(min, max); | |
255 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->min() - expectedMin), "Min not equal"); |
|
255 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->min() - expectedMin), "Min not equal"); | |
256 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->max() - expectedMax), "Max not equal"); |
|
256 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->max() - expectedMax), "Max not equal"); | |
257 | QCOMPARE(m_valuesaxis->ticksCount(), expectedTicks); |
|
257 | QCOMPARE(m_valuesaxis->ticksCount(), expectedTicks); | |
258 |
|
258 | |||
259 | QCOMPARE(spy0.count(), 1); |
|
259 | QCOMPARE(spy0.count(), 1); | |
260 | QCOMPARE(spy1.count(), 1); |
|
260 | QCOMPARE(spy1.count(), 1); | |
261 | QCOMPARE(spy2.count(), 1); |
|
261 | QCOMPARE(spy2.count(), 1); | |
262 |
|
262 | |||
263 | } |
|
263 | } | |
264 |
|
264 | |||
265 | void tst_QValuesAxis::range_raw_data() |
|
265 | void tst_QValuesAxis::range_raw_data() | |
266 | { |
|
266 | { | |
267 | QTest::addColumn<qreal>("min"); |
|
267 | QTest::addColumn<qreal>("min"); | |
268 | QTest::addColumn<qreal>("max"); |
|
268 | QTest::addColumn<qreal>("max"); | |
269 | QTest::newRow("1.0 - 101.0") << -1.0 << 101.0; |
|
269 | QTest::newRow("1.0 - 101.0") << -1.0 << 101.0; | |
270 | QTest::newRow("25.0 - 75.0") << 25.0 << 75.0; |
|
270 | QTest::newRow("25.0 - 75.0") << 25.0 << 75.0; | |
271 | QTest::newRow("101.0") << 40.0 << 60.0; |
|
271 | QTest::newRow("101.0") << 40.0 << 60.0; | |
272 | } |
|
272 | } | |
273 |
|
273 | |||
274 | void tst_QValuesAxis::range_raw() |
|
274 | void tst_QValuesAxis::range_raw() | |
275 | { |
|
275 | { | |
276 | QFETCH(qreal, min); |
|
276 | QFETCH(qreal, min); | |
277 | QFETCH(qreal, max); |
|
277 | QFETCH(qreal, max); | |
278 |
|
278 | |||
279 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); |
|
279 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); | |
280 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); |
|
280 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); | |
281 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); |
|
281 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); | |
282 |
|
282 | |||
283 | m_valuesaxis->setRange(min, max); |
|
283 | m_valuesaxis->setRange(min, max); | |
284 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->min() - min), "Min not equal"); |
|
284 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->min() - min), "Min not equal"); | |
285 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->max() - max), "Max not equal"); |
|
285 | QVERIFY2(qFuzzyIsNull(m_valuesaxis->max() - max), "Max not equal"); | |
286 |
|
286 | |||
287 | QCOMPARE(spy0.count(), 1); |
|
287 | QCOMPARE(spy0.count(), 1); | |
288 | QCOMPARE(spy1.count(), 1); |
|
288 | QCOMPARE(spy1.count(), 1); | |
289 | QCOMPARE(spy2.count(), 1); |
|
289 | QCOMPARE(spy2.count(), 1); | |
290 | } |
|
290 | } | |
291 |
|
291 | |||
292 | void tst_QValuesAxis::range_data() |
|
292 | void tst_QValuesAxis::range_data() | |
293 | { |
|
293 | { | |
294 | range_raw_data(); |
|
294 | range_raw_data(); | |
295 | } |
|
295 | } | |
296 |
|
296 | |||
297 | void tst_QValuesAxis::range() |
|
297 | void tst_QValuesAxis::range() | |
298 | { |
|
298 | { | |
299 | m_chart->setAxisX(m_valuesaxis, m_series); |
|
299 | m_chart->setAxisX(m_valuesaxis, m_series); | |
300 | m_view->show(); |
|
300 | m_view->show(); | |
301 | QTest::qWaitForWindowShown(m_view); |
|
301 | QTest::qWaitForWindowShown(m_view); | |
302 | range_raw(); |
|
302 | range_raw(); | |
303 | } |
|
303 | } | |
304 |
|
304 | |||
305 | void tst_QValuesAxis::range_animation_data() |
|
305 | void tst_QValuesAxis::range_animation_data() | |
306 | { |
|
306 | { | |
307 | range_data(); |
|
307 | range_data(); | |
308 | } |
|
308 | } | |
309 |
|
309 | |||
310 | void tst_QValuesAxis::range_animation() |
|
310 | void tst_QValuesAxis::range_animation() | |
311 | { |
|
311 | { | |
312 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); |
|
312 | m_chart->setAnimationOptions(QChart::GridAxisAnimations); | |
313 | range(); |
|
313 | range(); | |
314 | } |
|
314 | } | |
315 |
|
315 | |||
316 | void tst_QValuesAxis::ticksCount_data() |
|
316 | void tst_QValuesAxis::ticksCount_data() | |
317 | { |
|
317 | { | |
318 | QTest::addColumn<int>("ticksCount"); |
|
318 | QTest::addColumn<int>("ticksCount"); | |
319 | QTest::addColumn<int>("expectedCount"); |
|
319 | QTest::addColumn<int>("expectedCount"); | |
320 | QTest::newRow("0") << 2; |
|
320 | QTest::newRow("0") << 2; | |
321 | QTest::newRow("1") << 2; |
|
321 | QTest::newRow("1") << 2; | |
322 | QTest::newRow("2") << 2; |
|
322 | QTest::newRow("2") << 2; | |
323 | QTest::newRow("3") << 3; |
|
323 | QTest::newRow("3") << 3; | |
324 | QTest::newRow("-1") << 2; |
|
324 | QTest::newRow("-1") << 2; | |
325 | } |
|
325 | } | |
326 |
|
326 | |||
327 | void tst_QValuesAxis::ticksCount() |
|
327 | void tst_QValuesAxis::ticksCount() | |
328 | { |
|
328 | { | |
329 | QFETCH(int, ticksCount); |
|
329 | QFETCH(int, ticksCount); | |
330 |
|
330 | |||
331 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); |
|
331 | QSignalSpy spy0(m_valuesaxis, SIGNAL(maxChanged(qreal))); | |
332 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); |
|
332 | QSignalSpy spy1(m_valuesaxis, SIGNAL(minChanged(qreal))); | |
333 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); |
|
333 | QSignalSpy spy2(m_valuesaxis, SIGNAL(rangeChanged(qreal, qreal))); | |
334 |
|
334 | |||
335 | m_valuesaxis->setTicksCount(ticksCount); |
|
335 | m_valuesaxis->setTicksCount(ticksCount); | |
336 | QCOMPARE(m_valuesaxis->ticksCount(), ticksCount); |
|
336 | QCOMPARE(m_valuesaxis->ticksCount(), ticksCount); | |
337 |
|
337 | |||
338 | QCOMPARE(spy0.count(), 0); |
|
338 | QCOMPARE(spy0.count(), 0); | |
339 | QCOMPARE(spy1.count(), 0); |
|
339 | QCOMPARE(spy1.count(), 0); | |
340 | QCOMPARE(spy2.count(), 0); |
|
340 | QCOMPARE(spy2.count(), 0); | |
341 |
|
341 | |||
342 | m_chart->setAxisX(m_valuesaxis, m_series); |
|
342 | m_chart->setAxisX(m_valuesaxis, m_series); | |
343 | m_view->show(); |
|
343 | m_view->show(); | |
344 | QTest::qWaitForWindowShown(m_view); |
|
344 | QTest::qWaitForWindowShown(m_view); | |
345 |
|
345 | |||
346 | QCOMPARE(m_valuesaxis->ticksCount(), ticksCount); |
|
346 | QCOMPARE(m_valuesaxis->ticksCount(), ticksCount); | |
347 | } |
|
347 | } | |
348 |
|
348 | |||
349 | QTEST_MAIN(tst_QValuesAxis) |
|
349 | QTEST_MAIN(tst_QValuesAxis) | |
350 | #include "tst_qvaluesaxis.moc" |
|
350 | #include "tst_qvaluesaxis.moc" | |
351 |
|
351 |
General Comments 0
You need to be logged in to leave comments.
Login now