bec_widgets.applications.navigation_centre.reveal_animator#
Attributes#
Classes#
Animate reveal/hide for a single widget using opacity + max W/H. |
Module Contents#
- class RevealAnimator(widget: qtpy.QtWidgets.QWidget, duration: int = ANIMATION_DURATION, easing: qtpy.QtCore.QEasingCurve.Type = QEasingCurve.InOutCubic, initially_revealed: bool = False, *, animate_opacity: bool = True, animate_width: bool = True, animate_height: bool = True)#
Animate reveal/hide for a single widget using opacity + max W/H.
This keeps the widget always visible to avoid jitter from setVisible(). Collapsed state: opacity=0, maxW=0, maxH=0. Expanded state: opacity=1, maxW=sizeHint.width(), maxH=sizeHint.height().
- _natural_sizes() → tuple[int, int]#
- add_to_group(group: qtpy.QtCore.QParallelAnimationGroup)#
Add the prepared animations to the given animation group.
- Parameters:
group (QParallelAnimationGroup) – The animation group to add to.
- animations()#
Get a list of all animations (non-None) for adding to a group.
- set_immediate(revealed: bool)#
Immediately set the widget to the target revealed/collapsed state.
- Parameters:
revealed (bool) – True to reveal, False to collapse.
- setup(reveal: bool)#
Prepare animations to transition to the target revealed/collapsed state.
- Parameters:
reveal (bool) – True to reveal, False to collapse.
- animate_height = True#
- animate_opacity = True#
- animate_width = True#
- fx#
- height_anim#
- opacity_anim#
- widget#
- width_anim#
- ANIMATION_DURATION = 500#