2009-12-27 23:16:11 +01:00
|
|
|
/*
|
|
|
|
Copyright (C) 2009 Adenilson Cavalcanti <adenilson.silva@idnt.org.br>
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
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
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLASMA_ABSTRACTANIMATIONPRIVATE_P_H
|
|
|
|
#define PLASMA_ABSTRACTANIMATIONPRIVATE_P_H
|
2009-10-17 19:35:02 +02:00
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-12-27 23:16:11 +01:00
|
|
|
#endif // PLASMA_ABSTRACTANIMATIONPRIVATE_P_H
|