34#include <NDEVR/PopupInfo.h>
35#include <NDEVR/Dictionary.h>
37#include <QPropertyAnimation>
38#include <QGraphicsOpacityEffect>
90 void setup(
int duration,
int start_delay,
bool ignore_max_min_size);
101 return m_active_size;
124 bool eventFilter(QObject*
object, QEvent* event)
override;
152 void onFinishedSlot();
154 void setupSourceWidget(QWidget* source_widget, QSize size);
155 void createFadeInAnimation(
int msec);
156 QRect getGeometry(
double percent);
165 QSize m_restore_max_widget_size;
166 QSize m_restore_min_widget_size;
167 QPointer<QPropertyAnimation> m_primary_animation =
nullptr;
168 QPointer<QGraphicsOpacityEffect> m_fade_primary_effect;
169 QPointer<ImageView> m_primary_image_view;
170 QPointer<QWidget> m_widget;
171 QPointer<QWidget> m_animation_widget;
172 QWidget* m_widget_key =
nullptr;
177 bool m_delete_on_end;
178 Qt::WindowFlags m_original_flags;
180 static QWidget* s_top_level_widget;
A hash-based key-value store, useful for quick associative lookups.
A widget that shows a raster image or icon.
ResizeVisibleAnimation(QWidget *widget, bool visible, PopupInfo start_location, PopupInfo end_location, int duration=300, int delay=0)
Constructs a resize animation that animates a widget between two popup locations.
static ResizeVisibleAnimation * runRemove(QWidget *widget, bool vertical, int duration=-1, int delay=0)
Creates and runs a hide-then-remove animation for a widget.
void startAnimation()
Slot that starts the animation after any configured delay.
static ResizeVisibleAnimation * run(QWidget *widget, bool visible, bool vertical, int duration=-1, int delay=0)
Creates and runs a resize animation for showing or hiding a widget.
void finishedSignal()
Signal emitted when the animation finishes.
void setDeleteWidgetOnEnd(bool delete_widget)
Sets whether the widget should be deleted when the animation finishes.
static ResizeVisibleAnimation * run(QWidget *widget, bool visible, const PopupInfo &start_location, const PopupInfo &end_location, int duration=-1, int delay=0)
Creates and runs a resize animation between two popup locations.
void setActiveSize(double size)
Sets the current animated size value, driving the animation progress.
static ResizeVisibleAnimation * ActiveAnimation(QWidget *widget)
Returns the currently active resize animation for a widget, if any.
static void setTopLevelWidget(QWidget *top_widget)
Sets the top-level widget used as a reference for popup animations.
void setup(int duration, int start_delay, bool ignore_max_min_size)
Configures the animation timing and size constraints.
ResizeVisibleAnimation(QWidget *widget, bool visible, bool vertical, int duration=300, int delay=0)
Constructs a resize animation for showing or hiding a widget vertically or horizontally.
double activeSize() const
Returns the current animated size value.
void reverse()
Reverses the animation direction.
void updatedSignal()
Signal emitted when the animation value is updated.
The primary namespace for the NDEVR SDK.
double fltp08
Defines an alias representing an 8 byte floating-point number.