summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qwidgetanimator_p.h
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@trolltech.com>2009-07-15 10:30:21 (GMT)
committerPeter Hartmann <peter.hartmann@trolltech.com>2009-07-15 10:30:21 (GMT)
commit97f82b2344334fa158f20e4ed059984fd3c43162 (patch)
tree05a38900c0409a904f45ad35b7447baef13623ed /src/gui/widgets/qwidgetanimator_p.h
parent2567ec486d5d95dc4ca06874cf75bf03bd7502b9 (diff)
parent28d0930593c6c04a7ef538353f8bee55df00a0e8 (diff)
downloadQt-97f82b2344334fa158f20e4ed059984fd3c43162.zip
Qt-97f82b2344334fa158f20e4ed059984fd3c43162.tar.gz
Qt-97f82b2344334fa158f20e4ed059984fd3c43162.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/widgets/qwidgetanimator_p.h')
-rw-r--r--src/gui/widgets/qwidgetanimator_p.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/gui/widgets/qwidgetanimator_p.h b/src/gui/widgets/qwidgetanimator_p.h
index 0c68e00..5a3e39d 100644
--- a/src/gui/widgets/qwidgetanimator_p.h
+++ b/src/gui/widgets/qwidgetanimator_p.h
@@ -54,43 +54,34 @@
//
#include <qobject.h>
-#include <qrect.h>
#include <qmap.h>
-#include <qbasictimer.h>
-#include <qdatetime.h>
QT_BEGIN_NAMESPACE
class QWidget;
class QMainWindowLayout;
+class QPropertyAnimation;
+class QRect;
class QWidgetAnimator : public QObject
{
+ Q_OBJECT
public:
QWidgetAnimator(QMainWindowLayout *layout);
- ~QWidgetAnimator();
void animate(QWidget *widget, const QRect &final_geometry, bool animate);
bool animating() const;
- bool animating(QWidget *widget);
+ bool animating(QWidget *widget) const;
void abort(QWidget *widget);
-protected:
- void timerEvent(QTimerEvent *e);
+#ifndef QT_NO_ANIMATION
+private Q_SLOTS:
+ void animationFinished();
+#endif
private:
- struct AnimationItem {
- AnimationItem(QWidget *_widget = 0, const QRect &_r1 = QRect(),
- const QRect &_r2 = QRect())
- : widget(_widget), r1(_r1), r2(_r2), step(0) {}
- QWidget *widget;
- QRect r1, r2;
- int step;
- };
- typedef QMap<QWidget*, AnimationItem> AnimationMap;
+ typedef QMap<QWidget*, QPropertyAnimation*> AnimationMap;
AnimationMap m_animation_map;
- QBasicTimer m_timer;
- QTime m_time;
QMainWindowLayout *m_mainWindowLayout;
};