1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00
mpv/DOCS/client_api_examples/qt/qtexample.h
wm4 0488829185 DOCS/client_api_examples: qtexample: demonstrate multiple mpv instances
Multiple client API contexts can exist in the same process.
2015-01-06 11:56:10 +01:00

38 lines
581 B
C++

#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_new_window();
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