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

libplasma

animator.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 Aaron Seigo <aseigo@kde.org>
00003  *                 2007 Alexis Ménard <darktears31@gmail.com>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU Library General Public License as
00007  *   published by the Free Software Foundation; either version 2, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details
00014  *
00015  *   You should have received a copy of the GNU Library General Public
00016  *   License along with this program; if not, write to the
00017  *   Free Software Foundation, Inc.,
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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     // Parameter definitions
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     // Element animations
00055     virtual QPixmap elementAppear(qreal frame, const QPixmap& pixmap);
00056     virtual QPixmap elementDisappear(qreal frame, const QPixmap& pixmap);
00057 
00058     // Item animations
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     // Item movements
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 } // Plasma namespace
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

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