emsApplication/applications/emsConfigurer/maindialog.h

60 lines
1.2 KiB
C
Raw Normal View History

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