From 68ee6a0ec973940eb4f799b00f6518a902cbc4e5 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 26 Aug 2018 20:35:23 +0200 Subject: Implement custom Video player Well, well, well. Due to several unforseen circumstances I ventured into the sources again and implemented a Video player with Qt. Looks very promising so far. There are some bugs to weed out, but I'm getting there... --- videoviewer.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 videoviewer.h (limited to 'videoviewer.h') diff --git a/videoviewer.h b/videoviewer.h new file mode 100644 index 0000000..223bc01 --- /dev/null +++ b/videoviewer.h @@ -0,0 +1,28 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#ifndef VIDEOVIEWER_H +#define VIDEOVIEWER_H + +#include + +class QMediaPlayer; + +class VideoViewer : public QVideoWidget { + public: + VideoViewer(QWidget *parent = nullptr); + QMediaPlayer* player() { return mPlayer; } + + protected: + virtual void keyPressEvent(QKeyEvent *e); + virtual void closeEvent(QCloseEvent *e); + + private: + QMediaPlayer *mPlayer; +}; + +#endif // VIDEOVIEWER_H -- cgit v1.2.3-70-g09d2