libplasma
animator.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ANIMATOR_H
00022 #define ANIMATOR_H
00023
00024 #include <QtCore/QObject>
00025 #include <QtGui/QRegion>
00026 #include <QtGui/QPixmap>
00027
00028 #include <kgenericfactory.h>
00029
00030 #include <plasma/plasma_export.h>
00031 #include <plasma/phase.h>
00032
00033 class QGraphicsItem;
00034
00035 namespace Plasma
00036 {
00037
00038 class PLASMA_EXPORT Animator : public QObject
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 explicit Animator(QObject *parent = 0);
00044 ~Animator();
00045
00046
00047 virtual int framesPerSecond(Plasma::Phase::Animation);
00048 virtual int framesPerSecond(Plasma::Phase::Movement);
00049 virtual int framesPerSecond(Plasma::Phase::ElementAnimation);
00050 virtual Phase::CurveShape curve(Plasma::Phase::Animation);
00051 virtual Phase::CurveShape curve(Plasma::Phase::Movement);
00052 virtual Phase::CurveShape curve(Plasma::Phase::ElementAnimation);
00053
00054
00055 virtual QPixmap elementAppear(qreal frame, const QPixmap& pixmap);
00056 virtual QPixmap elementDisappear(qreal frame, const QPixmap& pixmap);
00057
00058
00059 virtual void appear(qreal progress, QGraphicsItem* item);
00060 virtual void disappear(qreal progress, QGraphicsItem* item);
00061 virtual void frameAppear(qreal progress, QGraphicsItem* item, const QRegion& drawable);
00062 virtual void activate(qreal progress, QGraphicsItem* item);
00063
00064
00065 virtual void slideIn(qreal progress, QGraphicsItem* item, const QPoint &start, const QPoint &destination);
00066 virtual void slideOut(qreal progress, QGraphicsItem* item, const QPoint &start, const QPoint &destination);
00067
00068 private:
00069 class Private;
00070 Private * const d;
00071 };
00072
00073 }
00074
00075 #define K_EXPORT_PLASMA_ANIMATOR(libname, classname) \
00076 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
00077 K_EXPORT_PLUGIN(factory("plasma_animator_" #libname))
00078
00079 #endif // multiple inclusion guard