Plasma
#include <animation.h>
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 |
Public Member Functions inherited from QAbstractAnimation | |
QAbstractAnimation (QObject *parent) | |
virtual | ~QAbstractAnimation () |
int | currentLoop () const |
void | currentLoopChanged (int currentLoop) |
int | currentLoopTime () const |
int | currentTime () const |
Direction | direction () const |
void | directionChanged (QAbstractAnimation::Direction newDirection) |
virtual int | duration () const =0 |
void | finished () |
QAnimationGroup * | group () const |
int | loopCount () const |
void | pause () |
void | resume () |
void | setCurrentTime (int msecs) |
void | setDirection (Direction direction) |
void | setLoopCount (int loopCount) |
void | setPaused (bool paused) |
void | start (QAbstractAnimation::DeletionPolicy policy) |
State | state () const |
void | stateChanged (QAbstractAnimation::State newState, QAbstractAnimation::State oldState) |
void | stop () |
int | totalDuration () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
virtual void | setDuration (int duration=250) |
virtual void | updateCurrentTime (int currentTime) |
Protected Member Functions inherited from QAbstractAnimation | |
virtual bool | event (QEvent *event) |
virtual void | updateCurrentTime (int currentTime)=0 |
virtual void | updateDirection (QAbstractAnimation::Direction direction) |
virtual void | updateState (QAbstractAnimation::State newState, QAbstractAnimation::State oldState) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Properties | |
int | duration |
QEasingCurve | easingCurve |
QGraphicsWidget | targetWidget |
Properties inherited from QAbstractAnimation | |
currentLoop | |
currentTime | |
direction | |
duration | |
loopCount | |
state | |
Properties inherited from QObject | |
objectName | |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Detailed Description
Member Enumeration Documentation
Animation movement direction.
Enumerator | |
---|---|
MoveAny | |
MoveUp | |
MoveRight | |
MoveDown | |
MoveLeft |
Definition at line 79 of file animation.h.
Animation movement reference (used by RotationAnimation).
Enumerator | |
---|---|
Center | |
Up | |
Down | |
Left | |
Right |
Definition at line 66 of file animation.h.
Constructor & Destructor Documentation
|
explicit |
Default constructor.
- Parameters
-
parent Object parent (might be set when using Animator::create factory).
Definition at line 41 of file animation.cpp.
|
pure virtual |
Destructor.
Definition at line 47 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.
|
protectedvirtual |
Change the animation duration.
Default is 250ms.
- Parameters
-
duration The new duration of the animation.
Definition at line 57 of file animation.cpp.
void Plasma::Animation::setEasingCurve | ( | const QEasingCurve & | curve | ) |
Set the animation easing curve type.
Definition at line 75 of file animation.cpp.
void Plasma::Animation::setTargetWidget | ( | QGraphicsWidget * | widget | ) |
Set the widget on which the animation is to be performed.
- Parameters
-
widget The QGraphicsWidget to be animated.
Definition at line 62 of file animation.cpp.
QGraphicsWidget* Plasma::Animation::targetWidget | ( | ) | const |
- Returns
- The widget that the animation will be performed upon
|
protectedvirtual |
QAbstractAnimation will call this method while the animation is running.
Each specialized animation class should implement the correct behavior for it.
- Parameters
-
currentTime Slapsed time using the duration as reference (it will be from duration up to zero if the animation is running backwards).
Definition at line 85 of file animation.cpp.
Property Documentation
|
readwrite |
Definition at line 52 of file animation.h.
|
readwrite |
Definition at line 53 of file animation.h.
|
readwrite |
Definition at line 54 of file animation.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.