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

libplasma

animationdriver.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 ANIMATIONDRIVER_H
00022 #define ANIMATIONDRIVER_H
00023 
00024 #include <QtCore/QObject>
00025 #include <QtGui/QRegion>
00026 #include <QtGui/QPixmap>
00027 
00028 #include <kgenericfactory.h>
00029 
00030 #include <plasma/version.h>
00031 #include <plasma/animator.h>
00032 
00033 class QGraphicsItem;
00034 
00035 namespace Plasma
00036 {
00037 
00038 class AnimationDriverPrivate;
00039 
00040 class PLASMA_EXPORT AnimationDriver : public QObject
00041 {
00042     Q_OBJECT
00043 
00044 public:
00045     explicit AnimationDriver(QObject *parent = 0);
00046     ~AnimationDriver();
00047 
00048     // Parameter definitions
00049     virtual int animationFps(Plasma::Animator::Animation) const;
00050     virtual int movementAnimationFps(Plasma::Animator::Movement) const;
00051     virtual int elementAnimationFps(Plasma::Animator::Animation) const;
00052     virtual int animationDuration(Plasma::Animator::Animation) const;
00053     virtual int movementAnimationDuration(Plasma::Animator::Movement) const;
00054     virtual int elementAnimationDuration(Plasma::Animator::Animation) const;
00055     virtual Animator::CurveShape animationCurve(Plasma::Animator::Animation) const;
00056     virtual Animator::CurveShape movementAnimationCurve(Plasma::Animator::Movement) const;
00057     virtual Animator::CurveShape elementAnimationCurve(Plasma::Animator::Animation) const;
00058 
00059     // Element animations
00060     virtual QPixmap elementAppear(qreal progress, const QPixmap& pixmap);
00061     virtual QPixmap elementDisappear(qreal progress, const QPixmap& pixmap);
00062 
00063     // Item animations
00064     virtual void itemAppear(qreal progress, QGraphicsItem* item);
00065     virtual void itemDisappear(qreal progress, QGraphicsItem* item);
00066     virtual void itemActivated(qreal progress, QGraphicsItem* item);
00067 
00068     // Item movements
00069     virtual void itemSlideIn(qreal progress, QGraphicsItem* item, const QPoint &start, const QPoint &destination);
00070     virtual void itemSlideOut(qreal progress, QGraphicsItem* item, const QPoint &start, const QPoint &destination);
00071 
00072 private:
00073     AnimationDriverPrivate * const d;
00074 };
00075 
00076 } // Plasma namespace
00077 
00078 #define K_EXPORT_PLASMA_ANIMATOR(libname, classname) \
00079 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
00080 K_EXPORT_PLUGIN(factory("plasma_animator_" #libname)) \
00081 K_EXPORT_PLUGIN_VERSION(PLASMA_VERSION)
00082 
00083 #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
  •   libsolidcontrol
  •   libtaskmanager
  • 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