You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/nmNum/nmSubWnd/nmSubWndUtils.h

44 lines
1.6 KiB
C

#pragma once
#include <QObject>
#include "nmSubWnd_global.h"
class iRibbonXmlCmd;
class iSubWnd;
// 本来主要是为数值部分提供SubWnd初始化构造的方法
class NM_SUB_WND_EXPORT nmSubWndUtils : public QObject
{
Q_OBJECT
public:
/// @brief 构造窗体根据RibbonXmlCmd
/// @note 权宜之计:此处构造的窗体,无需额外删除(析构),系统会统一处理
static iSubWnd* createSubWnd(iRibbonXmlCmd* pCmdInfo);
/// @brief 构造窗体根据sID和sExt
/// @note sID和sExt也是来自于RibbonXmlCmd
/// @note 权宜之计:此处构造的窗体,无需额外删除(析构),系统会统一处理
static iSubWnd* createSubWnd(QString sID, QString sExt);
/// @brief 执行一些特殊的功能按钮
/// @return 只要是数值模块自己的按钮请返回true否则返回false
/// @note 此处指的是与SubWnd无关即不受SubWnd限制的功能按钮
/// sID和sExt也是来自于RibbonXmlCmd
static bool runCmdBySpecial(iRibbonXmlCmd* pCmdInfo);
static bool runCmdBySpecial(QString sID, QString sExt);
/// @brief 在当前没有激活数值SubWnd的情况下判断是否某些命令是否Enable
/// @param sID(in) 命令ID
/// @param sName(in) 命令Name
/// @param bLicensedconst in)当前是否正式授权
/// @note sID和sName也是来自于RibbonXmlCmd
static bool isEnableOfID_Common(QString sID, QString sName, const bool bLicensed);
private:
// 新建一个数值分析,向导
static bool runCmd_NewAnal();
};