diff options
author | Arno <arno@disconnect.de> | 2018-08-26 20:35:23 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-08-26 20:35:23 +0200 |
commit | 68ee6a0ec973940eb4f799b00f6518a902cbc4e5 (patch) | |
tree | 41ddac1434482ae0a20686c8bc8c8231bf9aed36 /videoviewer.h | |
parent | 1aebcdcc41d60f891a12b70584d3ceb833d5bfdc (diff) | |
download | SheMov-68ee6a0ec973940eb4f799b00f6518a902cbc4e5.tar.gz SheMov-68ee6a0ec973940eb4f799b00f6518a902cbc4e5.tar.bz2 SheMov-68ee6a0ec973940eb4f799b00f6518a902cbc4e5.zip |
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...
Diffstat (limited to 'videoviewer.h')
-rw-r--r-- | videoviewer.h | 28 |
1 files changed, 28 insertions, 0 deletions
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 <QVideoWidget> + +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 |