##// END OF EJS Templates
Update tst_qchartview, removes unused functions
Michal Klocek -
r1052:b4240feb6228
parent child
Show More
@@ -48,8 +48,6 private Q_SLOTS:
48 48 void chart();
49 49 void rubberBand_data();
50 50 void rubberBand();
51 void keys_data();
52 void keys();
53 51
54 52 private:
55 53 QChartView* m_view;
@@ -151,7 +149,6 void tst_QChartView::rubberBand()
151 149 QSignalSpy spy1(axisX, SIGNAL(rangeChanged(qreal,qreal)));
152 150
153 151 QTest::qWaitForWindowShown(m_view);
154 QTest::qWait(500);
155 152 QTest::mouseMove(m_view->viewport(), QPoint(minX, minY) + padding.topLeft().toPoint());
156 153 QTest::mousePress(m_view->viewport(), Qt::LeftButton, 0, QPoint(minX, minY) + padding.topLeft().toPoint());
157 154 QTest::mouseMove(m_view->viewport(), QPoint(maxX, maxY) + padding.topLeft().toPoint());
@@ -169,52 +166,6 void tst_QChartView::rubberBand()
169 166 QVERIFY(axisY->max() - maxY < 1);
170 167 }
171 168
172 void tst_QChartView::keys_data()
173 {
174 /*
175 QTest::addColumn<Qt::Key>("key");
176 QTest::addColumn<int>("Xcount");
177 QTest::addColumn<int>("Ycount");
178 QTest::newRow("Qt::Key_Plus") << Qt::Key_Plus << 1 << 1;
179 QTest::newRow("Qt::Key_Minus") << Qt::Key_Minus << 1 << 1;
180 QTest::newRow("Qt::Key_Up") << Qt::Key_Up << 0 << 1;
181 QTest::newRow("Qt::Key_Down") << Qt::Key_Down << 0 << 1;
182 QTest::newRow("Qt::Key_Left") << Qt::Key_Left << 1 << 0;
183 QTest::newRow("Qt::Key_Right") << Qt::Key_Right << 1 << 0;
184 */
185 QSKIP("Test is not implemented.", SkipAll);
186 }
187
188 void tst_QChartView::keys()
189 {
190 /*
191 QFETCH(Qt::Key,key);
192 QFETCH(int, Xcount);
193 QFETCH(int, Ycount);
194
195 QRectF padding = m_view->chart()->margins();
196
197 QLineSeries* line = new QLineSeries();
198 *line << QPointF(0, 0) << QPointF(100, 100);
199
200 m_view->chart()->addSeries(line);
201 m_view->resize(100 + padding.left() + padding.right(), 100 + padding.top()+ padding.bottom());
202 m_view->show();
203
204 QAxis* axisY = m_view->chart()->axisY();
205 QSignalSpy spy0(axisY, SIGNAL(rangeChanged(qreal,qreal)));
206 QAxis* axisX = m_view->chart()->axisX();
207 QSignalSpy spy1(axisX, SIGNAL(rangeChanged(qreal,qreal)));
208
209 QTest::keyPress(m_view, key);
210 QTest::keyRelease(m_view, key);
211
212 QCOMPARE(spy0.count(), Ycount);
213 QCOMPARE(spy1.count(), Xcount);
214 */
215
216 }
217
218 169 QTEST_MAIN(tst_QChartView)
219 170 #include "tst_qchartview.moc"
220 171
General Comments 0
You need to be logged in to leave comments. Login now