OpenShot Library | libopenshot  0.3.2
PlayerDemo.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2008-2019 OpenShot Studios, LLC
10 //
11 // SPDX-License-Identifier: LGPL-3.0-or-later
12 
13 #ifndef OPENSHOT_PLAYER_DEMO_H
14 #define OPENSHOT_PLAYER_DEMO_H
15 
16 #include <QObject>
17 #include <QWidget>
18 #include <QKeyEvent>
19 #include <QCloseEvent>
20 #include <QVBoxLayout>
21 #include <QMenuBar>
22 
23 #include "VideoRenderWidget.h"
24 
25 // Define the QtPlayer without including it (due to build issues with Qt moc / Qt macros)
26 namespace openshot
27 {
28  class QtPlayer;
29 }
30 
31 class PlayerDemo : public QWidget
32 {
33  Q_OBJECT
34 
35 public:
36  PlayerDemo(QWidget *parent = 0);
37  ~PlayerDemo();
38 
39 protected:
40  void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
41  void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
42 
43 private slots:
44  void open(bool checked);
45 
46 private:
47  QVBoxLayout *vbox;
48  QMenuBar *menu;
49  VideoRenderWidget *video;
50  openshot::QtPlayer *player;
51 };
52 
53 #endif // OPENSHOT_PLAYER_H
PlayerDemo::keyPressEvent
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE
Definition: PlayerDemo.cpp:68
openshot
This namespace is the default namespace for all code in the openshot library.
Definition: Compressor.h:28
VideoRenderWidget
Definition: VideoRenderWidget.h:24
PlayerDemo::~PlayerDemo
~PlayerDemo()
Definition: PlayerDemo.cpp:55
PlayerDemo
Definition: PlayerDemo.h:31
PlayerDemo::PlayerDemo
PlayerDemo(QWidget *parent=0)
Definition: PlayerDemo.cpp:28
openshot::QtPlayer
This class is used to playback a video from a reader.
Definition: QtPlayer.h:32
PlayerDemo::closeEvent
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
Definition: PlayerDemo.cpp:59
VideoRenderWidget.h
Header file for Video RendererWidget class.