diff options
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 |