1、通过信号驱动树节点渲染参数界面;

feature/struct-menu-20241023
simonyan 2 weeks ago
parent 64a0e6facf
commit 75fd950ebf

@ -1,4 +1,4 @@
#include "CFDStructDataManager.h" #include "CFDStructDataManager.h"
#include "CFDStructDataSolverTimeModeManager.h" #include "CFDStructDataSolverTimeModeManager.h"
#include "CFDStructDataSolverBasicModelManager.h" #include "CFDStructDataSolverBasicModelManager.h"
@ -11,6 +11,8 @@
#include "CFDStructDataSolverReferenceQuantityManager.h" #include "CFDStructDataSolverReferenceQuantityManager.h"
#include "CFDStructDataSolverComputingControlManager.h" #include "CFDStructDataSolverComputingControlManager.h"
#include "CFDStructDataSolverMonitorResidualManager.h" #include "CFDStructDataSolverMonitorResidualManager.h"
#include "CFDStructDataSolverMonitorAerodynamicManager.h"
#include "CFDStructDataSolverMonitorImpellerManager.h"
#include "CUIProperty/CUIConfig.h" #include "CUIProperty/CUIConfig.h"
@ -22,44 +24,42 @@ CFDStructDataManager::CFDStructDataManager()
CFDStructDataManager *CFDStructDataManager::getInstance() CFDStructDataManager *CFDStructDataManager::getInstance()
{ {
if (m_instance == nullptr) if (m_instance == nullptr) {
{
m_instance = new CFDStructDataManager; m_instance = new CFDStructDataManager;
} }
return m_instance; return m_instance;
} }
CUIConfig *CFDStructDataManager::getActionParamUIConfig(QString s) CUIConfig *CFDStructDataManager::getActionParamUIConfig(SolutionAnalysisModuleProperty sig, QVariant idx)
{ {
if (s == "actionTimeModeEdit") switch (sig) {
{ case SolutionAnalysisModuleProperty::Time_Mode:
qDebug("DataManager create TimeMode CUIConfig"); return m_solverTimeModeManager->getParamUIConfig();
return m_solverTimeModeManager->getParamUIConfig(); case SolutionAnalysisModuleProperty::Basic_Model:
return m_solverBasicModeManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Viscosity_Model:
return m_solverKvislManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::NUumerical_Methods:
return m_solverNumericalMethodManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Motion_Properties:
return m_solverSportsAttributesManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Boundary_Conditions:
return m_solverBoundaryConditionManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Initialization:
return m_solverInitializationManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Computational_Control_Reference_Quantity:
return m_solverReferenceQuantityManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Computational_Control:
return m_solverComputingControlManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Monitors_Residual:
return m_solverMonitorResidualManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Monitors_AerodynamicForce:
return m_solverMonitorAerodynamicForceManager->getParamUIConfig();
case SolutionAnalysisModuleProperty::Monitors_Tubomachinery_Performance:
return m_solverMonitorTubomachineryPerformanceManager->getParamUIConfig();
default:
break;
} }
if (s == "actionBasicModelEdit")
return m_solverBasicModeManager->getParamUIConfig();
if (s == "actionViscosityModelEdit")
return m_solverKvislManager->getParamUIConfig();
if (s == "actionNumericalMethodsEdit")
return m_solverNumericalMethodManager->getParamUIConfig();
// 运动属性
if (s == "actionMotionPropertiesEdit")
return m_solverSportsAttributesManager->getParamUIConfig();
// Pressure-Inlet
if (s == "actionPressureInletEdit")
return m_solverBoundaryConditionManager->getParamUIConfig();
// 初始化
if (s == "actionInitializationEdit")
return m_solverInitializationManager->getParamUIConfig();
// 参考量
if (s == "actionReferenceQuantityEdit")
return m_solverReferenceQuantityManager->getParamUIConfig();
// 计算控制
if (s == "actionComputationalControlEdit")
return m_solverComputingControlManager->getParamUIConfig();
if (s == "actionComputationalMonitorsResidual")
return m_solverMonitorResidualManager->getParamUIConfig();
qDebug() << "DataManager return null CUIConfig"; qDebug() << "DataManager return null CUIConfig";
return nullptr; return nullptr;
} }
@ -70,12 +70,12 @@ void CFDStructDataManager::initDataManagers()
m_solverBasicModeManager = new CFDStructDataSolverBasicModelManager; m_solverBasicModeManager = new CFDStructDataSolverBasicModelManager;
m_solverKvislManager = new CFDStructDataSolverKvislManager; m_solverKvislManager = new CFDStructDataSolverKvislManager;
m_solverNumericalMethodManager = new CFDStructDataSolverNumericalMethodManager; m_solverNumericalMethodManager = new CFDStructDataSolverNumericalMethodManager;
m_solverSportsAttributesManager = new CFDStructDataSolverSportsAttributesManager; m_solverSportsAttributesManager = new CFDStructDataSolverSportsAttributesManager;
m_solverBoundaryConditionManager = new CFDStructDataSolverBoundaryConditionManager; m_solverBoundaryConditionManager = new CFDStructDataSolverBoundaryConditionManager;
m_solverInitializationManager = new CFDStructDataSolverInitializationManager; m_solverInitializationManager = new CFDStructDataSolverInitializationManager;
m_solverReferenceQuantityManager = new CFDStructDataSolverReferenceQuantityManager; m_solverReferenceQuantityManager = new CFDStructDataSolverReferenceQuantityManager;
m_solverComputingControlManager = new CFDStructDataSolverComputingControlManager; m_solverComputingControlManager = new CFDStructDataSolverComputingControlManager;
m_solverMonitorResidualManager = new CFDStructDataSolverMonitorResidualManager; m_solverMonitorResidualManager = new CFDStructDataSolverMonitorResidualManager;
m_solverMonitorAerodynamicForceManager = new CFDStructDataSolverMonitorAerodynamicManager;
m_solverMonitorTubomachineryPerformanceManager = new CFDStructDataSolverMonitorImpellerManager;
} }

@ -1,7 +1,8 @@
#ifndef CFDSTRUCTDATAMANAGER_H #ifndef CFDSTRUCTDATAMANAGER_H
#define CFDSTRUCTDATAMANAGER_H #define CFDSTRUCTDATAMANAGER_H
#include "CFDStructDataManager_global.h" #include "CFDStructDataManager_global.h"
#include "CFDStructMain/CFDStructDefine.h"
class CFDStructDataSolverSportsAttributesManager; class CFDStructDataSolverSportsAttributesManager;
class CFDStructDataSolverBoundaryConditionManager; class CFDStructDataSolverBoundaryConditionManager;
@ -14,6 +15,8 @@ class CFDStructDataSolverBasicModelManager;
class CFDStructDataSolverKvislManager; class CFDStructDataSolverKvislManager;
class CFDStructDataSolverNumericalMethodManager; class CFDStructDataSolverNumericalMethodManager;
class CFDStructDataSolverMonitorResidualManager; class CFDStructDataSolverMonitorResidualManager;
class CFDStructDataSolverMonitorAerodynamicManager;
class CFDStructDataSolverMonitorImpellerManager;
class CUIConfig; class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataManager class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataManager
@ -23,7 +26,7 @@ public:
static CFDStructDataManager *getInstance(); static CFDStructDataManager *getInstance();
// 获取一个action的参数设置配置 // 获取一个action的参数设置配置
CUIConfig *getActionParamUIConfig(QString s); CUIConfig *getActionParamUIConfig(SolutionAnalysisModuleProperty sig, QVariant idx);
private: private:
void initDataManagers(); void initDataManagers();
@ -48,6 +51,10 @@ private:
CFDStructDataSolverComputingControlManager *m_solverComputingControlManager; CFDStructDataSolverComputingControlManager *m_solverComputingControlManager;
// 监控-残差曲线 // 监控-残差曲线
CFDStructDataSolverMonitorResidualManager *m_solverMonitorResidualManager; CFDStructDataSolverMonitorResidualManager *m_solverMonitorResidualManager;
// 监控-气动力曲线
CFDStructDataSolverMonitorAerodynamicManager *m_solverMonitorAerodynamicForceManager;
// 监控-叶轮机械性能曲线
CFDStructDataSolverMonitorImpellerManager *m_solverMonitorTubomachineryPerformanceManager;
}; };
#endif // CFDSTRUCTDATAMANAGER_H #endif // CFDSTRUCTDATAMANAGER_H

@ -1,4 +1,4 @@
#include "CFDStructDataSolverKvislManager.h" #include "CFDStructDataSolverKvislManager.h"
#include "CUIProperty/CUIConfig.h" #include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h" #include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h" #include "CFDStructSigsCenter.h"
@ -7,7 +7,7 @@ CFDStructDataSolverKvislManager::CFDStructDataSolverKvislManager(QObject *parent
{ {
m_uiConfig = nullptr; m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [ = ](int semaphore) { connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [ = ](int semaphore) {
if (semaphore == (int)SolutionAnalysisModuleProperty::KVISL) { if (semaphore == (int)SolutionAnalysisModuleProperty::Viscosity_Model) {
emit CFDStructSigsCenter::getInstance()->sig_solverKvislDataChanged(); emit CFDStructSigsCenter::getInstance()->sig_solverKvislDataChanged();
} }
}); });
@ -19,455 +19,474 @@ CFDStructDataSolverKvislManager::~CFDStructDataSolverKvislManager()
CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig() CUIConfig *CFDStructDataSolverKvislManager::getParamUIConfig()
{ {
if(m_Model == 0){ if(m_Model == 0) {
return genInviscidUIConfig(); return genInviscidUIConfig();
} }
if(m_Model == 1){ if(m_Model == 1) {
return genLaminarUIConfig(); return genLaminarUIConfig();
} }
if(m_Model == 2){ if(m_Model == 2) {
return genRANSSAUIConfig(); return genRANSSAUIConfig();
} }
if(m_Model == 3){ if(m_Model == 3) {
return genDESSAUIConfig(); return genDESSAUIConfig();
} }
if(m_Model == 4){ if(m_Model == 4) {
return genCLESUIConfig(); return genCLESUIConfig();
} }
return this->genInviscidUIConfig(); return this->genInviscidUIConfig();
} }
CUIConfig *CFDStructDataSolverKvislManager::genInviscidUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genInviscidUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
{new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:模型 {"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")}, {"name", tr("Model")},
{"widget", "GroupBox"}, {"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)}, {"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, {"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
}, },
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 {
{"name", tr("Inviscid")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 {"name", tr("Inviscid")}}),
{"name", tr("Laminar")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"name", tr("Laminar")}}),
{"name", tr("RANS")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {"name", tr("RANS")}}),
{"name", tr("DES")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {"name", tr("DES")}}),
{"name", tr("CLES")}})})}); new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("CLES")}})
})
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genLaminarUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genLaminarUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
{new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:模型 {"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")}, {"name", tr("Model")},
{"widget", "GroupBox"}, {"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)}, {"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, {"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
}, },
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 {
{"name", tr("Inviscid")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 {"name", tr("Inviscid")}}),
{"name", tr("Laminar")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"name", tr("Laminar")}}),
{"name", tr("RANS")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {"name", tr("RANS")}}),
{"name", tr("DES")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {"name", tr("DES")}}),
{"name", tr("CLES")}})})}); new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("CLES")}})
})
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genRANSSAUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genRANSSAUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
{"type", "RadioComponent"}, // 组:模型 {"name", tr("Inviscid")}}),
{"name", tr("Model")}, new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
{"widget", "GroupBox"}, {"name", tr("Laminar")}}),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
{"value_origin", QVA_GLOBAL(&m_Model)}, {"name", tr("RANS")}}),
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
}, {"name", tr("DES")}}),
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("Inviscid")}}), {"name", tr("CLES")}})
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 }),
{"name", tr("Laminar")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"type", "RadioComponent"}, // 组:RANS模型
{"name", tr("RANS")}}), {"name", tr("RANS Model")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {"widget", "GroupBox"},
{"name", tr("DES")}}), },
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {
{"name", tr("CLES")}})}), new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程)
new CUIConfig({ {"name", tr("S-A")}}),
{"type", "RadioComponent"}, // 组:RANS模型 new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("RANS Model")}, {"name", tr("Menters's κ-ω")}}),
{"widget", "GroupBox"}, new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程)
}, {"name", tr("κ-ε")}})
{new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程) }),
{"name", tr("S-A")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程) {"type", "RadioComponent"}, // 组:S-A类型
{"name", tr("Menters's κ-ω")}}), {"name", tr("S-A Type")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程) {"widget", "GroupBox"},
{"name", tr("κ-ε")}})}), },
new CUIConfig({ {
{"type", "RadioComponent"}, // 组:S-A类型 new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("S-A Type")}, {"name", tr("standard")}}),
{"widget", "GroupBox"}, new CUIConfig({{"type", "RadioButton"}, // 按钮:Edwards
}, {"name", tr("Edwards")}})
{new CUIConfig({{"type", "RadioButton"}, // 按钮:standard }),
{"name", tr("standard")}}), });
new CUIConfig({{"type", "RadioButton"}, // 按钮:Edwards
{"name", tr("Edwards")}})}),
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genRANSUIMentersConfig() CUIConfig *CFDStructDataSolverKvislManager::genRANSUIMentersConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
{"type", "RadioComponent"}, // 组:模型 {"name", tr("Inviscid")}}),
{"name", tr("Model")}, new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
{"widget", "GroupBox"}, {"name", tr("Laminar")}}),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
{"value_origin", QVA_GLOBAL(&m_Model)}, {"name", tr("RANS")}}),
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
}, {"name", tr("DES")}}),
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("Inviscid")}}), {"name", tr("CLES")}})
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 }),
{"name", tr("Laminar")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"type", "RadioComponent"}, // 组:RANS模型
{"name", tr("RANS")}}), {"name", tr("RANS Model")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {"widget", "GroupBox"},
{"name", tr("DES")}}), },
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {
{"name", tr("CLES")}})}), new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程)
new CUIConfig({ {"name", tr("S-A")}}),
{"type", "RadioComponent"}, // 组:RANS模型 new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("RANS Model")}, {"name", tr("Menters's κ-ω")}}),
{"widget", "GroupBox"}, new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程)
}, {"name", tr("κ-ε")}})
{new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程) }),
{"name", tr("S-A")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程) {"type", "RadioComponent"}, // 组:κ-ω类型
{"name", tr("Menters's κ-ω")}}), {"name", tr("κ-ω Type")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程) {"widget", "GroupBox"},
{"name", tr("κ-ε")}})}), },
new CUIConfig({ {
{"type", "RadioComponent"}, // 组:κ-ω类型 new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("κ-ω Type")}, {"name", tr("standard")}}),
{"widget", "GroupBox"}, }),
}, });
{
new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("standard")}}),
}),
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genRANSKEUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genRANSKEUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
{"type", "RadioComponent"}, // 组:模型 {"name", tr("Inviscid")}}),
{"name", tr("Model")}, new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
{"widget", "GroupBox"}, {"name", tr("Laminar")}}),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
{"value_origin", QVA_GLOBAL(&m_Model)}, {"name", tr("RANS")}}),
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
}, {"name", tr("DES")}}),
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("Inviscid")}}), {"name", tr("CLES")}})
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 }),
{"name", tr("Laminar")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"type", "RadioComponent"}, // 组:RANS模型
{"name", tr("RANS")}}), {"name", tr("RANS Model")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {"widget", "GroupBox"},
{"name", tr("DES")}}), },
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {
{"name", tr("CLES")}})}), new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程)
new CUIConfig({ {"name", tr("S-A")}}),
{"type", "RadioComponent"}, // 组:RANS模型 new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("RANS Model")}, {"name", tr("Menters's κ-ω")}}),
{"widget", "GroupBox"}, new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程)
}, {"name", tr("κ-ε")}})
{new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程) }),
{"name", tr("S-A")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程) {"type", "RadioComponent"}, // 组:κ-ε类型
{"name", tr("Menters's κ-ω")}}), {"name", tr("κ-ε Type")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:κ-ε(两方程) {"widget", "GroupBox"},
{"name", tr("κ-ε")}})}), },
new CUIConfig({ {
{"type", "RadioComponent"}, // 组:κ-ε类型 new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("κ-ε Type")}, {"name", tr("standard")}}),
{"widget", "GroupBox"}, }),
}, });
{
new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("standard")}}),
}),
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genDESSAUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genDESSAUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
{"type", "RadioComponent"}, // 组:模型 {"name", tr("Inviscid")}}),
{"name", tr("Model")}, new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
{"widget", "GroupBox"}, {"name", tr("Laminar")}}),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
{"value_origin", QVA_GLOBAL(&m_Model)}, {"name", tr("RANS")}}),
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
}, {"name", tr("DES")}}),
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("Inviscid")}}), {"name", tr("CLES")}})
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 }),
{"name", tr("Laminar")}}), new CUIConfig({
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"type", "RadioComponent"}, // 组:DES
{"name", tr("RANS")}}), {"name", tr("DES Model")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {"widget", "GroupBox"},
{"name", tr("DES")}}), },
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {
{"name", tr("CLES")}})}), new CUIConfig({{"type", "RadioButton"}, // 按钮:DES
new CUIConfig({ {"name", tr("DES")}}),
{"type", "RadioComponent"}, // 组:DES new CUIConfig({{"type", "RadioButton"}, // 按钮:DDES两方程
{"name", tr("DES Model")}, {"name", tr("DDES")}}),
{"widget", "GroupBox"}, new CUIConfig({{"type", "RadioButton"}, // 按钮:IDDES两方程
}, {"name", tr("IDDES")}}),
{ }),
new CUIConfig({{"type", "RadioButton"}, // 按钮:DES new CUIConfig({
{"name", tr("DES")}}), {"type", "RadioComponent"}, // 组:RANS模型
new CUIConfig({{"type", "RadioButton"}, // 按钮:DDES两方程 {"name", tr("RANS Model")},
{"name", tr("DDES")}}), {"widget", "GroupBox"},
new CUIConfig({{"type", "RadioButton"}, // 按钮:IDDES两方程 },
{"name", tr("IDDES")}}), {
}), new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程)
new CUIConfig({ {"name", tr("S-A")}}),
{"type", "RadioComponent"}, // 组:RANS模型 new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("RANS Model")}, {"name", tr("Menters's κ-ω")}}),
{"widget", "GroupBox"}, }),
}, new CUIConfig({{"type", "RadioComponent"}, // 组:S-A类型
{ {"name", tr("S-A Type")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程) {"widget", "GroupBox"}},
{"name", tr("S-A")}}), {
new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程) new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("Menters's κ-ω")}}), {"name", tr("standard")}}),
}), }),
new CUIConfig({{"type", "RadioComponent"}, // 组:S-A类型 });
{"name", tr("S-A Type")},
{"widget", "GroupBox"}},
{
new CUIConfig({{"type", "RadioButton"}, // 按钮:standard
{"name", tr("standard")}}),
}),
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genDESMentersUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genDESMentersUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘
{"type", "RadioComponent"}, // 组:模型 {"name", tr("Inviscid")}}),
{"name", tr("Model")}, new CUIConfig({{"type", "RadioButton"}, // 按钮:层流
{"widget", "GroupBox"}, {"name", tr("Laminar")}}),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均
{"value_origin", QVA_GLOBAL(&m_Model)}, {"name", tr("RANS")}}),
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟
}, {"name", tr("DES")}}),
{new CUIConfig({{"type", "RadioButton"}, // 按钮:无粘 new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("Inviscid")}}), {"name", tr("CLES")}})
new CUIConfig({{"type", "RadioButton"}, // 按钮:层流 }),
{"name", tr("Laminar")}}), new CUIConfig({{"type", "RadioComponent"}, // 组:DES
new CUIConfig({{"type", "RadioButton"}, // 按钮:雷诺平均 {"name", tr("DES Model")},
{"name", tr("RANS")}}), {"widget", "GroupBox"}},
new CUIConfig({{"type", "RadioButton"}, // 按钮:分离涡模拟 {
{"name", tr("DES")}}), new CUIConfig({{"type", "RadioButton"}, // 按钮:DES
new CUIConfig({{"type", "RadioButton"}, // 按钮:约束大涡模型 {"name", tr("DES")}}),
{"name", tr("CLES")}})}), new CUIConfig({{"type", "RadioButton"}, // 按钮:DDES两方程
new CUIConfig({{"type", "RadioComponent"}, // 组:DES {"name", tr("DDES")}}),
{"name", tr("DES Model")}, new CUIConfig({{"type", "RadioButton"}, // 按钮:IDDES两方程
{"widget", "GroupBox"}}, {"name", tr("IDDES")}}),
{ }),
new CUIConfig({{"type", "RadioButton"}, // 按钮:DES new CUIConfig({{"type", "RadioComponent"}, // 组:RANS模型
{"name", tr("DES")}}), {"name", tr("RANS Model")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:DDES两方程 {"widget", "GroupBox"}},
{"name", tr("DDES")}}), {
new CUIConfig({{"type", "RadioButton"}, // 按钮:IDDES两方程 new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程)
{"name", tr("IDDES")}}), {"name", tr("S-A")}}),
}), new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
new CUIConfig({{"type", "RadioComponent"}, // 组:RANS模型 {"name", tr("Menters's κ-ω")}}),
{"name", tr("RANS Model")}, }),
{"widget", "GroupBox"}}, new CUIConfig({{"type", "RadioComponent"}, // 组:κ-ω类型
{ {"name", tr("κ-ω Type")},
new CUIConfig({{"type", "RadioButton"}, // 按钮:S-A(一方程) {"widget", "GroupBox"}},
{"name", tr("S-A")}}), {
new CUIConfig({{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程) new CUIConfig({{"type", "RadioButton"}, // 按钮:SST
{"name", tr("Menters's κ-ω")}}), {"name", tr("SST")}}),
}), }),
new CUIConfig({{"type", "RadioComponent"}, // 组:κ-ω类型 });
{"name", tr("κ-ω Type")},
{"widget", "GroupBox"}},
{
new CUIConfig({{"type", "RadioButton"}, // 按钮:SST
{"name", tr("SST")}}),
}),
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genCLESUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genCLESUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:模型 {"type", "RadioButton"}, // 按钮:无粘
{"name", tr("Model")}, {"name", tr("Inviscid")},
{"widget", "GroupBox"}, }),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({
{"value_origin", QVA_GLOBAL(&m_Model)}, {"type", "RadioButton"}, // 按钮:层流
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, {"name", tr("Laminar")},
}, }),
{new CUIConfig({ new CUIConfig({
{"type", "RadioButton"}, // 按钮:无粘 {"type", "RadioButton"}, // 按钮:雷诺平均
{"name", tr("Inviscid")}, {"name", tr("RANS")},
}), }),
new CUIConfig({ new CUIConfig({
{"type", "RadioButton"}, // 按钮:层流 {"type", "RadioButton"}, // 按钮:分离涡模拟
{"name", tr("Laminar")}, {"name", tr("DES")},
}), }),
new CUIConfig({ new CUIConfig({
{"type", "RadioButton"}, // 按钮:雷诺平均 {"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("RANS")}, {"name", tr("CLES")},
}), })
new CUIConfig({ }),
{"type", "RadioButton"}, // 按钮:分离涡模拟 new CUIConfig({
{"name", tr("DES")}, {"type", "RadioComponent"}, // 组:RANS模型
}), {"name", tr("RANS Model")},
new CUIConfig({ {"widget", "GroupBox"},
{"type", "RadioButton"}, // 按钮:约束大涡模型 },
{"name", tr("CLES")}, {
})}),
new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:RANS模型 {"type", "RadioButton"}, // 按钮:S-A(一方程)
{"name", tr("RANS Model")}, {"name", tr("S-A")},
{"widget", "GroupBox"}, }),
},
{
new CUIConfig({
{"type", "RadioButton"}, // 按钮:S-A(一方程)
{"name", tr("S-A")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("Menters's κ-ω")},
}),
}),
new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:S-A类型 {"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("S-A Type")}, {"name", tr("Menters's κ-ω")},
{"widget", "GroupBox"}, }),
}, }),
{new CUIConfig({ new CUIConfig({
{"type", "RadioButton"}, // 按钮:standard {"type", "RadioComponent"}, // 组:S-A类型
{"name", tr("standard")}, {"name", tr("S-A Type")},
}), {"widget", "GroupBox"},
new CUIConfig({ },
{"type", "RadioButton"}, // 按钮:Edwards {
{"name", tr("Edwards")}, new CUIConfig({
})}), {"type", "RadioButton"}, // 按钮:standard
}); {"name", tr("standard")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:Edwards
{"name", tr("Edwards")},
})
}),
});
return nullptr; return nullptr;
} }
CUIConfig *CFDStructDataSolverKvislManager::genCLESMentersUIConfig() CUIConfig *CFDStructDataSolverKvislManager::genCLESMentersUIConfig()
{ {
return new CUIConfig( return new CUIConfig(
{{"type", "Widget"}}, {{"type", "Widget"}}, {
new CUIConfig({
{"type", "RadioComponent"}, // 组:模型
{"name", tr("Model")},
{"widget", "GroupBox"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_Model)},
{"semaphore", (int)SolutionAnalysisModuleProperty::Viscosity_Model},
},
{ {
new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:模型 {"type", "RadioButton"}, // 按钮:无粘
{"name", tr("Model")}, {"name", tr("Inviscid")},
{"widget", "GroupBox"}, }),
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, new CUIConfig({
{"value_origin", QVA_GLOBAL(&m_Model)}, {"type", "RadioButton"}, // 按钮:层流
{"semaphore", (int)SolutionAnalysisModuleProperty::KVISL}, {"name", tr("Laminar")},
}, }),
{new CUIConfig({ new CUIConfig({
{"type", "RadioButton"}, // 按钮:无粘 {"type", "RadioButton"}, // 按钮:雷诺平均
{"name", tr("Inviscid")}, {"name", tr("RANS")},
}), }),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:层流
{"name", tr("Laminar")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:雷诺平均
{"name", tr("RANS")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:分离涡模拟
{"name", tr("DES")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("CLES")},
})}),
new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:RANS模型 {"type", "RadioButton"}, // 按钮:分离涡模拟
{"name", tr("RANS Model")}, {"name", tr("DES")},
{"widget", "GroupBox"}, }),
},
{
new CUIConfig({
{"type", "RadioButton"}, // 按钮:S-A(一方程)
{"name", tr("S-A")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("Menters's κ-ω")},
}),
}),
new CUIConfig({ new CUIConfig({
{"type", "RadioComponent"}, // 组:κ-ω类型 {"type", "RadioButton"}, // 按钮:约束大涡模型
{"name", tr("κ-ω Type")}, {"name", tr("CLES")},
{"widget", "GroupBox"}, })
}, }),
{ new CUIConfig({
new CUIConfig({ {"type", "RadioComponent"}, // 组:RANS模型
{"type", "RadioButton"}, // 按钮:SST {"name", tr("RANS Model")},
{"name", tr("SST")}, {"widget", "GroupBox"},
}), },
}), {
}); new CUIConfig({
{"type", "RadioButton"}, // 按钮:S-A(一方程)
{"name", tr("S-A")},
}),
new CUIConfig({
{"type", "RadioButton"}, // 按钮:Menters's κ-ω(两方程)
{"name", tr("Menters's κ-ω")},
}),
}),
new CUIConfig({
{"type", "RadioComponent"}, // 组:κ-ω类型
{"name", tr("κ-ω Type")},
{"widget", "GroupBox"},
},
{
new CUIConfig({
{"type", "RadioButton"}, // 按钮:SST
{"name", tr("SST")},
}),
}),
});
return nullptr; return nullptr;
} }

@ -1,4 +1,4 @@
#include "CFDStructDataSolverTimeModeManager.h" #include "CFDStructDataSolverTimeModeManager.h"
#include "CUIProperty/CUIConfig.h" #include "CUIProperty/CUIConfig.h"
#include "CFDStructMain/CFDStructDefine.h" #include "CFDStructMain/CFDStructDefine.h"
#include "CFDStructSigsCenter.h" #include "CFDStructSigsCenter.h"
@ -9,9 +9,7 @@ CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *
{ {
m_uiConfig = nullptr; m_uiConfig = nullptr;
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [ = ](int semaphore) { connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [ = ](int semaphore) {
if (semaphore == (int)SolutionAnalysisModuleProperty::TIME_MODE) { emit CFDStructSigsCenter::getInstance()->sig_solverModuleProperty((SolutionAnalysisModuleProperty)semaphore);
emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged();
}
}); });
} }
@ -46,7 +44,7 @@ CUIConfig *CFDStructDataSolverTimeModeManager::genSteadyModeUIConfig()
{"name", "Time Mode"}, {"name", "Time Mode"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_runtype)}, {"value_origin", QVA_GLOBAL(&m_runtype)},
{"semaphore", (int)SolutionAnalysisModuleProperty::TIME_MODE}, {"semaphore", (int)SolutionAnalysisModuleProperty::Time_Mode},
}, { }, {
new CUIConfig({ new CUIConfig({
{"type", "Item"}, {"type", "Item"},
@ -75,7 +73,7 @@ CUIConfig *CFDStructDataSolverTimeModeManager::genUnsteadyModeUIConfig()
{"name", "Time Mode"}, {"name", "Time Mode"},
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT}, {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
{"value_origin", QVA_GLOBAL(&m_runtype)}, {"value_origin", QVA_GLOBAL(&m_runtype)},
{"semaphore", (int)SolutionAnalysisModuleProperty::TIME_MODE}, {"semaphore", (int)SolutionAnalysisModuleProperty::Time_Mode},
}, { }, {
new CUIConfig({ new CUIConfig({
{"type", "Item"}, {"type", "Item"},

@ -1,4 +1,4 @@
#ifndef CFDSTRUCTDEFINE_H #ifndef CFDSTRUCTDEFINE_H
#define CFDSTRUCTDEFINE_H #define CFDSTRUCTDEFINE_H
#include <QObject> #include <QObject>
@ -49,8 +49,18 @@ Q_DECLARE_METATYPE(SolutionAnalysisTreeEnum)
// 属性变化信号 // 属性变化信号
enum class SolutionAnalysisModuleProperty { enum class SolutionAnalysisModuleProperty {
TIME_MODE, Time_Mode,
KVISL, Basic_Model,
Viscosity_Model,
NUumerical_Methods,
Motion_Properties,
Boundary_Conditions,
Initialization,
Computational_Control_Reference_Quantity,
Computational_Control,
Monitors_Residual,
Monitors_AerodynamicForce,
Monitors_Tubomachinery_Performance,
UNKNOW, UNKNOW,
}; };

@ -1,4 +1,4 @@
#include "CFDTreeWidget.h" #include "CFDTreeWidget.h"
#include "GUIFrame/MainWindow.h" #include "GUIFrame/MainWindow.h"
#include "GUIFrame/PropertyWidget.h" #include "GUIFrame/PropertyWidget.h"
@ -47,16 +47,11 @@ namespace GUI
void CFDTreeWidget::updateTree(QString s) void CFDTreeWidget::updateTree(QString s)
{ {
this->clear(); this->clear();
if (s == "SolutionAnalysis") if (s == "SolutionAnalysis") {
{
addTreeSolutionAnalysis(); addTreeSolutionAnalysis();
} } else if (s == "Postprocessing") {
else if (s == "Postprocessing")
{
addTreePostprocessing(); addTreePostprocessing();
} } else if (s == "Preprocessing") {
else if (s == "Preprocessing")
{
addTreePreprocessing(); addTreePreprocessing();
} }
setItemsExpandable(true); setItemsExpandable(true);
@ -219,91 +214,96 @@ namespace GUI
void CFDTreeWidget::onItemClicked(QTreeWidgetItem *item, int column) void CFDTreeWidget::onItemClicked(QTreeWidgetItem *item, int column)
{ {
EventOper::TreeEventOperator *treeOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<EventOper::TreeEventOperator>("ModelTreeEvent"); EventOper::TreeEventOperator *treeOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<EventOper::TreeEventOperator>("ModelTreeEvent");
if (treeOper == nullptr) if (treeOper == nullptr) {
{
return; return;
} }
EventOper::GraphEventOperator *graphOper = FITKOPERREPO->getOperatorT<EventOper::GraphEventOperator>("GraphPreprocess"); EventOper::GraphEventOperator *graphOper = FITKOPERREPO->getOperatorT<EventOper::GraphEventOperator>("GraphPreprocess");
if (graphOper == nullptr) if (graphOper == nullptr) {
{
return; return;
} }
graphOper->clearHighlight(); graphOper->clearHighlight();
if (item == nullptr) if (item == nullptr) {
{
return; return;
} }
int objID = item->data(1, 0).toInt(); int objID = item->data(1, 0).toInt();
SolutionAnalysisTreeEnum treeType = item->data(2, 0).value<SolutionAnalysisTreeEnum>(); SolutionAnalysisTreeEnum treeType = item->data(2, 0).value<SolutionAnalysisTreeEnum>();
Interface::FITKGeoEnum::FITKGeometryComType geometryType = item->data(3, 0).value<Interface::FITKGeoEnum::FITKGeometryComType>(); Interface::FITKGeoEnum::FITKGeometryComType geometryType = item->data(3, 0).value<Interface::FITKGeoEnum::FITKGeometryComType>();
QString name = "";
SolutionAnalysisModuleProperty sig = SolutionAnalysisModuleProperty::UNKNOW; SolutionAnalysisModuleProperty sig = SolutionAnalysisModuleProperty::UNKNOW;
switch (treeType) // QMap<SolutionAnalysisTreeEnum, SolutionAnalysisModuleProperty> treeNodeToModuleProperty = {
{ // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode, SolutionAnalysisModuleProperty::Time_Mode}
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode: // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel, SolutionAnalysisModuleProperty::Basic_Model}
name = "actionTimeModeEdit"; // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverViscosityModel, SolutionAnalysisModuleProperty::Time_Mode}
break; // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverViscosityModel, SolutionAnalysisModuleProperty::Time_Mode}
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel: // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverNumericalMethods, SolutionAnalysisModuleProperty::Time_Mode}
name = "actionBasicModelEdit"; // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMotionProperties, SolutionAnalysisModuleProperty::Time_Mode}
break; // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditionsPressureInlet, SolutionAnalysisModuleProperty::Time_Mode}
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverViscosityModel: // {SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverInitialization, SolutionAnalysisModuleProperty::Time_Mode}
name = "actionViscosityModelEdit"; // };
sig = SolutionAnalysisModuleProperty::KVISL; switch (treeType) {
break; case SolutionAnalysisTreeEnum::SATree_ComputationalSetupTimeMode:
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverNumericalMethods: sig = SolutionAnalysisModuleProperty::Time_Mode;
name = "actionNumericalMethodsEdit"; break;
break; case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBasicModel:
sig = SolutionAnalysisModuleProperty::Basic_Model;
break;
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverViscosityModel:
sig = SolutionAnalysisModuleProperty::Viscosity_Model;
break;
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverNumericalMethods:
sig = SolutionAnalysisModuleProperty::NUumerical_Methods;
break;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
// 运动属性 // 运动属性
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMotionProperties: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMotionProperties:
name = "actionMotionPropertiesEdit"; sig = SolutionAnalysisModuleProperty::Motion_Properties;
break; break;
// Pressure-Inlet // Pressure-Inlet
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditionsPressureInlet: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverBoundaryConditionsPressureInlet:
name = "actionPressureInletEdit"; sig = SolutionAnalysisModuleProperty::Boundary_Conditions;
break; break;
// 初始化 // 初始化
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverInitialization: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverInitialization:
name = "actionInitializationEdit"; sig = SolutionAnalysisModuleProperty::Initialization;
break; break;
// 参考量 // 参考量
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControlReferenceQuantity: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControlReferenceQuantity:
name = "actionReferenceQuantityEdit"; sig = SolutionAnalysisModuleProperty::Computational_Control_Reference_Quantity;
break; break;
// 计算控制 // 计算控制
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControl: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverComputationalControl:
name = "actionComputationalControlEdit"; sig = SolutionAnalysisModuleProperty::Computational_Control;
break; break;
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsResidual: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsResidual:
name = "actionComputationalMonitorsResidual"; sig = SolutionAnalysisModuleProperty::Monitors_Residual;
break; break;
default: case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsAerodynamicForce:
name = ""; sig = SolutionAnalysisModuleProperty::Monitors_AerodynamicForce;
break;
case SolutionAnalysisTreeEnum::SATree_ComputationalSetupComputationalDomainSolverMonitorsTurbomachineryPerformance:
sig = SolutionAnalysisModuleProperty::Monitors_Tubomachinery_Performance;
break;
default:
break;
} }
qDebug() << name << (int)sig; qDebug() << (int)sig;
if (sig != SolutionAnalysisModuleProperty::UNKNOW) { if (sig != SolutionAnalysisModuleProperty::UNKNOW) {
emit CFDStructSigsCenter::getInstance()->sig_solverModuleProperty(sig); emit CFDStructSigsCenter::getInstance()->sig_solverModuleProperty(sig);
return; return;
} }
// if (!name.isEmpty()) {
if (!name.isEmpty()) // QObject sender;
{ // sender.setObjectName(name);
QObject sender; // auto acOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<Core::FITKActionOperator>(name);
sender.setObjectName(name); // if (acOper == nullptr) {
auto acOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<Core::FITKActionOperator>(name); // qDebug("acOper is nullptr");
if (acOper == nullptr) // return;
{ // }
qDebug("acOper is nullptr"); // acOper->setEmitter(&sender);
return; // acOper->setArgs("objID", objID);
} // acOper->actionTriggered();
acOper->setEmitter(&sender); // } else {
acOper->setArgs("objID", objID); // treeOper->moveProcessToStep(0);
acOper->actionTriggered(); // }
}
else
{
treeOper->moveProcessToStep(0);
}
} }
} }

@ -1,4 +1,4 @@
#include "CFDStructOperatorsModelSolverProperty.h" #include "CFDStructOperatorsModelSolverProperty.h"
#include "CFDStructOperatorsModelSolverProperty.h" #include "CFDStructOperatorsModelSolverProperty.h"
#include "GUIFrame/MainWindow.h" #include "GUIFrame/MainWindow.h"
@ -19,10 +19,10 @@ CFDStructOperatorsModelSolverProperty::CFDStructOperatorsModelSolverProperty(QOb
{ {
CFDStructSigsCenter* sigsCenter = CFDStructSigsCenter::getInstance(); CFDStructSigsCenter* sigsCenter = CFDStructSigsCenter::getInstance();
connect(sigsCenter, &CFDStructSigsCenter::sig_solverModuleProperty, this, [ = ](SolutionAnalysisModuleProperty sig, QVariant idx) { connect(sigsCenter, &CFDStructSigsCenter::sig_solverModuleProperty, this, [ = ](SolutionAnalysisModuleProperty sig, QVariant idx) {
if (sig == SolutionAnalysisModuleProperty::UNKNOW) if (sig == SolutionAnalysisModuleProperty::UNKNOW) {
return; return;
}
m_module = sig; m_module = sig;
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow()); GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
if (mainWindow == nullptr) { if (mainWindow == nullptr) {
return; return;
@ -31,15 +31,14 @@ CFDStructOperatorsModelSolverProperty::CFDStructOperatorsModelSolverProperty(QOb
if (propertyWidget == nullptr) { if (propertyWidget == nullptr) {
return; return;
} }
QString name = ""; // QString name = "";
if (sig == SolutionAnalysisModuleProperty::KVISL) // if (sig == SolutionAnalysisModuleProperty::KVISL)
name = "actionViscosityModelEdit"; // name = "actionViscosityModelEdit";
CUIConfig* uiConfig = CFDStructDataManager::getInstance()->getActionParamUIConfig(name); CUIConfig* uiConfig = CFDStructDataManager::getInstance()->getActionParamUIConfig(sig, idx);
// uiConfig->printConfig(); // uiConfig->printConfig();
QWidget* widget = new CUI(nullptr,uiConfig); QWidget* widget = new CUI(nullptr, uiConfig);
propertyWidget->setWidget(widget); propertyWidget->setWidget(widget);
return; return;
}); });
} }
@ -48,6 +47,5 @@ CFDStructOperatorsModelSolverProperty *CFDStructOperatorsModelSolverProperty::ge
if (m_instance == nullptr) { if (m_instance == nullptr) {
m_instance = new CFDStructOperatorsModelSolverProperty; m_instance = new CFDStructOperatorsModelSolverProperty;
} }
return m_instance; return m_instance;
} }

Loading…
Cancel
Save