#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "qcustomplot.h"
#include "menubar.h"
#include "thermalwidget.h"
#include <QMainWindow>


class MainWindow : public QMainWindow
{
    Q_OBJECT

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

    void closeEvent(QCloseEvent *event);//关闭窗口事件，可以询问是否退出

    QWidget *realWidget;
    ThermalWidget *thermalWidget;
    QCustomPlot *realPlot;
private slots:
    void  show_real_window_slot();
    void  show_thermal_window_slot();

private:
    QPushButton *startButton;
    QPushButton *stopButton;

    void  createMenuBar();
    void  createRealWindow();
    void  createThermalWindow();
private:
    MenuBar        *menu;
    QMenu          *ApplicationMenu,*testMenu,*viewMenu,*plotMenu,*markerMenu,*showMenu,*helpMenu;
    QTimer dataTimer;
    QMutex mutex;

private slots:
    void realtimeDataSlot();

};

#endif // MAINWINDOW_H
