2014-07-04 00:21:14 +00:00
|
|
|
#ifndef QTEXAMPLE_H
|
|
|
|
#define QTEXAMPLE_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
|
|
|
|
#include <mpv/client.h>
|
|
|
|
|
2014-10-08 11:20:35 +00:00
|
|
|
class QTextEdit;
|
|
|
|
|
2014-07-04 00:21:14 +00:00
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_file_open();
|
2015-01-06 10:55:19 +00:00
|
|
|
void on_new_window();
|
2014-12-30 21:37:56 +00:00
|
|
|
void on_mpv_events();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void mpv_events();
|
2014-07-04 00:21:14 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QWidget *mpv_container;
|
|
|
|
mpv_handle *mpv;
|
2014-10-08 11:20:35 +00:00
|
|
|
QTextEdit *log;
|
2014-07-04 00:21:14 +00:00
|
|
|
|
2014-10-13 21:55:57 +00:00
|
|
|
void append_log(const QString &text);
|
|
|
|
|
2014-07-04 00:21:14 +00:00
|
|
|
void create_player();
|
|
|
|
void handle_mpv_event(mpv_event *event);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTEXAMPLE_H
|