Improved factory, it will set the animation parent.

svn path=/trunk/KDE/kdelibs/; revision=1038248
This commit is contained in:
Adenilson Cavalcanti Da Silva 2009-10-20 21:40:36 +00:00
parent 82317bda2d
commit 1379d29481
2 changed files with 5 additions and 2 deletions

View File

@ -90,7 +90,7 @@ public:
* Factory to build new animation objects. To control their behavior,
* check \ref AbstractAnimation properties.
**/
AbstractAnimation *create(Animation type);
AbstractAnimation *create(Animation type, QObject *parent = 0);
/**
* Starts a standard animation on a QGraphicsItem.

View File

@ -220,7 +220,7 @@ Animator *Animator::self()
return &privateSelf->self;
}
AbstractAnimation *Animator::create(Animation type)
AbstractAnimation *Animator::create(Animation type, QObject *parent)
{
AbstractAnimation *result = 0;
@ -260,6 +260,9 @@ AbstractAnimation *Animator::create(Animation type)
}
if (result)
result->setParent(parent);
return result;
}