#pragma once #include #include 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 /// /// 全局访问的变量公共存储区 /// 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; };