one more go at this method name; i don't think it will be in the public API anyways
svn path=/trunk/KDE/kdelibs/; revision=1036265
This commit is contained in:
parent
84b8265322
commit
a1d93d4118
@ -58,7 +58,7 @@ public:
|
|||||||
* Take an AbstractAnimation and turn it into a
|
* Take an AbstractAnimation and turn it into a
|
||||||
* QAbstractAnimation.
|
* QAbstractAnimation.
|
||||||
*/
|
*/
|
||||||
virtual QAbstractAnimation* asQAnimation(QObject* parent) = 0;
|
virtual QAbstractAnimation* toQAbstractAnimation(QObject* parent) = 0;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
@ -66,13 +66,13 @@ void Animation::setDuration(int duration)
|
|||||||
|
|
||||||
void Animation::start()
|
void Animation::start()
|
||||||
{
|
{
|
||||||
QAbstractAnimation* anim = asQAnimation(d->m_parent);
|
QAbstractAnimation* anim = toQAbstractAnimation(d->m_parent);
|
||||||
if (anim) {
|
if (anim) {
|
||||||
anim->start(QAbstractAnimation::DeleteWhenStopped);
|
anim->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractAnimation* Animation::asQAnimation(QObject* parent)
|
QAbstractAnimation* Animation::toQAbstractAnimation(QObject* parent)
|
||||||
{
|
{
|
||||||
//check if .setObject() was done
|
//check if .setObject() was done
|
||||||
if (!getAnimatedObject()) {
|
if (!getAnimatedObject()) {
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
* NULL on error. This function just does some boilerplate checking and then
|
* NULL on error. This function just does some boilerplate checking and then
|
||||||
* calls render().
|
* calls render().
|
||||||
*/
|
*/
|
||||||
QAbstractAnimation* asQAnimation(QObject* parent = 0);
|
QAbstractAnimation* toQAbstractAnimation(QObject* parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void AnimationGroup::remove(int id)
|
|||||||
|
|
||||||
void AnimationGroup::start()
|
void AnimationGroup::start()
|
||||||
{
|
{
|
||||||
QAbstractAnimation* anim = asQAnimation(m_parent);
|
QAbstractAnimation* anim = toQAbstractAnimation(m_parent);
|
||||||
if (anim){
|
if (anim){
|
||||||
/* FIXME: why to create and delete all the animations
|
/* FIXME: why to create and delete all the animations
|
||||||
* every single time it runs?
|
* every single time it runs?
|
||||||
@ -73,7 +73,7 @@ void AnimationGroup::start()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QAnimationGroup* AnimationGroup::asQAnimation(QObject* parent)
|
QAnimationGroup* AnimationGroup::toQAbstractAnimation(QObject* parent)
|
||||||
{
|
{
|
||||||
//if supplied, use parent given in args.
|
//if supplied, use parent given in args.
|
||||||
QObject* correctParent;
|
QObject* correctParent;
|
||||||
@ -93,7 +93,7 @@ QAnimationGroup* AnimationGroup::asQAnimation(QObject* parent)
|
|||||||
QListIterator<AbstractAnimation*> it(anims);
|
QListIterator<AbstractAnimation*> it(anims);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
//add with group as owner
|
//add with group as owner
|
||||||
g->addAnimation(it.next()->asQAnimation(g));
|
g->addAnimation(it.next()->toQAbstractAnimation(g));
|
||||||
}
|
}
|
||||||
|
|
||||||
return g;
|
return g;
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
* specifically, a QSerialAnimation or QParallelAnimation depending on
|
* specifically, a QSerialAnimation or QParallelAnimation depending on
|
||||||
* the value of m_parallel at the time of invocation. Returns NULL on error.
|
* the value of m_parallel at the time of invocation. Returns NULL on error.
|
||||||
*/
|
*/
|
||||||
QAnimationGroup* asQAnimation(QObject* parent = 0);
|
QAnimationGroup* toQAbstractAnimation(QObject* parent = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -31,14 +31,11 @@ class PLASMA_EXPORT PulseAnimation : public Animation
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PulseAnimation();
|
PulseAnimation();
|
||||||
|
~PulseAnimation();
|
||||||
virtual ~PulseAnimation();
|
|
||||||
|
|
||||||
void updateGeometry(QRectF updated, qreal zCoordinate = 0, qreal scale = 1.5);
|
void updateGeometry(QRectF updated, qreal zCoordinate = 0, qreal scale = 1.5);
|
||||||
|
|
||||||
void setCopy(QGraphicsWidget *copy);
|
void setCopy(QGraphicsWidget *copy);
|
||||||
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void start();
|
void start();
|
||||||
void resetPulser();
|
void resetPulser();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user