OpenShot Library | libopenshot  0.1.9
PlayerDemo.h
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Header file for demo application for QtPlayer class
4  * @author Jonathan Thomas <jonathan@openshot.org>
5  *
6  * @section LICENSE
7  *
8  * Copyright (c) 2008-2014 OpenShot Studios, LLC
9  * <http://www.openshotstudios.com/>. This file is part of
10  * OpenShot Library (libopenshot), an open-source project dedicated to
11  * delivering high quality video editing and animation solutions to the
12  * world. For more information visit <http://www.openshot.org/>.
13  *
14  * OpenShot Library (libopenshot) is free software: you can redistribute it
15  * and/or modify it under the terms of the GNU Lesser General Public License
16  * as published by the Free Software Foundation, either version 3 of the
17  * License, or (at your option) any later version.
18  *
19  * OpenShot Library (libopenshot) is distributed in the hope that it will be
20  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public License
25  * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
26  */
27 
28 #ifndef OPENSHOT_PLAYER_DEMO_H
29 #define OPENSHOT_PLAYER_DEMO_H
30 
31 #include <QtWidgets/QWidget>
32 #include <QtWidgets/QBoxLayout>
33 #include <QtWidgets/QMenuBar>
34 #include <QtWidgets/QMenu>
35 #include <QtGui/qevent.h>
36 #include <QApplication>
37 
38 #include "VideoRenderWidget.h"
39 
40 // Define the QtPlayer without including it (due to build issues with Qt moc / Qt macros)
41 namespace openshot
42 {
43  class QtPlayer;
44 }
45 
46 using openshot::QtPlayer;
47 
48 class PlayerDemo : public QWidget
49 {
50  Q_OBJECT
51 
52 public:
53  PlayerDemo(QWidget *parent = 0);
54  ~PlayerDemo();
55 
56 protected:
57  void keyPressEvent(QKeyEvent *event);
58  void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
59 
60 private slots:
61  void open(bool checked);
62 
63 private:
64  QVBoxLayout *vbox;
65  QMenuBar *menu;
66  VideoRenderWidget *video;
67  QtPlayer *player;
68 };
69 
70 #endif // OPENSHOT_PLAYER_H
This class is used to playback a video from a reader.
Definition: QtPlayer.h:46
This namespace is the default namespace for all code in the openshot library.
Header file for Video RendererWidget class.