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

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
  • animations
animation.h
Go to the documentation of this file.
1 /*
2  * Copyright 2009 Mehmet Ali Akmanalp <makmanalp@wpi.edu>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
25 #ifndef PLASMA_ANIMATION_H
26 #define PLASMA_ANIMATION_H
27 
28 #include <QtGui/QGraphicsWidget>
29 #include <QtCore/QObject>
30 #include <QtCore/QPropertyAnimation>
31 #include <QtCore/QAbstractAnimation>
32 #include <QtCore/QEasingCurve>
33 
34 #include <plasma/plasma_export.h>
35 #include <plasma/plasma.h>
36 
37 namespace Plasma
38 {
39 
40 class AnimationPrivate;
41 
46 class PLASMA_EXPORT Animation : public QAbstractAnimation
47 {
48 
49  Q_OBJECT
50  Q_ENUMS(Reference)
51  Q_ENUMS(MovementDirection)
52  Q_PROPERTY(int duration READ duration WRITE setDuration)
53  Q_PROPERTY(QEasingCurve easingCurve READ easingCurve WRITE setEasingCurve)
54  Q_PROPERTY(QGraphicsWidget *targetWidget READ targetWidget WRITE setTargetWidget)
55 
56 public:
61  int duration() const;
62 
66  enum ReferenceFlag {
67  Center = 0,
68  Up = 0x1,
69  Down = 0x2,
70  Left = 0x4,
71  Right = 0x8
72  };
73 
74  Q_DECLARE_FLAGS(Reference, ReferenceFlag)
75 
76 
79  enum MovementDirectionFlag {
80  MoveAny = 0,
81  MoveUp = 0x1,
82  MoveRight = 0x2,
83  MoveDown = 0x4,
84  MoveLeft = 0x8
85  };
86 
87  Q_DECLARE_FLAGS(MovementDirection, MovementDirectionFlag)
88 
89 
96  explicit Animation(QObject* parent = 0);
97 
101  ~Animation() = 0;
102 
107  void setTargetWidget(QGraphicsWidget* widget);
108 
112  QGraphicsWidget *targetWidget() const;
113 
117  void setEasingCurve(const QEasingCurve &curve);
118 
122  QEasingCurve easingCurve() const;
123 
124 protected:
129  virtual void setDuration(int duration = 250);
130 
139  virtual void updateCurrentTime(int currentTime);
140 
141 private:
142 
147  AnimationPrivate *const d;
148 
149 };
150 
151 } //namespace Plasma
152 
153 #endif
Plasma::Up
Display upwards.
Definition: plasma.h:91
Plasma::Animation
Abstract representation of a single animation.
Definition: animation.h:46
QObject
Plasma::Animation::MovementDirectionFlag
MovementDirectionFlag
Animation movement direction.
Definition: animation.h:79
QAbstractAnimation
Plasma::Animation::ReferenceFlag
ReferenceFlag
Animation movement reference (used by RotationAnimation).
Definition: animation.h:66
plasma.h
Plasma::Down
Display downards.
Definition: plasma.h:90
Plasma::Right
Display to the right.
Definition: plasma.h:93
Plasma::Left
Display to the left.
Definition: plasma.h:92
plasma_export.h
QGraphicsWidget
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal