1、数值试井,打开subWnd;

feature/ribbon-menu-20240927
simonyan 2 months ago
parent a5db0af77f
commit a27eddc9ff

@ -18,7 +18,7 @@ public:
// 写日志文件 // 写日志文件
void writeLog(const QString &message); void writeLog(const QString &message);
private: private:
static nmDataLogFile* _instance; static nmDataLogFile* s_instance;
QTextStream m_textStream; QTextStream m_textStream;
QFile m_logFile; QFile m_logFile;

@ -16,14 +16,14 @@ nmDataLogFile::~nmDataLogFile()
m_logFile.close(); m_logFile.close();
} }
nmDataLogFile* nmDataLogFile::_instance = NULL; nmDataLogFile* nmDataLogFile::s_instance = NULL;
nmDataLogFile* nmDataLogFile::getInstance() nmDataLogFile* nmDataLogFile::getInstance()
{ {
if (NULL == _instance) { if (NULL == s_instance) {
_instance = new nmDataLogFile(); s_instance = new nmDataLogFile();
} }
return _instance; return s_instance;
} }
void nmDataLogFile::writeLog(const QString &message) void nmDataLogFile::writeLog(const QString &message)

@ -9,6 +9,8 @@
#include "nmSubWndUtils.h" #include "nmSubWndUtils.h"
#include "nmDataLogFile.h" #include "nmDataLogFile.h"
#include <vector>
using namespace std;
iSubWnd* nmSubWndUtils::createSubWnd(iRibbonXmlCmd* pCmdInfo) iSubWnd* nmSubWndUtils::createSubWnd(iRibbonXmlCmd* pCmdInfo)
{ {
@ -22,12 +24,10 @@ iSubWnd* nmSubWndUtils::createSubWnd(QString sID, QString sExt)
{ {
iSubWnd* pSubWnd = NULL; iSubWnd* pSubWnd = NULL;
int nID = sID.toInt(); int nID = sID.toInt();
if (nID == 5001) { if (nID == 5101) {
#ifdef MY_OWN_GRID // TODO先弹窗做输入做PVT的检查做PVT的新建和选择
pSubWnd = new iSubWndGrid(NULL, sExt); // 基于IDlgBase
#else
pSubWnd = new nmSubWndDemo(NULL, sExt); pSubWnd = new nmSubWndDemo(NULL, sExt);
#endif
} }
if (NULL != pSubWnd) { if (NULL != pSubWnd) {
// TODO 此处根据需要设置 改变 标识 // TODO 此处根据需要设置 改变 标识
@ -38,10 +38,9 @@ iSubWnd* nmSubWndUtils::createSubWnd(QString sID, QString sExt)
bool nmSubWndUtils::isEnableOfID_Common(QString sID, QString sName, const bool bLicensed) bool nmSubWndUtils::isEnableOfID_Common(QString sID, QString sName, const bool bLicensed)
{ {
nmDataLogFile::getInstance()->writeLog(sID + " " + sName); nmDataLogFile::getInstance()->writeLog("isEnableOfID " + sID + " " + sName);
if (_isSame(sName, "NmDemo")) { if (sID.toInt() == 5101) {
return (bLicensed); return true;
} else {
return false;
} }
return false;
} }

Loading…
Cancel
Save