summaryrefslogtreecommitdiffstats
path: root/examples/animation/stickman/editor/animationdialog.h
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-17 14:06:06 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-04-17 14:06:06 (GMT)
commitf15b8a83e2e51955776a3f07cb85ebfc342dd8ef (patch)
treec5dc684986051654898db11ce73e03b9fec8db99 /examples/animation/stickman/editor/animationdialog.h
downloadQt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.zip
Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.gz
Qt-f15b8a83e2e51955776a3f07cb85ebfc342dd8ef.tar.bz2
Initial import of statemachine branch from the old kinetic repository
Diffstat (limited to 'examples/animation/stickman/editor/animationdialog.h')
-rw-r--r--examples/animation/stickman/editor/animationdialog.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/examples/animation/stickman/editor/animationdialog.h b/examples/animation/stickman/editor/animationdialog.h
new file mode 100644
index 0000000..c144fd8
--- /dev/null
+++ b/examples/animation/stickman/editor/animationdialog.h
@@ -0,0 +1,41 @@
+#ifndef ANIMATIONDIALOG_H
+#define ANIMATIONDIALOG_H
+
+#include <QDialog>
+#include <QMessageBox>
+
+class QSpinBox;
+class QLineEdit;
+class StickMan;
+class Animation;
+class AnimationDialog: public QDialog
+{
+ Q_OBJECT
+public:
+ AnimationDialog(StickMan *stickMan, QWidget *parent = 0);
+ ~AnimationDialog();
+
+public slots:
+ void currentFrameChanged(int currentFrame);
+ void totalFramesChanged(int totalFrames);
+ void setCurrentAnimationName(const QString &name);
+
+ void newAnimation();
+ void saveAnimation();
+ void loadAnimation();
+
+private:
+ void saveCurrentFrame();
+ void stickManFromCurrentFrame();
+ void initFromAnimation();
+ void initUi();
+ QMessageBox::StandardButton maybeSave();
+
+ QSpinBox *m_currentFrame;
+ QSpinBox *m_totalFrames;
+ QLineEdit *m_name;
+ Animation *m_animation;
+ StickMan *m_stickman;
+};
+
+#endif