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 "CFDStructDataSolverBasicModelManager.h"
@ -11,6 +11,8 @@
#include "CFDStructDataSolverReferenceQuantityManager.h"
#include "CFDStructDataSolverComputingControlManager.h"
#include "CFDStructDataSolverMonitorResidualManager.h"
#include "CFDStructDataSolverMonitorAerodynamicManager.h"
#include "CFDStructDataSolverMonitorImpellerManager.h"
#include "CUIProperty/CUIConfig.h"
@ -22,44 +24,42 @@ CFDStructDataManager::CFDStructDataManager()
CFDStructDataManager *CFDStructDataManager::getInstance()
{
if (m_instance == nullptr)
{
if (m_instance == nullptr) {
m_instance = new CFDStructDataManager;
}
return m_instance;
}
CUIConfig *CFDStructDataManager::getActionParamUIConfig(QString s)
CUIConfig *CFDStructDataManager::getActionParamUIConfig(SolutionAnalysisModuleProperty sig, QVariant idx)
{
if (s == "actionTimeModeEdit")
{
qDebug("DataManager create TimeMode CUIConfig");
return m_solverTimeModeManager->getParamUIConfig();
switch (sig) {
case SolutionAnalysisModuleProperty::Time_Mode:
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";
return nullptr;
}
@ -70,12 +70,12 @@ void CFDStructDataManager::initDataManagers()
m_solverBasicModeManager = new CFDStructDataSolverBasicModelManager;
m_solverKvislManager = new CFDStructDataSolverKvislManager;
m_solverNumericalMethodManager = new CFDStructDataSolverNumericalMethodManager;
m_solverSportsAttributesManager = new CFDStructDataSolverSportsAttributesManager;
m_solverBoundaryConditionManager = new CFDStructDataSolverBoundaryConditionManager;
m_solverInitializationManager = new CFDStructDataSolverInitializationManager;
m_solverReferenceQuantityManager = new CFDStructDataSolverReferenceQuantityManager;
m_solverComputingControlManager = new CFDStructDataSolverComputingControlManager;
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
#include "CFDStructDataManager_global.h"
#include "CFDStructMain/CFDStructDefine.h"
class CFDStructDataSolverSportsAttributesManager;
class CFDStructDataSolverBoundaryConditionManager;
@ -14,6 +15,8 @@ class CFDStructDataSolverBasicModelManager;
class CFDStructDataSolverKvislManager;
class CFDStructDataSolverNumericalMethodManager;
class CFDStructDataSolverMonitorResidualManager;
class CFDStructDataSolverMonitorAerodynamicManager;
class CFDStructDataSolverMonitorImpellerManager;
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataManager
@ -23,7 +26,7 @@ public:
static CFDStructDataManager *getInstance();
// 获取一个action的参数设置配置
CUIConfig *getActionParamUIConfig(QString s);
CUIConfig *getActionParamUIConfig(SolutionAnalysisModuleProperty sig, QVariant idx);
private:
void initDataManagers();
@ -48,6 +51,10 @@ private:
CFDStructDataSolverComputingControlManager *m_solverComputingControlManager;
// 监控-残差曲线
CFDStructDataSolverMonitorResidualManager *m_solverMonitorResidualManager;
// 监控-气动力曲线
CFDStructDataSolverMonitorAerodynamicManager *m_solverMonitorAerodynamicForceManager;
// 监控-叶轮机械性能曲线
CFDStructDataSolverMonitorImpellerManager *m_solverMonitorTubomachineryPerformanceManager;
};
#endif // CFDSTRUCTDATAMANAGER_H

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

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

@ -1,4 +1,4 @@
#ifndef CFDSTRUCTDEFINE_H
#ifndef CFDSTRUCTDEFINE_H
#define CFDSTRUCTDEFINE_H
#include <QObject>
@ -49,8 +49,18 @@ Q_DECLARE_METATYPE(SolutionAnalysisTreeEnum)
// 属性变化信号
enum class SolutionAnalysisModuleProperty {
TIME_MODE,
KVISL,
Time_Mode,
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,
};

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

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

Loading…
Cancel
Save