123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- #pragma once
- #include <QHash>
- #include <QMetaEnum>
- class GvlManager;
- class POU;
- class PouManager;
- class UiManager;
- class Document;
- class WindowAppResourceManagerTree;
- class WindowAppGvlView;
- class WindowHdw;
- class TaskManager;
- class WindowAppMdiFrame;
- class WindowAppTaskMonitorView;
- class DialogUserMsg;
- class WindowRuntime;
- class WindowMain;
- class LoadingManager;
- // class FrameManager;
- #define g_pMainWindow VPGlobal::m_pMainWindow
- #define g_pTaskManager VPGlobal::m_pTaskManager
- #define g_pGvlManager VPGlobal::m_pGvlManager
- #define g_pResourceManager VPGlobal::m_pResourceManager
- #define g_pDialogUserMsg VPGlobal::m_pDialogUserMsg
- #define g_pPouManager VPGlobal::m_pPouManager
- #define g_pUiManager VPGlobal::m_pUiManager
- #define g_pRuntime VPGlobal::m_pWindowRuntime
- // #define g_pFrameManager VPGlobal::m_pFrameManager
- #define g_pLoadingManager VPGlobal::m_pLoadingManager
- // #define emTaskMode VPGlobal::enumTaskMode
- #define emExecStatus VPGlobal::enumExecStatus
- #define emRetValue VPGlobal::enumRetValue
- #define emPriority VPGlobal::enumPriority
- #define emGvlAccess VPGlobal::enumGvlAccess
- /// <summary>
- /// 全局访问的变量公共存储区
- /// </summary>
- class VPGlobal
- {
- public:
- VPGlobal();
- // 初始化
- static void init();
- //// 注册Pou
- //static void Register(POU* pPou);
- //// 注册硬件Pou
- //static void RegisterHdwPou(POU* pPou);
- // 注册主框架
- static void Register(WindowMain* pMainWindow);
- // 注册AppTree
- static void Register(WindowAppResourceManagerTree* pAppTree);
- // 注册GvlView
- static void Register(WindowAppGvlView* pGvlView);
- //// 注册HardwareView
- //static void Register(WindowHdw* pHdwWnd);
- // 注册MdiFrame
- static void Register(WindowAppMdiFrame* pMdiFrame);
- // 注册默认的Task Monitor View
- static void Register(WindowAppTaskMonitorView* pTaskMonitorView);
- // 注册Runtime窗体
- static void Register(WindowRuntime* pRuntime);
- // 获取MdiFrame的指针
- static WindowAppMdiFrame* getMdiFrame();
- // 获取 TaskMonitor 的指针
- static WindowAppTaskMonitorView* getTaskMonitorView();
- friend Document;
- static WindowMain* m_pMainWindow;
- static PouManager* m_pPouManager;
- static UiManager* m_pUiManager;
- static TaskManager* m_pTaskManager;
- static GvlManager* m_pGvlManager;
- static WindowAppResourceManagerTree* m_pResourceManager;
- static WindowRuntime* m_pWindowRuntime;
- static Document* m_pDoc;
- static DialogUserMsg* m_pDialogUserMsg;
- // static FrameManager* m_pFrameManager;
- static LoadingManager* m_pLoadingManager;
- // Q_ENUM使用的枚举类型
- // static QMetaEnum emTaskMode;
- static QMetaEnum enumExecStatus;
- static QMetaEnum enumRetValue;
- static QMetaEnum enumPriority;
- static QMetaEnum enumGvlAccess;
- private:
- // For Debug
- void debugAllPous();
- private:
- static WindowAppGvlView* m_pGvlView;
- static WindowAppMdiFrame* m_pMdiFrame;
- static WindowAppTaskMonitorView* m_pTaskMonitorView;
-
- // static POU* m_pHardwarePou;
- // static LinkManager* m_pLinkManager;
-
- };
|