diff options
author | wm4 <wm4@nowhere> | 2015-01-01 23:07:46 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-01 23:08:15 +0100 |
commit | da4f7225796037b814919e79912cfaa7a9ddc113 (patch) | |
tree | 74b3ed6bcfdc5648ab03dcd656f67f7720610392 /DOCS/client_api_examples/qt/qtexample.h | |
parent | 9aa1d711479d4892e7f3c528dd48aad91f8a63de (diff) | |
download | mpv-da4f7225796037b814919e79912cfaa7a9ddc113.tar.bz2 mpv-da4f7225796037b814919e79912cfaa7a9ddc113.tar.xz |
DOCS/client_api_examples: move all examples into their own subdirs
Also get rid of shared.h; it actually doesn't have much value. Just copy
the tiny function it contained into the 2 files which used it.
Diffstat (limited to 'DOCS/client_api_examples/qt/qtexample.h')
-rw-r--r-- | DOCS/client_api_examples/qt/qtexample.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qt/qtexample.h b/DOCS/client_api_examples/qt/qtexample.h new file mode 100644 index 0000000000..f59738cfbd --- /dev/null +++ b/DOCS/client_api_examples/qt/qtexample.h @@ -0,0 +1,36 @@ +#ifndef QTEXAMPLE_H +#define QTEXAMPLE_H + +#include <QMainWindow> + +#include <mpv/client.h> + +class QTextEdit; + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private slots: + void on_file_open(); + void on_mpv_events(); + +signals: + void mpv_events(); + +private: + QWidget *mpv_container; + mpv_handle *mpv; + QTextEdit *log; + + void append_log(const QString &text); + + void create_player(); + void handle_mpv_event(mpv_event *event); +}; + +#endif // QTEXAMPLE_H |