protected slots -> Q_PRIVATE_SLOT
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802610
This commit is contained in:
parent
67f44e6f0a
commit
5482bad2ce
20
animator.cpp
20
animator.cpp
@ -164,6 +164,10 @@ class Animator::Private
|
|||||||
}
|
}
|
||||||
|
|
||||||
void init(Animator *q);
|
void init(Animator *q);
|
||||||
|
void animatedItemDestroyed(QObject*);
|
||||||
|
void movingItemDestroyed(QObject*);
|
||||||
|
void animatedElementDestroyed(QObject*);
|
||||||
|
void customAnimReceiverDestroyed(QObject*);
|
||||||
|
|
||||||
AnimationDriver* driver;
|
AnimationDriver* driver;
|
||||||
int animId;
|
int animId;
|
||||||
@ -205,10 +209,10 @@ Animator::~Animator()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animator::animatedItemDestroyed(QObject* o)
|
void Animator::Private::animatedItemDestroyed(QObject* o)
|
||||||
{
|
{
|
||||||
//kDebug() << "testing for" << (void*)o;
|
//kDebug() << "testing for" << (void*)o;
|
||||||
QMutableMapIterator<QGraphicsItem*, AnimationState*> it(d->animatedItems);
|
QMutableMapIterator<QGraphicsItem*, AnimationState*> it(animatedItems);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
//kDebug() << "comparing against" << it.value()->qobj;
|
//kDebug() << "comparing against" << it.value()->qobj;
|
||||||
@ -220,9 +224,9 @@ void Animator::animatedItemDestroyed(QObject* o)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animator::movingItemDestroyed(QObject* o)
|
void Animator::Private::movingItemDestroyed(QObject* o)
|
||||||
{
|
{
|
||||||
QMutableMapIterator<QGraphicsItem*, MovementState*> it(d->movingItems);
|
QMutableMapIterator<QGraphicsItem*, MovementState*> it(movingItems);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
if (it.value()->qobj == o) {
|
if (it.value()->qobj == o) {
|
||||||
@ -232,9 +236,9 @@ void Animator::movingItemDestroyed(QObject* o)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animator::animatedElementDestroyed(QObject* o)
|
void Animator::Private::animatedElementDestroyed(QObject* o)
|
||||||
{
|
{
|
||||||
QMutableMapIterator<int, ElementAnimationState*> it(d->animatedElements);
|
QMutableMapIterator<int, ElementAnimationState*> it(animatedElements);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
if (it.value()->qobj == o) {
|
if (it.value()->qobj == o) {
|
||||||
@ -244,9 +248,9 @@ void Animator::animatedElementDestroyed(QObject* o)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animator::customAnimReceiverDestroyed(QObject* o)
|
void Animator::Private::customAnimReceiverDestroyed(QObject* o)
|
||||||
{
|
{
|
||||||
QMutableMapIterator<int, CustomAnimationState*> it(d->customAnims);
|
QMutableMapIterator<int, CustomAnimationState*> it(customAnims);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
if (it.next().value()->receiver == o) {
|
if (it.next().value()->receiver == o) {
|
||||||
delete it.value()->slot;
|
delete it.value()->slot;
|
||||||
|
11
animator.h
11
animator.h
@ -156,17 +156,16 @@ Q_SIGNALS:
|
|||||||
protected:
|
protected:
|
||||||
void timerEvent(QTimerEvent *event);
|
void timerEvent(QTimerEvent *event);
|
||||||
|
|
||||||
protected Q_SLOTS:
|
|
||||||
void animatedItemDestroyed(QObject*);
|
|
||||||
void movingItemDestroyed(QObject*);
|
|
||||||
void animatedElementDestroyed(QObject*);
|
|
||||||
void customAnimReceiverDestroyed(QObject*);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class AnimatorSingleton;
|
friend class AnimatorSingleton;
|
||||||
explicit Animator(QObject * parent = 0);
|
explicit Animator(QObject * parent = 0);
|
||||||
~Animator();
|
~Animator();
|
||||||
|
|
||||||
|
Q_PRIVATE_SLOT(d, void animatedItemDestroyed(QObject*));
|
||||||
|
Q_PRIVATE_SLOT(d, void movingItemDestroyed(QObject*));
|
||||||
|
Q_PRIVATE_SLOT(d, void animatedElementDestroyed(QObject*));
|
||||||
|
Q_PRIVATE_SLOT(d, void customAnimReceiverDestroyed(QObject*));
|
||||||
|
|
||||||
class Private;
|
class Private;
|
||||||
Private * const d;
|
Private * const d;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user