diff options
author | Christian Strømme <christian.stromme@qt.io> | 2018-12-05 11:05:06 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-12-10 12:06:58 +0000 |
commit | efd642d9221bcd1ddb80a58e12868f3c40648cc9 (patch) | |
tree | 10078ada99d877429192d00009e6acbb60a7a1d2 /tests | |
parent | bfc9ea8f4e33702ed6af46b74621c75258b66ce8 (diff) |
DragonsWings
This adds the basis for the dragon wings animation system, which is a
light weight animator that works directly with the qt3ds' graph objects.
To enable it pass --dragon-wings to the viewer or set the env variable
DRAGONWINGS.
Change-Id: I4403b1ac5f8c96a62993fa2043af9c611be64abb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/slidedeck/tst_slidedeck.cpp | 4 | ||||
-rw-r--r-- | tests/auto/slideplayer/tst_q3dsslideplayer.cpp | 8 | ||||
-rw-r--r-- | tests/auto/slides/tst_q3dsslides.cpp | 6 | ||||
-rw-r--r-- | tests/manual/qt3dsexplorer/slideexplorerwidget.cpp | 4 | ||||
-rw-r--r-- | tests/manual/qt3dsexplorer/slideexplorerwidget.h | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/slidedeck/tst_slidedeck.cpp b/tests/auto/slidedeck/tst_slidedeck.cpp index 25840e6..5acc4ff 100644 --- a/tests/auto/slidedeck/tst_slidedeck.cpp +++ b/tests/auto/slidedeck/tst_slidedeck.cpp @@ -98,7 +98,7 @@ void tst_slidedeck::nextSlide() Q3DSGraphObject *ns = m_masterSlide->firstChild(); while (ns) { QVERIFY(slideDeck.currentSlide() == ns); - QVERIFY(slideDeck.nextSlide() == ns->nextSibling()); + QVERIFY(slideDeck.goToNextSlide() == ns->nextSibling()); ns = ns->nextSibling(); } } @@ -112,7 +112,7 @@ void tst_slidedeck::previousSlide() Q3DSGraphObject *ns = m_masterSlide->lastChild(); while (ns) { QVERIFY(slideDeck.currentSlide() == ns); - QVERIFY(slideDeck.previousSlide() == ns->previousSibling()); + QVERIFY(slideDeck.gotToPreviousSlide() == ns->previousSibling()); ns = ns->previousSibling(); } } diff --git a/tests/auto/slideplayer/tst_q3dsslideplayer.cpp b/tests/auto/slideplayer/tst_q3dsslideplayer.cpp index 96fa78b..a199eb8 100644 --- a/tests/auto/slideplayer/tst_q3dsslideplayer.cpp +++ b/tests/auto/slideplayer/tst_q3dsslideplayer.cpp @@ -155,7 +155,7 @@ void tst_Q3DSSlidePlayer::tst_slideDeck() void tst_Q3DSSlidePlayer::tst_playModes() { - Q3DSSlidePlayer *player = m_sceneManager->slidePlayer(); + Q3DSAbstractSlidePlayer *player = m_sceneManager->slidePlayer(); QVERIFY(player); struct LoopCounter { @@ -165,7 +165,7 @@ void tst_Q3DSSlidePlayer::tst_playModes() void reset() { counter = 0; pingPong = 0; started = false; } } loopCounter; - connect(player, &Q3DSSlidePlayer::positionChanged, [player, &loopCounter](float pos) { + connect(player, &Q3DSAbstractSlidePlayer::positionChanged, [player, &loopCounter](float pos) { if (loopCounter.started && (pos == player->duration())) ++loopCounter.counter; if (loopCounter.started && (pos == 0.0f)) @@ -174,8 +174,8 @@ void tst_Q3DSSlidePlayer::tst_playModes() if (!loopCounter.started) loopCounter.started = true; }); - QSignalSpy slideChangedSpy(player, &Q3DSSlidePlayer::slideChanged); - QSignalSpy stateChangeSpy(player, &Q3DSSlidePlayer::stateChanged); + QSignalSpy slideChangedSpy(player, &Q3DSAbstractSlidePlayer::slideChanged); + QSignalSpy stateChangeSpy(player, &Q3DSAbstractSlidePlayer::stateChanged); // PLAY TO NEXT player->stop(); diff --git a/tests/auto/slides/tst_q3dsslides.cpp b/tests/auto/slides/tst_q3dsslides.cpp index 59d8809..59f57cb 100644 --- a/tests/auto/slides/tst_q3dsslides.cpp +++ b/tests/auto/slides/tst_q3dsslides.cpp @@ -260,7 +260,7 @@ void tst_Q3DSSlides::setPresentationSlides() QSignalSpy m_updateSpy(m_engine, SIGNAL(nextFrameStarting())); m_updateSpy.wait(30); - Q3DSSlidePlayer *player = m_sceneManager->slidePlayer(); + Q3DSAbstractSlidePlayer *player = m_sceneManager->slidePlayer(); player->stop(); QVERIFY(player); @@ -591,7 +591,7 @@ void tst_Q3DSSlides::testTimeLineVisibility() QVERIFY(!isNodeVisible(m_slide5Rect)); QVERIFY(isNodeVisible(m_slide5Sphere)); - Q3DSSlidePlayer *player = m_sceneManager->slidePlayer(); + Q3DSAbstractSlidePlayer *player = m_sceneManager->slidePlayer(); player->stop(); QVERIFY(player); @@ -607,7 +607,7 @@ void tst_Q3DSSlides::testTimeLineVisibility() m_sceneManager->setComponentCurrentSlide(m_componentSlide51); Q_ASSERT(m_componentSlide5MasterSlide == m_slide5Component->masterSlide()); - Q3DSSlidePlayer *compPlayer = m_componentSlide5MasterSlide->attached<Q3DSSlideAttached>()->slidePlayer; + Q3DSAbstractSlidePlayer *compPlayer = m_componentSlide5MasterSlide->attached<Q3DSSlideAttached>()->slidePlayer; compPlayer->stop(); QVERIFY(compPlayer); diff --git a/tests/manual/qt3dsexplorer/slideexplorerwidget.cpp b/tests/manual/qt3dsexplorer/slideexplorerwidget.cpp index 816c53b..cde3694 100644 --- a/tests/manual/qt3dsexplorer/slideexplorerwidget.cpp +++ b/tests/manual/qt3dsexplorer/slideexplorerwidget.cpp @@ -202,7 +202,7 @@ void SlideExplorerWidget::handleSelectionChanged(const QModelIndex &index) // Get the master slide, it has the slide player for this slide Q3DSSlide *masterSlide = static_cast<Q3DSSlide *>(slide->parent()); qDebug("Getting player from master slide %s", qPrintable(masterSlide->name())); - Q3DSSlidePlayer *player = masterSlide->attached<Q3DSSlideAttached>()->slidePlayer; + Q3DSAbstractSlidePlayer *player = masterSlide->attached<Q3DSSlideAttached>()->slidePlayer; Q_ASSERT(player); player->slideDeck()->setCurrentSlide(index.row()); } @@ -344,7 +344,7 @@ void SlideExplorerWidget::updateModel() if (!data) return; - Q3DSSlidePlayer *player = data->slidePlayer; + Q3DSAbstractSlidePlayer *player = data->slidePlayer; if (m_slidePlayer && m_slidePlayer != player) disconnect(m_slidePlayer); diff --git a/tests/manual/qt3dsexplorer/slideexplorerwidget.h b/tests/manual/qt3dsexplorer/slideexplorerwidget.h index 2985e09..1a6bbad 100644 --- a/tests/manual/qt3dsexplorer/slideexplorerwidget.h +++ b/tests/manual/qt3dsexplorer/slideexplorerwidget.h @@ -44,7 +44,7 @@ class QSpinBox; class SlideListModel; class QPushButton; class QCheckBox; -class Q3DSSlidePlayer; +class Q3DSAbstractSlidePlayer; class SlideExplorerWidget : public QWidget { @@ -74,7 +74,7 @@ private: Q3DSComponentNode *m_component = nullptr; Q3DSUipPresentation *m_presentation = nullptr; Q3DSSceneManager *m_sceneManager = nullptr; - Q3DSSlidePlayer *m_slidePlayer = nullptr; + Q3DSAbstractSlidePlayer *m_slidePlayer = nullptr; QListView *m_slideListView; QPushButton *m_nextSlideButton; |