Plasma
Plasma::Animator Class Reference
A system for applying effects to Plasma elements. More...
#include <Plasma/Animator>

Public Types | |
| enum | Animation { AppearAnimation = 0, DisappearAnimation, ActivateAnimation, FadeAnimation, GrowAnimation, ExpandAnimation, PulseAnimation, RotationAnimation, RotationStackedAnimation, SlideAnimation, PauseAnimation } |
| enum | CurveShape { EaseInCurve = 0, EaseOutCurve, EaseInOutCurve, LinearCurve } |
| enum | Movement { SlideInMovement = 0, SlideOutMovement, FastSlideInMovement, FastSlideOutMovement } |
Signals | |
| void | animationFinished (QGraphicsItem *item, Plasma::Animator::Animation anim) |
| void | customAnimationFinished (int id) |
| void | elementAnimationFinished (int id) |
| void | movementFinished (QGraphicsItem *item) |
Public Member Functions | |
| KDE_DEPRECATED Q_INVOKABLE int | animateElement (QGraphicsItem *obj, Animation) |
| KDE_DEPRECATED Q_INVOKABLE int | animateItem (QGraphicsItem *item, Animation anim) |
| KDE_DEPRECATED Q_INVOKABLE QPixmap | currentPixmap (int id) |
| KDE_DEPRECATED Q_INVOKABLE int | customAnimation (int frames, int duration, Animator::CurveShape curve, QObject *receiver, const char *method) |
| KDE_DEPRECATED Q_INVOKABLE bool | isAnimating () const |
| KDE_DEPRECATED Q_INVOKABLE int | moveItem (QGraphicsItem *item, Movement movement, const QPoint &destination) |
| void | registerScrollingManager (QGraphicsWidget *widget) |
| KDE_DEPRECATED Q_INVOKABLE void | setInitialPixmap (int id, const QPixmap &pixmap) |
| KDE_DEPRECATED Q_INVOKABLE void | stopCustomAnimation (int id) |
| KDE_DEPRECATED Q_INVOKABLE void | stopElementAnimation (int id) |
| KDE_DEPRECATED Q_INVOKABLE void | stopItemAnimation (int id) |
| KDE_DEPRECATED Q_INVOKABLE void | stopItemMovement (int id) |
| void | unregisterScrollingManager (QGraphicsWidget *widget) |
Static Public Member Functions | |
| static AbstractAnimation * | create (Animation type, QObject *parent=0) |
| static KDE_DEPRECATED Animator * | self () |
Protected Member Functions | |
| void | timerEvent (QTimerEvent *event) |
Detailed Description
A system for applying effects to Plasma elements.
Definition at line 45 of file animator.h.
Member Enumeration Documentation
- Enumerator:
AppearAnimation DisappearAnimation ActivateAnimation FadeAnimation GrowAnimation ExpandAnimation PulseAnimation RotationAnimation RotationStackedAnimation SlideAnimation PauseAnimation
Definition at line 54 of file animator.h.
Definition at line 71 of file animator.h.
Definition at line 78 of file animator.h.
Member Function Documentation
| int Plasma::Animator::animateElement | ( | QGraphicsItem * | obj, | |
| Animation | animation | |||
| ) |
Definition at line 412 of file deprecated/animator.cpp.
| int Plasma::Animator::animateItem | ( | QGraphicsItem * | item, | |
| Animation | anim | |||
| ) |
Starts a standard animation on a QGraphicsItem.
- item the item to animate in some fashion
- anim the type of animation to perform
- Returns:
- the id of the animation
- Deprecated:
- use new Animator API with Qt Kinetic
Definition at line 211 of file deprecated/animator.cpp.
| void Plasma::Animator::animationFinished | ( | QGraphicsItem * | item, | |
| Plasma::Animator::Animation | anim | |||
| ) | [signal] |
| AbstractAnimation * Plasma::Animator::create | ( | Animation | type, | |
| QObject * | parent = 0 | |||
| ) | [static] |
Factory to build new animation objects.
To control their behavior, check AbstractAnimation properties.
Definition at line 39 of file animator.cpp.
| QPixmap Plasma::Animator::currentPixmap | ( | int | id | ) |
Definition at line 484 of file deprecated/animator.cpp.
| int Plasma::Animator::customAnimation | ( | int | frames, | |
| int | duration, | |||
| Animator::CurveShape | curve, | |||
| QObject * | receiver, | |||
| const char * | method | |||
| ) |
Starts a custom animation, preventing the need to create a timeline with its own timer tick.
- frames the number of frames this animation should persist for
- duration the length, in milliseconds, the animation will take
- curve the curve applied to the frame rate
- receive the object that will handle the actual animation
- 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
Definition at line 321 of file deprecated/animator.cpp.
| void Plasma::Animator::customAnimationFinished | ( | int | id | ) | [signal] |
| void Plasma::Animator::elementAnimationFinished | ( | int | id | ) | [signal] |
| bool Plasma::Animator::isAnimating | ( | ) | const |
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
Definition at line 513 of file deprecated/animator.cpp.
| int Plasma::Animator::moveItem | ( | QGraphicsItem * | item, | |
| Movement | movement, | |||
| const QPoint & | destination | |||
| ) |
Starts a standard animation on a QGraphicsItem.
- item the item to animate in some fashion
- anim the type of animation to perform
- Returns:
- the id of the animation
- Deprecated:
- use new Animator API with Qt Kinetic
Definition at line 267 of file deprecated/animator.cpp.
| void Plasma::Animator::movementFinished | ( | QGraphicsItem * | item | ) | [signal] |
| void Plasma::Animator::registerScrollingManager | ( | 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
Definition at line 742 of file deprecated/animator.cpp.
| Animator * Plasma::Animator::self | ( | ) | [static] |
Singleton accessor.
Definition at line 123 of file deprecated/animator.cpp.
| void Plasma::Animator::setInitialPixmap | ( | int | id, | |
| const QPixmap & | pixmap | |||
| ) |
Definition at line 472 of file deprecated/animator.cpp.
| void Plasma::Animator::stopCustomAnimation | ( | 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.
- id the id of the animation as returned by customAnimation
- Deprecated:
- use new Animator API with Qt Kinetic
Definition at line 360 of file deprecated/animator.cpp.
| void Plasma::Animator::stopElementAnimation | ( | int | id | ) |
Definition at line 457 of file deprecated/animator.cpp.
| void Plasma::Animator::stopItemAnimation | ( | 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.
- id the id of the animation as returned by animateItem
- Deprecated:
- use new Animator API with Qt Kinetic
Definition at line 376 of file deprecated/animator.cpp.
| void Plasma::Animator::stopItemMovement | ( | 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.
- id the id of the animation as returned by moveItem
- Deprecated:
- use new Animator API with Qt Kinetic
Definition at line 394 of file deprecated/animator.cpp.
| void Plasma::Animator::timerEvent | ( | QTimerEvent * | event | ) | [protected] |
Reimplemented from QObject.
Definition at line 521 of file deprecated/animator.cpp.
| void Plasma::Animator::unregisterScrollingManager | ( | QGraphicsWidget * | widget | ) |
unregister the scrolling manager of a certain widget
- Parameters:
-
widget the widget we don't want no longer animated
- Since:
- 4.4
Definition at line 750 of file deprecated/animator.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference