• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

Plasma::Phase

Plasma::Phase Class Reference

#include <phase.h>

Inheritance diagram for Plasma::Phase:

Inheritance graph
[legend]

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

typedef int Plasma::Phase::AnimId

Definition at line 74 of file phase.h.


Member Enumeration Documentation

enum Plasma::Phase::Animation

Enumerator:
Appear 
Disappear 
Activate 
FrameAppear 

Definition at line 46 of file phase.h.

enum Plasma::Phase::ElementAnimation

Enumerator:
ElementAppear 
ElementDisappear 

Definition at line 54 of file phase.h.

enum Plasma::Phase::CurveShape

Enumerator:
EaseInCurve 
EaseOutCurve 
EaseInOutCurve 
LinearCurve 

Definition at line 60 of file phase.h.

enum Plasma::Phase::Movement

Enumerator:
SlideIn 
SlideOut 

Definition at line 68 of file phase.h.


Constructor & Destructor Documentation

Plasma::Phase::Phase ( QObject *  parent = 0  )  [explicit]

Definition at line 188 of file phase.cpp.

Plasma::Phase::~Phase (  ) 

Definition at line 195 of file phase.cpp.


Member Function Documentation

Phase * Plasma::Phase::self (  )  [static]

Singleton accessor.

Definition at line 182 of file phase.cpp.

void Plasma::Phase::animateItem ( QGraphicsItem *  item,
Animation  anim 
)

Definition at line 245 of file phase.cpp.

void Plasma::Phase::moveItem ( QGraphicsItem *  item,
Movement  movement,
const QPoint &  destination 
)

Definition at line 291 of file phase.cpp.

Phase::AnimId Plasma::Phase::customAnimation ( int  frames,
int  duration,
Phase::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.
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.

Phase::AnimId Plasma::Phase::animateElement ( QGraphicsItem *  obj,
ElementAnimation  animation 
)

Definition at line 382 of file phase.cpp.

void Plasma::Phase::stopElementAnimation ( AnimId  id  ) 

Definition at line 431 of file phase.cpp.

void Plasma::Phase::setAnimationPixmap ( AnimId  id,
const QPixmap &  pixmap 
)

Definition at line 441 of file phase.cpp.

QPixmap Plasma::Phase::animationResult ( AnimId  id  ) 

Definition at line 453 of file phase.cpp.

void Plasma::Phase::animationComplete ( QGraphicsItem *  item,
Plasma::Phase::Animation  anim 
) [signal]

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]

Reimplemented from QObject.

Definition at line 481 of file phase.cpp.

void Plasma::Phase::animatedItemDestroyed ( QObject *  o  )  [protected, slot]

Definition at line 200 of file phase.cpp.

void Plasma::Phase::movingItemDestroyed ( QObject *  o  )  [protected, slot]

Definition at line 209 of file phase.cpp.

void Plasma::Phase::animatedElementDestroyed ( QObject *  o  )  [protected, slot]

Definition at line 221 of file phase.cpp.

void Plasma::Phase::customAnimReceiverDestroyed ( QObject *  o  )  [protected, slot]

Definition at line 233 of file phase.cpp.


The documentation for this class was generated from the following files:
  • phase.h
  • phase.cpp

libplasma

Skip menu "libplasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal