diff options
author | Christian Strømme <christian.stromme@qt.io> | 2018-10-28 13:51:55 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-10-29 13:21:35 +0000 |
commit | 82cfec43ab454a9bb2c26a4d738d49b338e88000 (patch) | |
tree | 7a46808f41756e3979b5aff2c247d53035fa3fb6 | |
parent | e946bad5624fbaf9c297972a2c2b4316aae9baa8 (diff) |
Change PlayerType names to Scene and Component
... the names Slide and ComponentSlide doesn't make much sense.
Change-Id: I19d76012625d4d5c2eb4ed379305c21586678455
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r-- | src/runtime/q3dsslideplayer.cpp | 16 | ||||
-rw-r--r-- | src/runtime/q3dsslideplayer_p.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/runtime/q3dsslideplayer.cpp b/src/runtime/q3dsslideplayer.cpp index 7f1e778..a8697d6 100644 --- a/src/runtime/q3dsslideplayer.cpp +++ b/src/runtime/q3dsslideplayer.cpp @@ -378,7 +378,7 @@ void Q3DSSlidePlayer::sceneReady() const bool viewerMode = (m_mode == PlayerMode::Viewer); - if (viewerMode && m_type == PlayerType::Slide && (currentSlide->initialPlayState() == Q3DSSlide::Play)) + if (viewerMode && m_type == PlayerType::Scene && (currentSlide->initialPlayState() == Q3DSSlide::Play)) play(); else pause(); @@ -634,7 +634,7 @@ Q3DSSlidePlayer::Q3DSSlidePlayer(QSharedPointer<Q3DSAnimationManager> animationM m_component(component), m_animationManager(animationManager), m_mode(parent->mode()), - m_type(PlayerType::ComponentSlide) + m_type(PlayerType::Component) { } @@ -657,7 +657,7 @@ void Q3DSSlidePlayer::setInternalState(Q3DSSlidePlayer::PlayerState state) // The current slide is stored in the scene manager or in the component, depending // on which type of player we are. - Q3DSSlide *previousSlide = (m_type == PlayerType::Slide) ? m_sceneManager->currentSlide() + Q3DSSlide *previousSlide = (m_type == PlayerType::Scene) ? m_sceneManager->currentSlide() : m_component->currentSlide(); // When going from Idle to X there's no previous slide, so correct the @@ -718,7 +718,7 @@ void Q3DSSlidePlayer::handleCurrentSlideChanged(Q3DSSlide *slide, Q3DSSlide *pre const auto queueSlideEvent = [this](Q3DSSlide *slide, const QString &evName) { Q3DSGraphObject *eventTarget = m_sceneManager->m_scene; - if (m_type != PlayerType::Slide) + if (m_type != PlayerType::Scene) eventTarget = m_component; const QVariantList args { @@ -755,7 +755,7 @@ void Q3DSSlidePlayer::handleCurrentSlideChanged(Q3DSSlide *slide, Q3DSSlide *pre // 2. Apply properties for this slide (update eyeball values and keep values for dynamic kf. etc.). if (slide) { // A bit crude, but whatever - if (m_type == PlayerType::Slide) + if (m_type == PlayerType::Scene) m_sceneManager->m_currentSlide = slide; else m_component->setCurrentSlide(slide); @@ -801,7 +801,7 @@ void Q3DSSlidePlayer::handleCurrentSlideChanged(Q3DSSlide *slide, Q3DSSlide *pre // If this is the top scene player also sync the scene. if (m_data.pendingState != PlayerState::Playing) { flushQueuedChanges(); - if (m_type == PlayerType::Slide) + if (m_type == PlayerType::Scene) m_sceneManager->syncScene(); } @@ -825,7 +825,7 @@ void Q3DSSlidePlayer::setSlideTime(Q3DSSlide *slide, float time, bool forceUpdat bool parentVisible = true; // If this is a component player, then check if the component is visible. - if (m_type == Q3DSSlidePlayer::PlayerType::ComponentSlide) { + if (m_type == Q3DSSlidePlayer::PlayerType::Component) { // Since we can be called from another slide, check if there's a pending visibility // update for us. const auto foundIt = m_sceneManager->m_pendingObjectVisibility.constFind(m_component); @@ -1107,7 +1107,7 @@ void Q3DSSlidePlayer::evaluateDynamicObjectVisibility(Q3DSGraphObject *obj) { bool parentVisible = true; // If this is a component player, then check if the component is visible. - if (m_type == Q3DSSlidePlayer::PlayerType::ComponentSlide) { + if (m_type == Q3DSSlidePlayer::PlayerType::Component) { // Since we can be called from another slide, check if there's a pending visibility // update for us. const auto foundIt = m_sceneManager->m_pendingObjectVisibility.constFind(m_component); diff --git a/src/runtime/q3dsslideplayer_p.h b/src/runtime/q3dsslideplayer_p.h index 2e8b637..7886489 100644 --- a/src/runtime/q3dsslideplayer_p.h +++ b/src/runtime/q3dsslideplayer_p.h @@ -84,8 +84,8 @@ public: enum class PlayerType { - Slide, - ComponentSlide + Scene, + Component }; Q_ENUM(PlayerType) @@ -168,7 +168,7 @@ private: Q3DSComponentNode *m_component = nullptr; QSharedPointer<Q3DSAnimationManager> m_animationManager; PlayerMode m_mode = PlayerMode::Viewer; - PlayerType m_type = PlayerType::Slide; + PlayerType m_type = PlayerType::Scene; QVector<std::function<void()>> m_queuedChanges; |