emsApplication/applications/emsConfigurer/maindialog.h

63 lines
1.2 KiB
C++

#ifndef MAINDIALOG_H
#define MAINDIALOG_H
#pragma execution_character_set("utf-8")
#include <QMainWindow>
#include <QListWidget>
#include <QListWidgetItem>
#include <QIcon>
#include <QStackedWidget>
#include <QToolBar>
#include <QVBoxLayout>
#include <hv_tcpclient.h>
namespace Ui
{
class MainDialog;
}
class MainDialog : public QMainWindow
{
Q_OBJECT
public:
explicit MainDialog(QWidget *parent = nullptr);
~MainDialog();
void InitializeUI();
void loadWindowState();
public slots:
void changePage(QListWidgetItem *current, QListWidgetItem *previous);
//接收服务器返回消息的函数
void onMessage(const hv::SocketChannelPtr& channel, hv::Buffer* buf);
private slots:
void onToolButton1Clicked();
void onToolButton2Clicked();
void onToolRefreshClicked();
void onAboutButtonClicked();
private:
Ui::MainDialog *ui;
QListWidget *m_pDeviceListWidget;
QStackedWidget *m_pDevicestackedWidget;
QToolBar *m_pMainToolBar;
QVBoxLayout* m_pStackedWidgetLayout;
private:
void CreateToolbar();
void CreateIcon(const QIcon& icon,QString text);
void CreateTablePage();
protected:
void closeEvent(QCloseEvent *event) override;
void saveWindowState();
};
#endif // MAINDIALOG_H