From 6a455ae53c65bb01ffc8b9e83a8a56fc9e452923 Mon Sep 17 00:00:00 2001 From: mzh Date: Sun, 3 Nov 2024 17:30:35 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AE=8C=E6=88=90=E5=8F=82=E8=80=83?= =?UTF-8?q?=E9=87=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ructDataSolverReferenceQuantityManager.cpp | 27 ++++++++++++----- ...StructDataSolverReferenceQuantityManager.h | 30 ++++++++++--------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.cpp b/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.cpp index 4d5b936..9b566f6 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.cpp +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.cpp @@ -10,8 +10,7 @@ CFDStructDataSolverReferenceQuantityManager::CFDStructDataSolverReferenceQuantit { m_uiConfig = nullptr; connect(m_cuiSigsCenter, &CUISigsCenter::sig_cuiPropertyChanged, this, [=](int semaphore) - { - emit CFDStructSigsCenter::getInstance()->sig_solverTimeModeDataChanged(); }); + { emit CFDStructSigsCenter::getInstance() -> sig_solverTimeModeDataChanged(); }); } CFDStructDataSolverReferenceQuantityManager::~CFDStructDataSolverReferenceQuantityManager() @@ -38,8 +37,12 @@ CUIConfig *CFDStructDataSolverReferenceQuantityManager::genUIConfig() {"type", "Widget"}, }, { - new CUIConfig({{"type", "ComboBox"}, // 参考值取自 - {"name", tr("The reference value is taken from")}}, + 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", "Item"}, // 无 @@ -50,28 +53,36 @@ CUIConfig *CFDStructDataSolverReferenceQuantityManager::genUIConfig() {"name", tr("thermodynamics")}}, { new CUIConfig({ - {"type", "LineEdit"},//压强 + {"type", "LineEdit"}, // 压强 {"name", tr("pressure")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_Pressure)}, }), new CUIConfig({ - {"type", "LineEdit"},//温度 + {"type", "LineEdit"}, // 温度 {"name", tr("temperature")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_Temperature)}, }), }), new CUIConfig({{"type", "GroupBox"}, // Re数相关 {"name", tr("Re number related")}}, { new CUIConfig({ - {"type", "LineEdit"},//长度 + {"type", "LineEdit"}, // 长度 {"name", tr("length")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_Length)}, }), }), new CUIConfig({{"type", "GroupBox"}, // 力和力矩 {"name", tr("Force and torque")}}, { new CUIConfig({ - {"type", "LineEdit"},//面积 + {"type", "LineEdit"}, // 面积 {"name", tr("the measure of area")}, + {"value_type", CUI_DATA_TYPE::CUI_DATA_TYPE_DOUBLE}, + {"value_origin", QVA_GLOBAL(&m_Area)}, }), }), }); diff --git a/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.h b/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.h index a622417..5d5dfb9 100644 --- a/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.h +++ b/CFDStruct/CFDStructDataManager/CFDStructDataSolverReferenceQuantityManager.h @@ -15,26 +15,28 @@ public: explicit CFDStructDataSolverReferenceQuantityManager(QObject *parent = nullptr); ~CFDStructDataSolverReferenceQuantityManager(); - CUIConfig* getParamUIConfig(); + CUIConfig *getParamUIConfig(); private: // 生成界面配置 - CUIConfig* genUIConfig(); + CUIConfig *genUIConfig(); signals: private: - // 时间模式:定常0,非定常1 - int m_runtype = 0; - // 时间模式:定常0,则是迭代步数;时间模式:非定常1,则是内迭代步数 - int m_mcyc = 1000; - // 步长模式 >=1 - double m_alf0 = 1.0; - // 时间步长 >0 - double m_realdt = 1.0; - // 时间步数 >=1 - int m_nstep = 10; - // 时均统计量数据采样:0 | 1 - int m_timeaverage = 0; + // 参考值取自 + int m_ReferenceValuesFrom; // Reference Values From + + // 压强 + double m_Pressure; // Pressure + + // 温度 + double m_Temperature; // Temperature + + // 长度 + double m_Length; // Length + + // 面积 + double m_Area; // Area }; #endif // CFDSTRUCTDATASOLVERREFERENCEQUANTITYEMANAGER_H