Animation Class Reference
from PyKDE4.plasma import *
Inherits:
Namespace: Plasma.Animation
Detailed Description
Abstract representation of a single animation.
- Since:
- 4.4
Enumerations |
MovementDirection | { MoveUp, MoveUpRight, MoveRight, MoveDownRight, MoveDown, MoveDownLeft, MoveLeft, MoveUpLeft } |
Reference | { 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 |
|
) |
|
|
|
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
Set the widget on which the animation is to be performed.
@arg widget The QGraphicsWidget to be animated.
- 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