Animation Class Reference
from PyKDE4.plasma import *
Inherits:
Namespace: Plasma.Animation
Detailed Description
Abstract representation of a single animation.
- Since:
- 4.4
Enumerations | |
Reference | { Center, Up, Down, Left, Right } |
Methods | |
__init__ (self, QObject parent=0) | |
int | duration (self) |
QEasingCurve | easingCurve (self) |
QEasingCurve::Type | easingCurveType (self) |
setDuration (self, int duration=250) | |
setEasingCurveType (self, QEasingCurve::Type type) | |
setTargetWidget (self, QGraphicsWidget widget) | |
QGraphicsWidget | targetWidget (self) |
updateCurrentTime (self, int currentTime) |
Method Documentation
__init__ | ( | self, | ||
QObject | parent=0 | |||
) |
int duration | ( | self ) |
Get the animation duration. It can be set using the property duration.
- Returns:
- duration in ms.
QEasingCurve easingCurve | ( | self ) |
Internal use only, access the easing curve object (see AnimationPrivate). Commonly used if a non-linear animation is desired while setting the delta in updateCurrentTime.
- Returns:
- An internal easing curve (default is Type.Linear).
QEasingCurve::Type easingCurveType | ( | 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.
setEasingCurveType | ( | self, | ||
QEasingCurve::Type | type | |||
) |
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
Reference |
- Enumerator:
-