libplasma
Plasma::Phase Class Reference
#include <phase.h>
List of all members.
Detailed Description
A system for applying effects to
Plasma elements.
Definition at line 38 of file phase.h.
|
Public Types |
| enum | Animation { Appear = 0,
Disappear,
Activate,
FrameAppear
} |
| enum | ElementAnimation { ElementAppear = 0,
ElementDisappear
} |
| enum | CurveShape { EaseInCurve = 0,
EaseOutCurve,
EaseInOutCurve,
LinearCurve
} |
| enum | Movement { SlideIn = 0,
SlideOut
} |
| typedef int | AnimId |
Signals |
| void | animationComplete (QGraphicsItem *item, Plasma::Phase::Animation anim) |
| void | movementComplete (QGraphicsItem *item) |
| void | elementAnimationComplete (AnimId id) |
| void | customAnimationComplete (AnimId id) |
Public Member Functions |
| | Phase (QObject *parent=0) |
| | ~Phase () |
| Q_INVOKABLE void | animateItem (QGraphicsItem *item, Animation anim) |
| Q_INVOKABLE void | moveItem (QGraphicsItem *item, Movement movement, const QPoint &destination) |
| Q_INVOKABLE AnimId | customAnimation (int frames, int duration, Phase::CurveShape curve, QObject *receiver, const char *method) |
| Q_INVOKABLE void | stopCustomAnimation (AnimId id) |
| Q_INVOKABLE AnimId | animateElement (QGraphicsItem *obj, ElementAnimation) |
| Q_INVOKABLE void | stopElementAnimation (AnimId id) |
| Q_INVOKABLE void | setAnimationPixmap (AnimId id, const QPixmap &pixmap) |
| Q_INVOKABLE QPixmap | animationResult (AnimId id) |
Static Public Member Functions |
| static Phase * | self () |
Protected Slots |
| void | animatedItemDestroyed (QObject *) |
| void | movingItemDestroyed (QObject *) |
| void | animatedElementDestroyed (QObject *) |
| void | customAnimReceiverDestroyed (QObject *) |
Protected Member Functions |
| void | timerEvent (QTimerEvent *event) |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
| Appear |
|
| Disappear |
|
| Activate |
|
| FrameAppear |
|
Definition at line 46 of file phase.h.
- Enumerator:
-
| ElementAppear |
|
| ElementDisappear |
|
Definition at line 54 of file phase.h.
- Enumerator:
-
| EaseInCurve |
|
| EaseOutCurve |
|
| EaseInOutCurve |
|
| LinearCurve |
|
Definition at line 60 of file phase.h.
- Enumerator:
-
Definition at line 68 of file phase.h.
Constructor & Destructor Documentation
| Plasma::Phase::Phase |
( |
QObject * |
parent = 0 |
) |
[explicit] |
| Plasma::Phase::~Phase |
( |
|
) |
|
Member Function Documentation
| Phase * Plasma::Phase::self |
( |
|
) |
[static] |
Singleton accessor.
Definition at line 182 of file phase.cpp.
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.
- Returns:
- an id that can be used to identify this animation.
Definition at line 335 of file phase.cpp.
| void Plasma::Phase::stopCustomAnimation |
( |
AnimId |
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
Definition at line 371 of file phase.cpp.
| void Plasma::Phase::stopElementAnimation |
( |
AnimId |
id |
) |
|
| void Plasma::Phase::setAnimationPixmap |
( |
AnimId |
id, |
|
|
const QPixmap & |
pixmap | |
|
) |
| | |
| void Plasma::Phase::movementComplete |
( |
QGraphicsItem * |
item |
) |
[signal] |
| void Plasma::Phase::elementAnimationComplete |
( |
AnimId |
id |
) |
[signal] |
| void Plasma::Phase::customAnimationComplete |
( |
AnimId |
id |
) |
[signal] |
| void Plasma::Phase::timerEvent |
( |
QTimerEvent * |
event |
) |
[protected] |
| void Plasma::Phase::animatedItemDestroyed |
( |
QObject * |
o |
) |
[protected, slot] |
| void Plasma::Phase::movingItemDestroyed |
( |
QObject * |
o |
) |
[protected, slot] |
| void Plasma::Phase::animatedElementDestroyed |
( |
QObject * |
o |
) |
[protected, slot] |
| void Plasma::Phase::customAnimReceiverDestroyed |
( |
QObject * |
o |
) |
[protected, slot] |
The documentation for this class was generated from the following files: