2009-10-17 19:35:02 +02:00
|
|
|
/***********************************************************************/
|
2009-10-22 21:36:29 +02:00
|
|
|
/* animationprivate.h */
|
|
|
|
/* */
|
2009-10-17 19:35:02 +02:00
|
|
|
/* Copyright(C) 2009 Adenilson Cavalcanti <adenilson.silva@idnt.org.br>*/
|
2009-10-22 21:36:29 +02:00
|
|
|
/* */
|
2009-10-17 19:35:02 +02:00
|
|
|
/* This library is free software; you can redistribute it and/or */
|
2009-10-22 21:36:29 +02:00
|
|
|
/* modify it under the terms of the GNU Lesser General Public */
|
|
|
|
/* License as published by the Free Software Foundation; either */
|
2009-10-17 19:35:02 +02:00
|
|
|
/* version 2.1 of the License, or (at your option) any later version. */
|
2009-10-22 21:36:29 +02:00
|
|
|
/* */
|
2009-10-17 19:35:02 +02:00
|
|
|
/* This library is distributed in the hope that it will be useful, */
|
|
|
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
|
|
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
|
2009-10-22 21:36:29 +02:00
|
|
|
/* Lesser General Public License for more details. */
|
|
|
|
/* */
|
2009-10-17 19:35:02 +02:00
|
|
|
/* You should have received a copy of the GNU Lesser General Public */
|
|
|
|
/* License along with this library; if not, write to the Free Software */
|
|
|
|
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */
|
2009-10-22 21:36:29 +02:00
|
|
|
/* 02110-1301 USA */
|
2009-10-17 19:35:02 +02:00
|
|
|
/***********************************************************************/
|
|
|
|
#ifndef PLASMA_ANIMATIONPRIVATE_H
|
|
|
|
#define PLASMA_ANIMATIONPRIVATE_H
|
|
|
|
|
2009-10-20 23:14:46 +02:00
|
|
|
#include <QEasingCurve>
|
|
|
|
#include <QWeakPointer>
|
2009-10-23 20:39:57 +02:00
|
|
|
class QAbstractAnimation;
|
2009-10-20 15:08:23 +02:00
|
|
|
|
2009-10-17 19:35:02 +02:00
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
2009-12-03 20:30:02 +01:00
|
|
|
class AnimationPrivate
|
2009-10-17 19:35:02 +02:00
|
|
|
{
|
|
|
|
public:
|
2009-10-22 15:40:30 +02:00
|
|
|
|
|
|
|
AbstractAnimationPrivate();
|
2009-10-17 19:35:02 +02:00
|
|
|
/**
|
|
|
|
* Object the animation(s) should act upon.
|
|
|
|
*/
|
2009-10-20 23:14:46 +02:00
|
|
|
QWeakPointer<QGraphicsWidget> animObject;
|
2009-10-17 19:35:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Animation direction: where the animation will move.
|
|
|
|
*/
|
2009-11-12 21:15:43 +01:00
|
|
|
qint8 animDirection;
|
2009-10-17 19:35:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Animation distance: displacement factor for animations where
|
|
|
|
* there is change in the position of animated widget.
|
|
|
|
*/
|
|
|
|
qreal animDistance;
|
|
|
|
|
2009-10-20 15:08:23 +02:00
|
|
|
/**
|
|
|
|
* Animation easing curve type
|
|
|
|
*/
|
2009-12-09 17:28:27 +01:00
|
|
|
QEasingCurve easingCurve;
|
2009-10-20 15:08:23 +02:00
|
|
|
|
2009-10-21 07:32:04 +02:00
|
|
|
/**
|
2009-10-22 17:35:08 +02:00
|
|
|
* Animation direction, the idea is to offer a way
|
2009-10-22 17:20:17 +02:00
|
|
|
* to rewind the animation by setDirection(QAbstractAnimation::Backward).
|
|
|
|
*/
|
2009-10-22 15:40:30 +02:00
|
|
|
bool forwards;
|
2009-12-03 20:30:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Duration of the animation. Default is 250ms.
|
|
|
|
*/
|
|
|
|
int duration;
|
|
|
|
|
2009-10-17 19:35:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|