#include "CFDStructDataSolverTimeModeManager.h" #include "CUIProperty/CUIConfig.h" #include "CFDStructMain/CFDStructDefine.h" #include "CFDStructSigsCenter.h" #include "CUIProperty/CUISigsCenter.h" #include #include "CFDStructDataSolverReferenceQuantityManager.h" CFDStructDataSolverReferenceQuantityManager::CFDStructDataSolverReferenceQuantityManager(QObject *parent) : CFDStructDataManagerBase(parent) { m_uiConfig = nullptr; connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) { qDebug() << semaphore << " ========================"; emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); }); } CFDStructDataSolverReferenceQuantityManager::~CFDStructDataSolverReferenceQuantityManager() { // CFDStructDataManagerBase::~CFDStructDataManagerBase(); } CUIConfig *CFDStructDataSolverReferenceQuantityManager::getParamUIConfig() { if (m_uiConfig != nullptr) { delete m_uiConfig; m_uiConfig = nullptr; } // m_uiConfig->printConfig(); m_uiConfig = this->genUIConfig(); return m_uiConfig; } CUIConfig *CFDStructDataSolverReferenceQuantityManager::genUIConfig() { return new CUIConfig({ {"type", "Widget"}, }, { new CUIConfig({{"type", "ComboBox"}, // 参考值取自 {"name", tr("The reference value is taken from")}}, { new CUIConfig({ {"type", "Item"}, // 无 {"name", tr("none")}, }), }), new CUIConfig({{"type", "GroupBox"}, // 热力学 {"name", tr("thermodynamics")}}, { new CUIConfig({ {"type", "LineEdit"},//压强 {"name", tr("pressure")}, }), new CUIConfig({ {"type", "LineEdit"},//温度 {"name", tr("temperature")}, }), }), new CUIConfig({{"type", "GroupBox"}, // Re数相关 {"name", tr("Re number related")}}, { new CUIConfig({ {"type", "LineEdit"},//长度 {"name", tr("length")}, }), }), new CUIConfig({{"type", "GroupBox"}, // 力和力矩 {"name", tr("Force and torque")}}, { new CUIConfig({ {"type", "LineEdit"},//面积 {"name", tr("the measure of area")}, }), }), }); return nullptr; }