Animation Class Reference
from PyKDE4.plasma import *
Inherits: QAbstractAnimation → QObject
Namespace: Plasma
Detailed Description
Abstract representation of a single animation.
- Since:
- 4.4
Enumerations | |
MovementDirectionFlag | { MoveAny, MoveUp, MoveRight, MoveDown, MoveLeft } |
ReferenceFlag | { Center, Up, Down, Left, Right } |
Methods | |
__init__ (self, QObject parent=0) | |
int | duration (self) |
QEasingCurve | easingCurve (self) |
setDuration (self, int duration=250) | |
setEasingCurve (self, QEasingCurve curve) | |
setTargetWidget (self, QGraphicsWidget widget) | |
QGraphicsWidget | targetWidget (self) |
updateCurrentTime (self, int currentTime) |
Method Documentation
__init__ | ( | self, | ||
QObject | parent=0 | |||
) |
Default constructor.
- Parameters:
-
parent Object parent (might be set when using
Animator.create factory).
int duration | ( | self ) |
Get the animation duration. It can be set using the property duration.
- Returns:
- duration in ms.
QEasingCurve easingCurve | ( | self ) |
Get the animation easing curve type
setDuration | ( | self, | ||
int | duration=250 | |||
) |
Change the animation duration. Default is 250ms. @arg duration The new duration of the animation.
setEasingCurve | ( | self, | ||
QEasingCurve | curve | |||
) |
Set the animation easing curve type
setTargetWidget | ( | self, | ||
QGraphicsWidget | widget | |||
) |
Set the widget on which the animation is to be performed. @arg widget The QGraphicsWidget to be animated.
QGraphicsWidget targetWidget | ( | self ) |
- Returns:
- The widget that the animation will be performed upon
updateCurrentTime | ( | self, | ||
int | currentTime | |||
) |
QAbstractAnimation will call this method while the animation is running. Each specialized animation class should implement the correct behavior for it.
- Parameters:
-
currentTime Slapsed time using the duration as reference (it will be from duration up to zero if the animation is running backwards).
Enumeration Documentation
MovementDirectionFlag |
Animation movement direction.
- Enumerator:
-
MoveAny = 0 MoveUp = 0x1 MoveRight = 0x2 MoveDown = 0x4 MoveLeft = 0x8
ReferenceFlag |
Animation movement reference (used by RotationAnimation).
- Enumerator:
-
Center = 0 Up = 0x1 Down = 0x2 Left = 0x4 Right = 0x8