Files
EJM_Display/Pages/P00_PublicPage.h

147 lines
3.8 KiB
C
Raw Normal View History

2025-08-20 23:06:28 +08:00
#ifndef P00_PublicPage_H
#define P00_PublicPage_H
#include <QWidget>
#include <QVariant>
#include "DataCenter/DataCenter.h"
#include "DataCenter/OpcUaManager.h"
#include <QLabel>
#include "Pages/P01_MianPage.h"
#include "Pages/P02_ShieldPage.h"
#include "Pages/P07_CylinderPage.h"
#include "Pages/P08_AlarmPage.h"
#include "Pages/P09_RemotePage.h"
#include "Pages/P10_IntelligentPage.h"
#include "Pages/P11_IsolationPage.h"
#include "Pages/P12_NetworkPage.h"
#include "Pages/P13_InsPage.h"
#include "Pages/P14_AtlasPage.h"
#include "Pages/P15_ParameterPage.h"
#include "Pages/P16_SettingPage.h"
#include "Pages/P301_PumpPage.h"
#include "Pages/P401_CuttingPage.h"
#include "Pages/P501_LoaderPage.h"
#include "Pages/P601_TransportPage.h"
class CursorController; // 前向声明即可
namespace Ui {
class P00_PublicPage;
}
class P00_PublicPage : public QWidget
{
Q_OBJECT
public:
explicit P00_PublicPage(QWidget *parent = nullptr);
~P00_PublicPage();
void WinInit();
void CursorInit();
void SignalSlotInit();
template <typename SubWidget>
inline void replaceSingleWidget(); // 载入新的子窗口
protected:
void keyPressEvent(QKeyEvent *e) override;
void UIRefreshTimeOut();
void CursorScanTimerOut();
void onCursorMoved(const QPoint &global);
private slots:
// 处理数据中心的节点更新(仅展示)
void onNodeValueUpdated(const QString &nodeId, const QString &nodeName,const QString &varName, const QVariant &value);
// 处理连接状态变化(仅展示)
void onOpcStateChanged(QOpcUaClient::ClientState state);
// 处理错误信息(仅展示)
void onOpcError(const QString &errorString);
void on_But_Close_clicked();
void on_But_Page_0_clicked();
void on_But_Page_1_clicked();
void on_But_Page_2_clicked();
void on_But_Page_3_clicked();
void on_But_Page_4_clicked();
void on_But_Page_5_clicked();
void on_But_Page_6_clicked();
void on_But_Page_7_clicked();
void on_But_Page_8_clicked();
void on_But_Page_9_clicked();
void on_But_Page_10_clicked();
void on_But_Page_11_clicked();
void on_But_Page_12_clicked();
void on_But_Page_13_clicked();
void on_But_Page_14_clicked();
void on_But_Page_15_clicked();
private:
Ui::P00_PublicPage *ui;
/** @brief 自绘光标 */
QLabel *m_cursorLabel = nullptr;
/** @brief OPC通信实例 */
OpcUaManager *m_opcManager;
/** @brief 数据中心(仅用于订阅数据) */
DataCenter *m_dataCenter;
/** @brief 当前手动操作的节点ID */
QString m_currentNodeId;
/** @brief 主预览界面 */
P01_MianPage *Pub_MianPage;
/** @brief 屏蔽页界面 */
P02_ShieldPage *Pub_ShieldPage;
/** @brief 油缸页界面 */
P07_CylinderPage *Pub_CylinderPage;
/** @brief 报警页界面 */
P08_AlarmPage *Pub_AlarmPage;
/** @brief 遥控控制页界面 */
P09_RemotePage *Pub_RemotePage;
/** @brief 智能控制页界面 */
P10_IntelligentPage *Pub_IntelligentPage;
/** @brief 绝缘检测页界面 */
P11_IsolationPage *Pub_IsolationPage;
/** @brief 网络拓扑页界面 */
P12_NetworkPage *Pub_NetworkPage;
/** @brief 惯导页界面 */
P13_InsPage *Pub_InsPage;
/** @brief 图册页界面 */
P14_AtlasPage *Pub_AtlasPage;
/** @brief 参数页界面 */
P15_ParameterPage *Pub_ParameterPage;
/** @brief 设置页界面 */
P16_SettingPage *Pub_SettingPage;
/** @brief 油泵页界面 */
P301_PumpPage *Pub_PumpPage;
/** @brief 截割页界面 */
P401_CuttingPage *Pub_CuttingPage;
/** @brief 装载页界面 */
P501_LoaderPage *Pub_LoaderPage;
/** @brief 运输页界面 */
P601_TransportPage *Pub_TransportPage;
};
#endif // P00_PublicPage_H