animation¶
Module Contents¶
Animation base class |
|
Animation base class |
|
Background animation widget |
|
Background color object |
|
Drop shadow animation |
|
Fluent animation speed |
|
Fluent animation type |
|
Fluent animation property |
|
Fluent animation property object |
|
Position object |
|
Scale object |
|
Angle object |
|
Opacity object |
|
Fluent animation base |
|
Fast invoke animation |
|
Strong invoke animation |
|
Fast dismiss animation |
|
Soft dismiss animation |
|
Point to point animation |
|
Fade in/out animation |
|
Scale and slide animation |
- class AnimationBase(parent: PyQt5.QtWidgets.QWidget)¶
Bases:
PyQt5.QtCore.QObjectAnimation base class
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- class TranslateYAnimation(parent: PyQt5.QtWidgets.QWidget, offset=2)¶
Bases:
AnimationBaseAnimation 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.QObjectBackground color object
- backgroundColor()¶
- class DropShadowAnimation(parent: PyQt5.QtWidgets.QWidget, normalColor=QColor(0, 0, 0, 0), hoverColor=QColor(0, 0, 0, 75))¶
Bases:
PyQt5.QtCore.QPropertyAnimationDrop 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 FluentAnimationType¶
Bases:
enum.EnumFluent 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.EnumFluent animation property
- POSITION = 'position'¶
- SCALE = 'scale'¶
- ANGLE = 'angle'¶
- OPACITY = 'opacity'¶
- class FluentAnimationProperObject(parent=None)¶
Bases:
PyQt5.QtCore.QObjectFluent 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:
FluentAnimationProperObjectPosition object
- getValue()¶
- setValue(pos: PyQt5.QtCore.QPoint)¶
- position¶
- class ScaleObject(parent=None)¶
Bases:
FluentAnimationProperObjectScale object
- getValue()¶
- setValue(scale: float)¶
- scale¶
- class AngleObject(parent=None)¶
Bases:
FluentAnimationProperObjectAngle object
- getValue()¶
- setValue(angle: float)¶
- angle¶
- class OpacityObject(parent=None)¶
Bases:
FluentAnimationProperObjectOpacity object
- getValue()¶
- setValue(opacity: float)¶
- opacity¶
- class FluentAnimation(parent=None)¶
Bases:
PyQt5.QtCore.QPropertyAnimationFluent 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:
FluentAnimationFast invoke animation
- classmethod curve()¶
- speedToDuration(speed: FluentAnimationSpeed)¶
- class StrongInvokeAnimation(parent=None)¶
Bases:
FluentAnimationStrong invoke animation
- classmethod curve()¶
- speedToDuration(speed: FluentAnimationSpeed)¶
- class FastDismissAnimation(parent=None)¶
Bases:
FastInvokeAnimationFast dismiss animation
- class SoftDismissAnimation(parent=None)¶
Bases:
FluentAnimationSoft dismiss animation
- classmethod curve()¶
- speedToDuration(speed: FluentAnimationSpeed)¶
- class PointToPointAnimation(parent=None)¶
Bases:
FastDismissAnimationPoint to point animation
- classmethod curve()¶
- class FadeInOutAnimation(parent=None)¶
Bases:
FluentAnimationFade in/out animation
- speedToDuration(speed: FluentAnimationSpeed)¶
- class ScaleSlideAnimation(parent=None, orient=Qt.Orientation.Horizontal)¶
Bases:
PyQt5.QtCore.QParallelAnimationGroupScale 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¶