summaryrefslogtreecommitdiffstats
path: root/tests/manual/examples/widgets/widgets/movie/movieplayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/examples/widgets/widgets/movie/movieplayer.h')
-rw-r--r--tests/manual/examples/widgets/widgets/movie/movieplayer.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/widgets/movie/movieplayer.h b/tests/manual/examples/widgets/widgets/movie/movieplayer.h
new file mode 100644
index 0000000000..362fd50535
--- /dev/null
+++ b/tests/manual/examples/widgets/widgets/movie/movieplayer.h
@@ -0,0 +1,59 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef MOVIEPLAYER_H
+#define MOVIEPLAYER_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QGridLayout;
+class QHBoxLayout;
+class QLabel;
+class QMovie;
+class QSlider;
+class QSpinBox;
+class QToolButton;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+class MoviePlayer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MoviePlayer(QWidget *parent = nullptr);
+ void openFile(const QString &fileName);
+
+private slots:
+ void open();
+ void goToFrame(int frame);
+ void fitToWindow();
+ void updateButtons();
+ void updateFrameSlider();
+
+private:
+ void createControls();
+ void createButtons();
+
+ QString currentMovieDirectory;
+ QLabel *movieLabel;
+ QMovie *movie;
+ QToolButton *openButton;
+ QToolButton *playButton;
+ QToolButton *pauseButton;
+ QToolButton *stopButton;
+ QToolButton *quitButton;
+ QCheckBox *fitCheckBox;
+ QSlider *frameSlider;
+ QSpinBox *speedSpinBox;
+ QLabel *frameLabel;
+ QLabel *speedLabel;
+
+ QGridLayout *controlsLayout;
+ QHBoxLayout *buttonsLayout;
+ QVBoxLayout *mainLayout;
+};
+
+#endif