animation

Module Contents

AnimationBase

Animation base class

TranslateYAnimation

Animation base class

BackgroundAnimationWidget

Background animation widget

BackgroundColorObject

Background color object

DropShadowAnimation

Drop shadow animation

FluentAnimationSpeed

Fluent animation speed

FluentAnimationType

Fluent animation type

FluentAnimationProperty

Fluent animation property

FluentAnimationProperObject

Fluent animation property object

PositionObject

Position object

ScaleObject

Scale object

AngleObject

Angle object

OpacityObject

Opacity object

FluentAnimation

Fluent animation base

FastInvokeAnimation

Fast invoke animation

StrongInvokeAnimation

Strong invoke animation

FastDismissAnimation

Fast dismiss animation

SoftDismissAnimation

Soft dismiss animation

PointToPointAnimation

Point to point animation

FadeInOutAnimation

Fade in/out animation

class AnimationBase(parent: PyQt5.QtWidgets.QWidget)

Bases: PyQt5.QtCore.QObject

Animation base class

eventFilter(obj, e: PyQt5.QtCore.QEvent)
class TranslateYAnimation(parent: PyQt5.QtWidgets.QWidget, offset=2)

Bases: AnimationBase

Animation base class

valueChanged
y()
class BackgroundAnimationWidget(*args, **kwargs)

Background animation widget

property backgroundColor
eventFilter(obj, e)
mousePressEvent(e)
mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
focusInEvent(e)
getBackgroundColor()
setBackgroundColor(color: PyQt5.QtGui.QColor)
class BackgroundColorObject(parent: BackgroundAnimationWidget)

Bases: PyQt5.QtCore.QObject

Background color object

backgroundColor()
class DropShadowAnimation(parent: PyQt5.QtWidgets.QWidget, normalColor=QColor(0, 0, 0, 0), hoverColor=QColor(0, 0, 0, 75))

Bases: PyQt5.QtCore.QPropertyAnimation

Drop shadow animation

setBlurRadius(radius: int)
setOffset(dx: int, dy: int)
setNormalColor(color: PyQt5.QtGui.QColor)
setHoverColor(color: PyQt5.QtGui.QColor)
setColor(color)
eventFilter(obj, e)
class FluentAnimationSpeed

Bases: enum.Enum

Fluent animation speed

FAST = 0
MEDIUM = 1
SLOW = 2
class FluentAnimationType

Bases: enum.Enum

Fluent animation type

FAST_INVOKE = 0
STRONG_INVOKE = 1
FAST_DISMISS = 2
SOFT_DISMISS = 3
POINT_TO_POINT = 4
FADE_IN_OUT = 5
class FluentAnimationProperty

Bases: enum.Enum

Fluent animation property

POSITION = 'position'
SCALE = 'scale'
ANGLE = 'angle'
OPACITY = 'opacity'
class FluentAnimationProperObject(parent=None)

Bases: PyQt5.QtCore.QObject

Fluent animation property object

objects
getValue()
setValue()
classmethod register(name)

register menu animation manager

Parameters

name: Any

the name of manager, it should be unique

classmethod create(propertyType: FluentAnimationProperty, parent=None)
class PositionObject(parent=None)

Bases: FluentAnimationProperObject

Position object

position
getValue()
setValue(pos: PyQt5.QtCore.QPoint)
class ScaleObject(parent=None)

Bases: FluentAnimationProperObject

Scale object

scale
getValue()
setValue(scale: float)
class AngleObject(parent=None)

Bases: FluentAnimationProperObject

Angle object

angle
getValue()
setValue(angle: float)
class OpacityObject(parent=None)

Bases: FluentAnimationProperObject

Opacity object

opacity
getValue()
setValue(opacity: float)
class FluentAnimation(parent=None)

Bases: PyQt5.QtCore.QPropertyAnimation

Fluent animation base

animations
classmethod createBezierCurve(x1, y1, x2, y2)
classmethod curve()
setSpeed(speed: FluentAnimationSpeed)

set the speed of animation

speedToDuration(speed: FluentAnimationSpeed)
startAnimation(endValue, startValue=None)
value()
setValue(value)
classmethod register(name)

register menu animation manager

Parameters

name: Any

the name of manager, it should be unique

classmethod create(aniType: FluentAnimationType, propertyType: FluentAnimationProperty, speed=FluentAnimationSpeed.FAST, value=None, parent=None) FluentAnimation
class FastInvokeAnimation(parent=None)

Bases: FluentAnimation

Fast invoke animation

classmethod curve()
speedToDuration(speed: FluentAnimationSpeed)
class StrongInvokeAnimation(parent=None)

Bases: FluentAnimation

Strong invoke animation

classmethod curve()
speedToDuration(speed: FluentAnimationSpeed)
class FastDismissAnimation(parent=None)

Bases: FastInvokeAnimation

Fast dismiss animation

class SoftDismissAnimation(parent=None)

Bases: FluentAnimation

Soft dismiss animation

classmethod curve()
speedToDuration(speed: FluentAnimationSpeed)
class PointToPointAnimation(parent=None)

Bases: FastDismissAnimation

Point to point animation

classmethod curve()
class FadeInOutAnimation(parent=None)

Bases: FluentAnimation

Fade in/out animation

speedToDuration(speed: FluentAnimationSpeed)