#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QLabel>
#include <QMainWindow>
#include <QTimer>
#include "bridge.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

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

private:
    void Windowsinit(); //界面设置
    void SoftStart();
    void SoftClose();
    void EPCUpDate();
    void PubClicked();  //快捷按键
    QStringList getAvailablePort();
protected:
    bool eventFilter(QObject *watched, QEvent *event);
    // 重写事件处理器函数
    void closeEvent(QCloseEvent* ev);
private:
    Ui::MainWindow *ui;
    Bridge *m_Bridge;
    QLabel *m_systemTime;
    QLabel *m_EPCstatus;
    QTimer *m_SoftBreath;
    int m_SoftBreath_s = 0;
    int m_SoftBreath_m = 0;
    int m_SoftBreath_h = 0;
    int m_SoftBreath_d = 0;
};
#endif // MAINWINDOW_H
