#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMouseEvent>
#include "VideoDisplay.h"
#include "VideoDisplayGL.h"
#include "kylincamera_global.h"
#include "KylinCamera.h"
#include "login1_dbus.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    KylinCamera *camera;

    int Get_DevIndex(char *dev_name , int devNameLen);
    void Enum_Device(char *in_devname , int in_devNameLen);
    void Current_Paramt();
    void Show_CtrlInfo();
    void Dbus_Init();
    bool eventFilter(QObject *watched, QEvent *event) override;

Q_SIGNALS:
    void readout();

public slots:
    void clickPause();
    void clickRestore();
    void clickSet();
    void clickSet1();
    void clickPhoto();
    void clickStartRecord();
    void clickStopRecord();
    void clickCloseCamera();
    void clickStartCamera();
    void clickVideoEnable();
    void clickAudioEnable();
    void clickDisplayMirror();
    void updateRecordTime();   
    void readoutHandle();
    void lockingHandle(bool lock);
    void Display_camera_info();
    void photoError();

    void testOpenDev();
private slots:
    void on_volumeSubButton_clicked();

    void on_volumeAddButton_clicked();

    void on_getStatusButton_clicked();

    void on_closeButton_clicked();

    void on_comboBox_activated(const QString &arg1);

    void on_comboBox_2_activated(const QString &arg1);

    void on_comboBox_2_activated(int index);

    void on_horizontalSlider_valueChanged(int value);

    void on_lineEdit_2_editingFinished();

    void on_comboBox_3_activated(const QString &arg1);

    void on_FlashButton_clicked();

    void on_checkBox_clicked();

private:
    Ui::MainWindow *ui;
    VideoDisplayGL *videoDisplay;
    login1dbusManager *m_dbus;
};
#endif // MAINWINDOW_H
