summaryrefslogtreecommitdiffstats
path: root/examples/animation
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-25 14:46:47 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-25 14:47:24 +0200
commitb6b251cb8b36be434cf878a916c15019fd65b6f0 (patch)
tree6e79e80f06738ceaa5be66f1b8998d47b8aaa590 /examples/animation
parentee443b7873586592773190457ce8d21bcaae248e (diff)
Removed some export to symbols that don't need it
...hopefully
Diffstat (limited to 'examples/animation')
-rw-r--r--examples/animation/sub-attaq/qanimationstate.cpp45
-rw-r--r--examples/animation/sub-attaq/qanimationstate.h4
2 files changed, 14 insertions, 35 deletions
diff --git a/examples/animation/sub-attaq/qanimationstate.cpp b/examples/animation/sub-attaq/qanimationstate.cpp
index 26e0ef3a54..d4d109c0b1 100644
--- a/examples/animation/sub-attaq/qanimationstate.cpp
+++ b/examples/animation/sub-attaq/qanimationstate.cpp
@@ -42,8 +42,6 @@
#include "qanimationstate.h"
#include <QtCore/qstate.h>
-#include <private/qstate_p.h>
-
QT_BEGIN_NAMESPACE
@@ -76,25 +74,11 @@ machine.start();
#ifndef QT_NO_ANIMATION
-class QAnimationStatePrivate : public QStatePrivate
-{
- Q_DECLARE_PUBLIC(QAnimationState)
-public:
- QAnimationStatePrivate()
- : animation(0)
- {
-
- }
- ~QAnimationStatePrivate() {}
-
- QAbstractAnimation *animation;
-};
-
/*!
Constructs a new state with the given \a parent state.
*/
QAnimationState::QAnimationState(QState *parent)
- : QState(*new QAnimationStatePrivate, parent)
+ : QState(parent), m_animation(0)
{
}
@@ -112,20 +96,18 @@ QAnimationState::~QAnimationState()
*/
void QAnimationState::setAnimation(QAbstractAnimation *animation)
{
- Q_D(QAnimationState);
-
- if (animation == d->animation)
+ if (animation == m_animation)
return;
//Disconnect from the previous animation if exist
- if(d->animation)
- disconnect(d->animation, SIGNAL(finished()), this, SIGNAL(animationFinished()));
+ if(m_animation)
+ disconnect(m_animation, SIGNAL(finished()), this, SIGNAL(animationFinished()));
- d->animation = animation;
+ m_animation = animation;
- if (d->animation) {
+ if (m_animation) {
//connect the new animation
- connect(d->animation, SIGNAL(finished()), this, SIGNAL(animationFinished()));
+ connect(m_animation, SIGNAL(finished()), this, SIGNAL(animationFinished()));
}
}
@@ -134,8 +116,7 @@ void QAnimationState::setAnimation(QAbstractAnimation *animation)
*/
QAbstractAnimation* QAnimationState::animation() const
{
- Q_D(const QAnimationState);
- return d->animation;
+ return m_animation;
}
/*!
@@ -143,9 +124,8 @@ QAbstractAnimation* QAnimationState::animation() const
*/
void QAnimationState::onEntry(QEvent *)
{
- Q_D(QAnimationState);
- if (d->animation)
- d->animation->start();
+ if (m_animation)
+ m_animation->start();
}
/*!
@@ -153,9 +133,8 @@ void QAnimationState::onEntry(QEvent *)
*/
void QAnimationState::onExit(QEvent *)
{
- Q_D(QAnimationState);
- if (d->animation)
- d->animation->stop();
+ if (m_animation)
+ m_animation->stop();
}
/*!
diff --git a/examples/animation/sub-attaq/qanimationstate.h b/examples/animation/sub-attaq/qanimationstate.h
index 88c0a6d004..e5322adb6b 100644
--- a/examples/animation/sub-attaq/qanimationstate.h
+++ b/examples/animation/sub-attaq/qanimationstate.h
@@ -58,7 +58,7 @@ QT_MODULE(Gui)
#ifndef QT_NO_ANIMATION
-class QAnimationStatePrivate;
+class QAbstractAnimation;
class QAnimationState : public QState
{
@@ -80,7 +80,7 @@ protected:
private:
Q_DISABLE_COPY(QAnimationState)
- Q_DECLARE_PRIVATE(QAnimationState)
+ QAbstractAnimation *m_animation;
};
#endif