KDE 4.4 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

Animator Class Reference

from PyKDE4.plasma import *

Inherits: QObject
Namespace: Plasma.Animator

Detailed Description

Animator plasma/animator.h <Plasma/Animator>

A system for applying effects to Plasma elements


Enumerations

Animation { AppearAnimation, DisappearAnimation, ActivateAnimation, FadeAnimation, GrowAnimation, PulseAnimation, RotationAnimation, RotationStackedAnimation, SlideAnimation, GeometryAnimation, ZoomAnimation }
CurveShape { EaseInCurve, EaseOutCurve, EaseInOutCurve, LinearCurve }
Movement { SlideInMovement, SlideOutMovement, FastSlideInMovement, FastSlideOutMovement }

Signals

 animationFinished (, QGraphicsItem item, Plasma.Animator.Animation anim)
 customAnimationFinished (, int id)
 elementAnimationFinished (, int id)
 movementFinished (, QGraphicsItem item)
 scrollStateChanged (, QGraphicsWidget widget, QAbstractAnimation.State newState, QAbstractAnimation.State oldState)

Methods

 __init__ (self, QObject parent=0)
int animateElement (self, QGraphicsItem obj, Plasma.Animator.Animation a1)
int animateItem (self, QGraphicsItem item, Plasma.Animator.Animation anim)
 animationFinished (self, QGraphicsItem item, Plasma.Animator.Animation anim)
QPixmap currentPixmap (self, int id)
int customAnimation (self, int frames, int duration, Plasma.Animator.CurveShape curve, QObject receiver, QString method)
 customAnimationFinished (self, int id)
 elementAnimationFinished (self, int id)
bool isAnimating (self)
int moveItem (self, QGraphicsItem item, Plasma.Animator.Movement movement, QPoint destination)
 movementFinished (self, QGraphicsItem item)
 registerScrollingManager (self, QGraphicsWidget widget)
 scrollStateChanged (self, QGraphicsWidget widget, QAbstractAnimation.State newState, QAbstractAnimation.State oldState)
Plasma.Animator self (self)
 setInitialPixmap (self, int id, QPixmap pixmap)
 stopCustomAnimation (self, int id)
 stopElementAnimation (self, int id)
 stopItemAnimation (self, int id)
 stopItemMovement (self, int id)
 timerEvent (self, QTimerEvent event)
 unregisterScrollingManager (self, QGraphicsWidget widget)

Method Documentation

__init__ (  self,
QObject  parent=0
)
int animateElement (  self,
QGraphicsItem  obj,
Plasma.Animator.Animation  a1
)
int animateItem (  self,
QGraphicsItem  item,
Plasma.Animator.Animation  anim
)

Starts a standard animation on a QGraphicsItem.

@arg item the item to animate in some fashion @arg anim the type of animation to perform

Returns:
the id of the animation
Deprecated:
use new Animator API with Qt Kinetic

animationFinished (  self,
QGraphicsItem  item,
Plasma.Animator.Animation  anim
)
Signal syntax:
QObject.connect(source, SIGNAL("animationFinished(QGraphicsItem*, Plasma::Animator::Animation)"), target_slot)
QPixmap currentPixmap (  self,
int  id
)
int customAnimation (  self,
int  frames,
int  duration,
Plasma.Animator.CurveShape  curve,
QObject  receiver,
QString  method
)

Starts a custom animation, preventing the need to create a timeline with its own timer tick.

@arg frames the number of frames this animation should persist for @arg duration the length, in milliseconds, the animation will take @arg curve the curve applied to the frame rate @arg receive the object that will handle the actual animation @arg method the method name of slot to be invoked on each update. It must take a qreal. So if the slot is animate(qreal), pass in "animate" as the method parameter. It has an optional integer paramenter that takes an integer that reapresents the animation id, useful if you want to manage multiple animations with a sigle slot

Returns:
an id that can be used to identify this animation.
Deprecated:
use new Animator API with Qt Kinetic

customAnimationFinished (  self,
int  id
)
Signal syntax:
QObject.connect(source, SIGNAL("customAnimationFinished(int)"), target_slot)
elementAnimationFinished (  self,
int  id
)
Signal syntax:
QObject.connect(source, SIGNAL("elementAnimationFinished(int)"), target_slot)
bool isAnimating (   self )

Can be used to query if there are other animations happening. This way heavy operations can be delayed until all animations are finished.

Returns:
true if there are animations going on.
Since:
4.1
Deprecated:
use new Animator API with Qt Kinetic

int moveItem (  self,
QGraphicsItem  item,
Plasma.Animator.Movement  movement,
QPoint  destination
)

Starts a standard animation on a QGraphicsItem.

@arg item the item to animate in some fashion @arg anim the type of animation to perform

Returns:
the id of the animation
Deprecated:
use new Animator API with Qt Kinetic

movementFinished (  self,
QGraphicsItem  item
)
Signal syntax:
QObject.connect(source, SIGNAL("movementFinished(QGraphicsItem*)"), target_slot)
registerScrollingManager (  self,
QGraphicsWidget  widget
)

Register a widget as a scrolling widget. The widget will get animate scrolling with mouse dragging and mouse wheel. It must provide scrollValue, viewportGeometry and pageSize properties

Parameters:
widget  the widget that offers a scrolling behaviour

Since:
4.4

scrollStateChanged (  self,
QGraphicsWidget  widget,
QAbstractAnimation.State  newState,
QAbstractAnimation.State  oldState
)
Signal syntax:
QObject.connect(source, SIGNAL("scrollStateChanged(QGraphicsWidget*, QAbstractAnimation::State, QAbstractAnimation::State)"), target_slot)
Plasma.Animator self (   self )

Singleton accessor

setInitialPixmap (  self,
int  id,
QPixmap  pixmap
)
stopCustomAnimation (  self,
int  id
)

Stops a custom animation. Note that it is not necessary to call this on object destruction, as custom animations associated with a given QObject are cleaned up automatically on QObject destruction.

@arg id the id of the animation as returned by customAnimation

Deprecated:
use new Animator API with Qt Kinetic

stopElementAnimation (  self,
int  id
)
stopItemAnimation (  self,
int  id
)

Stops an item animation before the animation is complete. Note that it is not necessary to call this on normal completion of the animation.

@arg id the id of the animation as returned by animateItem

Deprecated:
use new Animator API with Qt Kinetic

stopItemMovement (  self,
int  id
)

Stops an item movement before the animation is complete. Note that it is not necessary to call this on normal completion of the animation.

@arg id the id of the animation as returned by moveItem

Deprecated:
use new Animator API with Qt Kinetic

timerEvent (  self,
QTimerEvent  event
)
unregisterScrollingManager (  self,
QGraphicsWidget  widget
)

unregister the scrolling manager of a certain widget

Parameters:
widget  the widget we don't want no longer animated

Since:
4.4


Enumeration Documentation

Animation
Enumerator:

CurveShape
Enumerator:
EaseInCurve = 0
EaseOutCurve 
EaseInOutCurve 
LinearCurve 

Movement
Enumerator:
SlideInMovement = 0
SlideOutMovement 
FastSlideInMovement 
FastSlideOutMovement 

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal