From 75ee61e20cea015448771efe816b841bb2147f34 Mon Sep 17 00:00:00 2001 From: kat Date: Tue, 6 Feb 2024 19:28:16 -0500 Subject: New Tab Redesign - Adds some fixes for Animation, an Update info support class and other small things required --- ui/animation.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'ui/animation.h') diff --git a/ui/animation.h b/ui/animation.h index cf5498b5..3bbd5b70 100644 --- a/ui/animation.h +++ b/ui/animation.h @@ -23,11 +23,6 @@ class SceneManager; \ingroup uiapi */ -enum AnimationDirection -{ - Forwards, - Backwards -}; /*! Animation is a helper class for setting up UI animations. Animations can be created as standalone objects (for simpler single-item animations), and can also be used @@ -55,21 +50,21 @@ class BINARYNINJAUIAPI Animation : public QVariantAnimation std::string m_name; bool m_overrideReducedAnimations = false; - AnimationDirection m_direction = Forwards; + QAbstractAnimation::Direction m_direction = QAbstractAnimation::Forward; bool m_ownerDestroyed = false; std::unordered_map> m_properties; std::vector> m_callbacks; - std::vector> m_startCallbacks; - std::vector> m_endCallbacks; + std::vector> m_startCallbacks; + std::vector> m_endCallbacks; friend SceneManager; void addPropertyCallback(QObject* obj, QString property); void addCallback(std::function callback); - void addStartCallback(std::function startCallback); - void addEndCallback(std::function endCallback); + void addStartCallback(std::function startCallback); + void addEndCallback(std::function endCallback); Animation(QObject* owner = nullptr); Animation* invertDirection(); @@ -147,7 +142,7 @@ public: \param startCallback Function to be called \return Pointer to this \c Animation object */ - Animation* thenOnStart(std::function startCallback); + Animation* thenOnStart(std::function startCallback); /*! Callback to fire when this animation's progress is updated. This is where the bulk of your animation logic will go. @@ -187,7 +182,7 @@ public: \param endCallback Function to be called \return Pointer to this \c Animation object */ - Animation* thenOnEnd(std::function endCallback); + Animation* thenOnEnd(std::function endCallback); /// ONLY use this if you are doing something like a loading spinner. AVOID IT Animation* overridingReducedAnimationsForAVeryGoodReason() -- cgit v1.3.1