• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • Animation
Public Types | Public Member Functions | Protected Member Functions | Properties

Plasma::Animation Class Reference

Abstract representation of a single animation. More...

#include <animation.h>

Inheritance diagram for Plasma::Animation:
Inheritance graph
[legend]

List of all members.

Public Types

enum  MovementDirectionFlag {
  MoveAny = 0, MoveUp = 0x1, MoveRight = 0x2, MoveDown = 0x4,
  MoveLeft = 0x8
}
enum  ReferenceFlag {
  Center = 0, Up = 0x1, Down = 0x2, Left = 0x4,
  Right = 0x8
}

Public Member Functions

 Animation (QObject *parent=0)
 ~Animation ()=0
int duration () const
QEasingCurve easingCurve () const
void setEasingCurve (const QEasingCurve &curve)
void setTargetWidget (QGraphicsWidget *widget)
QGraphicsWidget * targetWidget () const

Protected Member Functions

virtual void setDuration (int duration=250)
virtual void updateCurrentTime (int currentTime)

Properties

int duration
QEasingCurve easingCurve
QGraphicsWidget targetWidget

Detailed Description

Abstract representation of a single animation.

Since:
4.4

Definition at line 46 of file animation.h.


Member Enumeration Documentation

enum Plasma::Animation::MovementDirectionFlag

Animation movement direction.

Enumerator:
MoveAny 
MoveUp 
MoveRight 
MoveDown 
MoveLeft 

Definition at line 79 of file animation.h.

enum Plasma::Animation::ReferenceFlag

Animation movement reference (used by RotationAnimation).

Enumerator:
Center 
Up 
Down 
Left 
Right 

Definition at line 66 of file animation.h.


Constructor & Destructor Documentation

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

Default constructor.

Parameters:
parentObject parent (might be set when using Animator::create factory).

Definition at line 42 of file animation.cpp.

Plasma::Animation::~Animation ( ) [pure virtual]

Destructor.

Definition at line 48 of file animation.cpp.


Member Function Documentation

int Plasma::Animation::duration ( ) const

Get the animation duration.

It can be set using the property duration.

Returns:
duration in ms.
QEasingCurve Plasma::Animation::easingCurve ( ) const

Get the animation easing curve type.

void Plasma::Animation::setDuration ( int  duration = 250) [protected, virtual]

Change the animation duration.

Default is 250ms.

  • duration The new duration of the animation.

Definition at line 58 of file animation.cpp.

void Plasma::Animation::setEasingCurve ( const QEasingCurve &  curve)

Set the animation easing curve type.

Definition at line 76 of file animation.cpp.

void Plasma::Animation::setTargetWidget ( QGraphicsWidget *  widget)

Set the widget on which the animation is to be performed.

  • widget The QGraphicsWidget to be animated.

Definition at line 63 of file animation.cpp.

QGraphicsWidget* Plasma::Animation::targetWidget ( ) const
Returns:
The widget that the animation will be performed upon
void Plasma::Animation::updateCurrentTime ( int  currentTime) [protected, virtual]

QAbstractAnimation will call this method while the animation is running.

Each specialized animation class should implement the correct behavior for it.

Parameters:
currentTimeSlapsed time using the duration as reference (it will be from duration up to zero if the animation is running backwards).

Definition at line 86 of file animation.cpp.


Property Documentation

int Plasma::Animation::duration [read, write]

Definition at line 52 of file animation.h.

QEasingCurve Plasma::Animation::easingCurve [read, write]

Definition at line 53 of file animation.h.

QGraphicsWidget * Plasma::Animation::targetWidget [read, write]

Definition at line 54 of file animation.h.


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

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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