Responsible for animating widgets by having them grown as they become visible, or shrink as they become invisible.
More...
|
| double | activeSize () const |
| | Returns the current animated size value.
|
|
void | finishedSignal () |
| | Signal emitted when the animation finishes.
|
|
void | reverse () |
| | Reverses the animation direction.
|
| void | setActiveSize (double size) |
| | Sets the current animated size value, driving the animation progress.
|
| void | setDeleteWidgetOnEnd (bool delete_widget) |
| | Sets whether the widget should be deleted when the animation finishes.
|
| void | setup (int duration, int start_delay, bool ignore_max_min_size) |
| | Configures the animation timing and size constraints.
|
|
void | updatedSignal () |
| | Signal emitted when the animation value is updated.
|
|
| static ResizeVisibleAnimation * | ActiveAnimation (QWidget *widget) |
| | Returns the currently active resize animation for a widget, if any.
|
| 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.
|
| 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.
|
| static ResizeVisibleAnimation * | runRemove (QWidget *widget, bool vertical, int duration=-1, int delay=0) |
| | Creates and runs a hide-then-remove animation for a widget.
|
| static void | setTopLevelWidget (QWidget *top_widget) |
| | Sets the top-level widget used as a reference for popup animations.
|
|
| | 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.
|
| | 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.
|
|
void | startAnimation () |
| | Slot that starts the animation after any configured delay.
|
Responsible for animating widgets by having them grown as they become visible, or shrink as they become invisible.
For some operating systems will also apply a fade effect.
Definition at line 48 of file ResizeVisibleAnimation.h.
◆ ResizeVisibleAnimation() [1/2]
| ResizeVisibleAnimation::ResizeVisibleAnimation |
( |
QWidget * | widget, |
|
|
bool | visible, |
|
|
bool | vertical, |
|
|
int | duration = 300, |
|
|
int | delay = 0 ) |
|
protected |
Constructs a resize animation for showing or hiding a widget vertically or horizontally.
- Parameters
-
| [in] | widget | The widget to animate. |
| [in] | visible | Whether the widget is becoming visible (true) or hidden (false). |
| [in] | vertical | Whether to animate along the vertical axis. |
| [in] | duration | The animation duration in milliseconds. |
| [in] | delay | The delay in milliseconds before the animation starts. |
Referenced by ResizeVisibleAnimation(), ActiveAnimation(), run(), run(), and runRemove().
◆ ResizeVisibleAnimation() [2/2]
| ResizeVisibleAnimation::ResizeVisibleAnimation |
( |
QWidget * | widget, |
|
|
bool | visible, |
|
|
PopupInfo | start_location, |
|
|
PopupInfo | end_location, |
|
|
int | duration = 300, |
|
|
int | delay = 0 ) |
|
protected |
Constructs a resize animation that animates a widget between two popup locations.
- Parameters
-
| [in] | widget | The widget to animate. |
| [in] | visible | Whether the widget is becoming visible (true) or hidden (false). |
| [in] | start_location | The starting popup position and size. |
| [in] | end_location | The ending popup position and size. |
| [in] | duration | The animation duration in milliseconds. |
| [in] | delay | The delay in milliseconds before the animation starts. |
References ResizeVisibleAnimation().
◆ ActiveAnimation()
Returns the currently active resize animation for a widget, if any.
- Parameters
-
| [in] | widget | The widget to query. |
- Returns
- Pointer to the active animation, or nullptr.
References ResizeVisibleAnimation().
◆ activeSize()
| double ResizeVisibleAnimation::activeSize |
( |
| ) |
const |
|
inline |
Returns the current animated size value.
- Returns
- The animation progress from 0.0 to 1.0.
Definition at line 99 of file ResizeVisibleAnimation.h.
◆ run() [1/2]
| ResizeVisibleAnimation * ResizeVisibleAnimation::run |
( |
QWidget * | widget, |
|
|
bool | visible, |
|
|
bool | vertical, |
|
|
int | duration = -1, |
|
|
int | delay = 0 ) |
|
static |
Creates and runs a resize animation for showing or hiding a widget.
- Parameters
-
| [in] | widget | The widget to animate. |
| [in] | visible | Whether the widget is becoming visible. |
| [in] | vertical | Whether to animate along the vertical axis. |
| [in] | duration | The animation duration in milliseconds, or -1 for default. |
| [in] | delay | The delay before starting in milliseconds. |
- Returns
- Pointer to the running animation.
References ResizeVisibleAnimation().
◆ run() [2/2]
Creates and runs a resize animation between two popup locations.
- Parameters
-
| [in] | widget | The widget to animate. |
| [in] | visible | Whether the widget is becoming visible. |
| [in] | start_location | The starting position and size. |
| [in] | end_location | The ending position and size. |
| [in] | duration | The animation duration in milliseconds, or -1 for default. |
| [in] | delay | The delay before starting in milliseconds. |
- Returns
- Pointer to the running animation.
References ResizeVisibleAnimation().
◆ runRemove()
| ResizeVisibleAnimation * ResizeVisibleAnimation::runRemove |
( |
QWidget * | widget, |
|
|
bool | vertical, |
|
|
int | duration = -1, |
|
|
int | delay = 0 ) |
|
static |
Creates and runs a hide-then-remove animation for a widget.
- Parameters
-
| [in] | widget | The widget to animate and remove. |
| [in] | vertical | Whether to animate along the vertical axis. |
| [in] | duration | The animation duration in milliseconds, or -1 for default. |
| [in] | delay | The delay before starting in milliseconds. |
- Returns
- Pointer to the running animation.
References ResizeVisibleAnimation().
◆ setActiveSize()
| void ResizeVisibleAnimation::setActiveSize |
( |
double | size | ) |
|
Sets the current animated size value, driving the animation progress.
- Parameters
-
| [in] | size | The current animation size (0.0 to 1.0). |
◆ setDeleteWidgetOnEnd()
| void ResizeVisibleAnimation::setDeleteWidgetOnEnd |
( |
bool | delete_widget | ) |
|
|
inline |
Sets whether the widget should be deleted when the animation finishes.
- Parameters
-
| [in] | delete_widget | True to delete the widget on animation end. |
Definition at line 83 of file ResizeVisibleAnimation.h.
◆ setTopLevelWidget()
| void ResizeVisibleAnimation::setTopLevelWidget |
( |
QWidget * | top_widget | ) |
|
|
static |
Sets the top-level widget used as a reference for popup animations.
- Parameters
-
| [in] | top_widget | The top-level application widget. |
◆ setup()
| void ResizeVisibleAnimation::setup |
( |
int | duration, |
|
|
int | start_delay, |
|
|
bool | ignore_max_min_size ) |
Configures the animation timing and size constraints.
- Parameters
-
| [in] | duration | The animation duration in milliseconds. |
| [in] | start_delay | The delay in milliseconds before starting. |
| [in] | ignore_max_min_size | Whether to temporarily ignore the widget's min/max size constraints. |
The documentation for this class was generated from the following file: