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