diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-05-25 12:46:47 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-05-25 12:47:24 (GMT) |
commit | b6b251cb8b36be434cf878a916c15019fd65b6f0 (patch) | |
tree | 6e79e80f06738ceaa5be66f1b8998d47b8aaa590 /examples/animation | |
parent | ee443b7873586592773190457ce8d21bcaae248e (diff) | |
download | Qt-b6b251cb8b36be434cf878a916c15019fd65b6f0.zip Qt-b6b251cb8b36be434cf878a916c15019fd65b6f0.tar.gz Qt-b6b251cb8b36be434cf878a916c15019fd65b6f0.tar.bz2 |
Removed some export to symbols that don't need it
...hopefully
Diffstat (limited to 'examples/animation')
-rw-r--r-- | examples/animation/sub-attaq/qanimationstate.cpp | 45 | ||||
-rw-r--r-- | examples/animation/sub-attaq/qanimationstate.h | 4 |
2 files changed, 14 insertions, 35 deletions
diff --git a/examples/animation/sub-attaq/qanimationstate.cpp b/examples/animation/sub-attaq/qanimationstate.cpp index 26e0ef3..d4d109c 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 88c0a6d..e5322ad 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 |