From 1961ff954c4df4a437bb0e9375fd8bdcb643a88a Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 15 Jan 2018 17:32:44 +0200 Subject: Add QML type and C++ class for data input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QML type is DataInput. C++ class is Q3DSDataInput. Task-number: QT3DS-387 Change-Id: I7f871ae3e1149adee7859fdb8f844e8f90837264 Reviewed-by: Tomi Korpipää --- .../q3dssurfaceviewer/tst_q3dssurfaceviewer.cpp | 21 +++++++++++++++ .../studio3d/shared/presentation/datainput.uip | 31 ++++++++++++++++++++++ tests/auto/studio3d/shared/shared_presentations.h | 1 + .../auto/studio3d/shared/shared_presentations.qrc | 1 + 4 files changed, 54 insertions(+) create mode 100644 tests/auto/studio3d/shared/presentation/datainput.uip (limited to 'tests') diff --git a/tests/auto/studio3d/q3dssurfaceviewer/tst_q3dssurfaceviewer.cpp b/tests/auto/studio3d/q3dssurfaceviewer/tst_q3dssurfaceviewer.cpp index ef3cb942..40cbe210 100644 --- a/tests/auto/studio3d/q3dssurfaceviewer/tst_q3dssurfaceviewer.cpp +++ b/tests/auto/studio3d/q3dssurfaceviewer/tst_q3dssurfaceviewer.cpp @@ -82,6 +82,8 @@ private slots: void testElement(); void testMouseInput_data(); void testMouseInput(); + void testDataInput_data(); + void testDataInput(); private: QWindow *createWindow(const QSize &size); @@ -1472,6 +1474,25 @@ void tst_Q3DSSurfaceViewer::testMouseInput() // Note: No way yet to hook mouse move into anything in the presentation } +void tst_Q3DSSurfaceViewer::testDataInput_data() +{ + testBasics_data(); +} + +void tst_Q3DSSurfaceViewer::testDataInput() +{ +// QFETCH(bool, isWindow); + +// if (isWindow) +// createWindowAndViewer(m_viewer, DATAINPUT); +// else +// createOffscreenAndViewer(m_viewer, DATAINPUT); + + // TODO: This is a placeholder for data input test. To be finished when proper support + // for changing animation time via data inputs is supported and the display bugs fixed. + // See: https://bugreports.qt.io/browse/QT3DS-854 +} + QTEST_MAIN(tst_Q3DSSurfaceViewer) diff --git a/tests/auto/studio3d/shared/presentation/datainput.uip b/tests/auto/studio3d/shared/presentation/datainput.uip new file mode 100644 index 00000000..e2464527 --- /dev/null +++ b/tests/auto/studio3d/shared/presentation/datainput.uip @@ -0,0 +1,31 @@ + + + + + #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/studio3d/shared/shared_presentations.h b/tests/auto/studio3d/shared/shared_presentations.h index c778b453..b1d23e0e 100644 --- a/tests/auto/studio3d/shared/shared_presentations.h +++ b/tests/auto/studio3d/shared/shared_presentations.h @@ -36,3 +36,4 @@ const QUrl ANIMATION = QUrl(QStringLiteral("qrc:/animation.uip")); const QUrl SETTINGS = QUrl(QStringLiteral("qrc:/settings.uip")); const QUrl MULTISLIDE = QUrl(QStringLiteral("qrc:/multislide.uip")); const QUrl MOUSE = QUrl(QStringLiteral("qrc:/mouse.uip")); +const QUrl DATAINPUT = QUrl(QStringLiteral("qrc:/datinput.uip")); diff --git a/tests/auto/studio3d/shared/shared_presentations.qrc b/tests/auto/studio3d/shared/shared_presentations.qrc index a68dae72..00877c26 100644 --- a/tests/auto/studio3d/shared/shared_presentations.qrc +++ b/tests/auto/studio3d/shared/shared_presentations.qrc @@ -8,5 +8,6 @@ presentation/settings.uip presentation/multislide.uip presentation/mouse.uip + presentation/datainput.uip -- cgit v1.2.3