#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

class QHBoxLayout;
class QVBoxLayout;
class QPushButton;
class QLabel;
class QLineEdit;
class QSplitter;
class QComboBox;

class PlayThread;

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void openMedia();
    void closeMedia();
    void pauseMedia();

    void drawFrame(QImage frame);

private:
    void initUI();

    void createConnections();



private:
    QHBoxLayout* mMainHLayout;

    QSplitter* mSplitter;

    QLabel* mVideoLabel;

    QWidget* mFuncWidget;
    QVBoxLayout* mFuncVLayout;

    QComboBox* mTypeComboBox;

    QHBoxLayout* mPathHLayout;
    QLabel* mPathLabel;
    QLineEdit* mPathLineEdit;
    QPushButton* mSelectPathButton;

    QHBoxLayout* mButtonHLayout;
    QPushButton* mPlayButton;
    QPushButton* mPauseButton;
    QPushButton* mStopButton;

    PlayThread* mPlayThread;
};
#endif // WIDGET_H
