1、将saveDataToDom和readDataFromDom函数改为纯虚函数
2、实现各个继承base的类 3、添加运动属性备注-----运动区域相关feature/struct-menu-20241023
parent
ee50694540
commit
84b1ce0bf3
@ -1,201 +1,198 @@
|
||||
#include "CFDStructDataSolverInitializationManager.h"
|
||||
#include "CFDStructDataSolverTimeModeManager.h"
|
||||
#include "CUIProperty/CUIConfig.h"
|
||||
#include "CFDStructMain/CFDStructDefine.h"
|
||||
#include "CFDStructSigsCenter.h"
|
||||
#include "CUIProperty/CUIConfig.h"
|
||||
#include "CUIProperty/CUISigsCenter.h"
|
||||
#include <QVariant>
|
||||
#include "CFDStructDataSolverInitializationManager.h"
|
||||
|
||||
CFDStructDataSolverInitializationManager::CFDStructDataSolverInitializationManager(QObject *parent) : CFDStructDataManagerBase(parent)
|
||||
{
|
||||
CFDStructDataSolverInitializationManager::CFDStructDataSolverInitializationManager(QObject *parent) : CFDStructDataManagerBase(parent) {
|
||||
m_uiConfig = nullptr;
|
||||
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore)
|
||||
{ emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); });
|
||||
connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) { emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); });
|
||||
}
|
||||
|
||||
CFDStructDataSolverInitializationManager::~CFDStructDataSolverInitializationManager()
|
||||
{
|
||||
CFDStructDataSolverInitializationManager::~CFDStructDataSolverInitializationManager() {
|
||||
// CFDStructDataManagerBase::~CFDStructDataManagerBase();
|
||||
}
|
||||
|
||||
CUIConfig *CFDStructDataSolverInitializationManager::getParamUIConfig()
|
||||
{
|
||||
if (m_uiConfig != nullptr)
|
||||
{
|
||||
CUIConfig *CFDStructDataSolverInitializationManager::getParamUIConfig() {
|
||||
if (m_uiConfig != nullptr) {
|
||||
delete m_uiConfig;
|
||||
m_uiConfig = nullptr;
|
||||
}
|
||||
|
||||
if(m_CoordinateSystem == 0)
|
||||
if (m_CoordinateSystem == 0)
|
||||
return genCylindricalUIConfig();
|
||||
if(m_CoordinateSystem == 1)
|
||||
if (m_CoordinateSystem == 1)
|
||||
return genCartesianUIConfig();
|
||||
|
||||
|
||||
return m_uiConfig;
|
||||
}
|
||||
|
||||
void CFDStructDataSolverInitializationManager::saveDataToDom(rapidjson::Document &dom)
|
||||
{
|
||||
void CFDStructDataSolverInitializationManager::saveDataToDom(rapidjson::Document &dom) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CFDStructDataSolverInitializationManager::readDataFromDom(rapidjson::Document &dom) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
CUIConfig *CFDStructDataSolverInitializationManager::genCylindricalUIConfig()
|
||||
{
|
||||
CUIConfig *CFDStructDataSolverInitializationManager::genCylindricalUIConfig() {
|
||||
return new CUIConfig({
|
||||
{"type", "Widget"},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"}, // 参考值取自
|
||||
{"name", tr("The reference value is taken from")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_ReferenceValuesFrom)},
|
||||
},
|
||||
{}),
|
||||
{"type", "Widget"},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"}, // 参考值取自
|
||||
{"name", tr("The reference value is taken from")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_ReferenceValuesFrom)},
|
||||
},
|
||||
{}),
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"}, // 坐标系
|
||||
{"name", tr("Coordinate System")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_CoordinateSystem)},
|
||||
{"semaphore", (int)SolutionAnalysisModuleProperty::Initialization},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "Cylindrical Coordinate System"},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "Cartesian Coordinate System"},
|
||||
}),
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type","ComboBox"},//坐标系
|
||||
{"name",tr("Coordinate System")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_CoordinateSystem)},
|
||||
{"semaphore", (int)SolutionAnalysisModuleProperty::Initialization},
|
||||
},{
|
||||
new CUIConfig({
|
||||
{"type","Item"},
|
||||
{"name","Cylindrical Coordinate System"},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type","Item"},
|
||||
{"name","Cartesian Coordinate System"},
|
||||
}),
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "GroupBox"}, // 初始值定义
|
||||
{"name", tr("Initial value definition")},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 密度
|
||||
{"name", tr("density")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Density)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 展向速度vr
|
||||
{"name", tr("Vr")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vr)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 周向速度Vtheta
|
||||
{"name", tr("Vtheta")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vtheta)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 轴向速度Vz
|
||||
{"name", tr("Vz")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vz)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 压强
|
||||
{"name", tr("pressure")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Pressure)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流粘性比
|
||||
{"name", tr("Turbulent viscosity ratio")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流强度
|
||||
{"name", tr("Turbulence intensity")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
{"type", "GroupBox"}, // 初始值定义
|
||||
{"name", tr("Initial value definition")},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 密度
|
||||
{"name", tr("density")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Density)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 展向速度vr
|
||||
{"name", tr("Vr")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vr)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 周向速度Vtheta
|
||||
{"name", tr("Vtheta")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vtheta)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 轴向速度Vz
|
||||
{"name", tr("Vz")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vz)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 压强
|
||||
{"name", tr("pressure")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Pressure)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流粘性比
|
||||
{"name", tr("Turbulent viscosity ratio")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流强度
|
||||
{"name", tr("Turbulence intensity")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
CUIConfig *CFDStructDataSolverInitializationManager::genCartesianUIConfig()
|
||||
{
|
||||
CUIConfig *CFDStructDataSolverInitializationManager::genCartesianUIConfig() {
|
||||
return new CUIConfig({
|
||||
{"type", "Widget"},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"}, // 参考值取自
|
||||
{"name", tr("The reference value is taken from")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_ReferenceValuesFrom)},
|
||||
},
|
||||
{}),
|
||||
{"type", "Widget"},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"}, // 参考值取自
|
||||
{"name", tr("The reference value is taken from")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_ReferenceValuesFrom)},
|
||||
},
|
||||
{}),
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"}, // 坐标系
|
||||
{"name", tr("Coordinate System")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_CoordinateSystem)},
|
||||
{"semaphore", (int)SolutionAnalysisModuleProperty::Initialization},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "Cylindrical Coordinate System"},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "Cartesian Coordinate System"},
|
||||
}),
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type","ComboBox"},//坐标系
|
||||
{"name",tr("Coordinate System")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_INT},
|
||||
{"value_origin", QVA_GLOBAL(&m_CoordinateSystem)},
|
||||
{"semaphore", (int)SolutionAnalysisModuleProperty::Initialization},
|
||||
},{
|
||||
new CUIConfig({
|
||||
{"type","Item"},
|
||||
{"name","Cylindrical Coordinate System"},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type","Item"},
|
||||
{"name","Cartesian Coordinate System"},
|
||||
}),
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "GroupBox"}, // 初始值定义
|
||||
{"name", tr("Initial value definition")},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 密度
|
||||
{"name", tr("density")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Density)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // vx
|
||||
{"name", tr("Vx")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vx)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // vy
|
||||
{"name", tr("Vy")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vy)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // vz
|
||||
{"name", tr("Vz")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vz)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 压强
|
||||
{"name", tr("pressure")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Pressure)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流粘性比
|
||||
{"name", tr("Turbulent viscosity ratio")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流强度
|
||||
{"name", tr("Turbulence intensity")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
{"type", "GroupBox"}, // 初始值定义
|
||||
{"name", tr("Initial value definition")},
|
||||
},
|
||||
{
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 密度
|
||||
{"name", tr("density")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Density)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // vx
|
||||
{"name", tr("Vx")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vx)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // vy
|
||||
{"name", tr("Vy")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vy)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // vz
|
||||
{"name", tr("Vz")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Vz)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 压强
|
||||
{"name", tr("pressure")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_Pressure)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流粘性比
|
||||
{"name", tr("Turbulent viscosity ratio")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentViscosityRatio)},
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"}, // 湍流强度
|
||||
{"name", tr("Turbulence intensity")},
|
||||
{"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE},
|
||||
{"value_origin", QVA_GLOBAL(&m_TurbulentIntensity)},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue