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

ScaleSlideAnimation

Scale and slide 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
maxOffset = 2
ani
y()
class BackgroundAnimationWidget(*args, **kwargs)

Background animation widget

isHover = False
isPressed = False
bgColorObject
backgroundColorAni
eventFilter(obj, e)
mousePressEvent(e)
mouseReleaseEvent(e)
enterEvent(e)
leaveEvent(e)
focusInEvent(e)
getBackgroundColor()
setBackgroundColor(color: PyQt5.QtGui.QColor)
property backgroundColor
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

normalColor
hoverColor
offset
blurRadius = 38
isHover = False
shadowEffect
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) FluentAnimationProperObject
class PositionObject(parent=None)

Bases: FluentAnimationProperObject

Position object

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

Bases: FluentAnimationProperObject

Scale object

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

Bases: FluentAnimationProperObject

Angle object

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

Bases: FluentAnimationProperObject

Opacity object

getValue()
setValue(opacity: float)
opacity
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)
class ScaleSlideAnimation(parent=None, orient=Qt.Orientation.Horizontal)

Bases: PyQt5.QtCore.QParallelAnimationGroup

Scale and slide animation

valueChanged
orient
startAnimation(endRect: PyQt5.QtCore.QRectF, useCrossFade=False)
stopAnimation()
isHorizontal()
getPos()
setPos(pos: PyQt5.QtCore.QPointF)
getLength()
setLength(length)
getGeometry() PyQt5.QtCore.QRectF
setGeometry(rect: PyQt5.QtCore.QRectF)
moveLeft(x)
setValue(rect)
pos
length
geometry