1、初步完成基本模型的界面配置

2、在CFDStructMainWindow中调用了DataManager,使编译器能够运行注册宏
feature/struct-menu-20241023
mzh 2 weeks ago
parent 727b9b29bc
commit e2a28fdcc5

@ -2,6 +2,9 @@
#define CFDSTRUCTDATAMANAGER_H
#include "CFDStructDataManager_global.h"
class CFDStructDataSolverTimeModeManager;
class CUIConfig;

@ -1,10 +1,12 @@
SOURCES += \
$$PWD/CFDStructDataSolverTimeModeManager.cpp \
$$PWD/CFDStructDataSolverBasicModelManager.cpp \
$$PWD/CFDStructSigsCenter.cpp \
$$PWD/CFDStructDataManager.cpp \
HEADERS += \
$$PWD/CFDStructDataSolverTimeModeManager.h \
$$PWD/CFDStructDataSolverBasicModelManager.h \
$$PWD/CFDStructSigsCenter.h \
$$PWD/CFDStructDataManager_global.h \
$$PWD/CFDStructDataManager.h

@ -60,6 +60,7 @@ win32{
-lFITKFlowOFIOHDF5 \
-lOperatorsModel \
-lCUIProperty \
-lCFDStructOperatorsModel \
# -lCFDStructDataManager \
@ -93,6 +94,8 @@ win32{
-lFITKFlowOFIOHDF5 \
-lOperatorsModel \
-lCUIProperty \
-lCFDStructOperatorsModel \
# -lCFDStructDataManager \

@ -0,0 +1,107 @@
#include "CFDStructDataSolverBasicModelManager.h"
#include "CUIProperty/CUIConfig.h"
CFDStructDataSolverBasicModelManager::CFDStructDataSolverBasicModelManager(QObject *parent) : QObject(parent)
{
m_uiConfig = nullptr;
}
CFDStructDataSolverBasicModelManager::~CFDStructDataSolverBasicModelManager()
{
if (m_uiConfig != nullptr)
{
delete m_uiConfig;
m_uiConfig = nullptr;
}
}
/**
* @param ,,
*
* @return
*/
CUIConfig *CFDStructDataSolverBasicModelManager::genFluidPropertiesOffUIConfig()
{
return new CUIConfig({
{"type", "Widget"},
},
{new CUIConfig({
// 下拉框:求解器类型
{"type", "ComboBox"},
{"name", tr("Solver Type")},
},
{new CUIConfig({
{"type", "Item"}, {"name", tr("Compressible Flow")} // 选项:可压缩流动
})}),
new CUIConfig({// 下拉框:流动模型
{"type", "ComboBox"},
{"name", tr("Flow Model")}},
{new CUIConfig({// 选项:外流
{"type", "Item"},
{"name", tr("Internal Flow")}}),
new CUIConfig({// 选项:内流
{"type", "Item"},
{"name", tr("External Flow")}}),
new CUIConfig({// 选项:多级叶轮机械
{"type", "Item"},
{"name", tr("Multistage Turbomachinery")}})}),
new CUIConfig({// 方形勾选:重叠网络
{"type", "CheckBox"},
{"name", tr("Overlay Network")}}),
new CUIConfig({// 圆形选择按钮:流体属性
{"type", "RadioButton"},
{"name", tr("Fluid Properties")}})});
}
CUIConfig *CFDStructDataSolverBasicModelManager::genFluidPropertiesOnUIConfig()
{
return new CUIConfig({
{"type", "Widget"},
},
{new CUIConfig({
// 下拉框:求解器类型
{"type", "ComboBox"},
{"name", tr("Solver Type")},
},
{new CUIConfig({
{"type", "Item"}, {"name", tr("Compressible Flow")} // 选项:可压缩流动
})}),
new CUIConfig({// 下拉框:流动模型
{"type", "ComboBox"},
{"name", tr("Flow Model")}},
{new CUIConfig({// 选项:外流
{"type", "Item"},
{"name", tr("Internal Flow")}}),
new CUIConfig({// 选项:内流
{"type", "Item"},
{"name", tr("External Flow")}}),
new CUIConfig({// 选项:多级叶轮机械
{"type", "Item"},
{"name", tr("Multistage Turbomachinery")}})}),
new CUIConfig({// 方形勾选:重叠网络
{"type", "CheckBox"},
{"name", tr("ichimr")}}),
new CUIConfig({// 圆形选择按钮:流体属性
{"type", "RadioButton"},
{"name", tr("Fluid Properties")}}),
new CUIConfig({// 组,流体属性下的内容
{"type", "GroupBox"},
{"name", tr("Fluid Properties")}},
{
new CUIConfig({// 气体成分
{"type", "LineEdit"},
{"name", tr("Gas Composition")}}),
new CUIConfig({// 气体常数
{"type", "LineEdit"},
{"name", tr("rgasmean")}}),
new CUIConfig({// 比热比
{"type", "LineEdit"},
{"name", tr("gmean")}}),
new CUIConfig({// 层流普朗特数
{"type", "LineEdit"},
{"name", tr("prlmean")}}),
new CUIConfig({// 湍流普朗特数
{"type", "LineEdit"},
{"name", tr("prtmean")}}),
})});
}

@ -0,0 +1,40 @@
#ifndef CFDSTRUCTDATASOLVERBASICMODELMANAGER_H
#define CFDSTRUCTDATASOLVERBASICMODELMANAGER_H
#include <QObject>
#include "CFDStructDataManager_global.h"
class CUIConfig;
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataSolverBasicModelManager : public QObject
{
Q_OBJECT
public:
explicit CFDStructDataSolverBasicModelManager(QObject *parent = nullptr);
~CFDStructDataSolverBasicModelManager();
CUIConfig* getParamUIConfig();
private:
// 生成流体属性关闭界面配置
CUIConfig* genFluidPropertiesOffUIConfig();
// 生成流体属性开启界面配置
CUIConfig* genFluidPropertiesOnUIConfig();
signals:
private:
// 鏃堕棿妯″紡
int m_runtype = 0;
// 杩唬姝ユ暟锛>=1锛屽畾甯告椂锛氳凯浠鏁帮紝闈炲畾甯革細鍐呰凯浠鏁 int m_mcyc = 1000;
// 姝ラ暱妯″紡锛屽浐瀹氾紝涓嶅彲淇敼
double m_alf0 = 1.0;
// 鏃堕棿姝ラ暱锛0
double m_realdt = 1.0;
// 鏃堕棿姝ユ暟锛=1
double m_nstep = 10;
// 鏃跺潎缁熻閲忔暟鎹噰鏍0,1
int m_timeaverage = 0;
CUIConfig* m_uiConfig = nullptr;
};
#endif // CFDSTRUCTDATASOLVERBASICMODELMANAGER_H

@ -38,6 +38,7 @@ win32{
-lOperatorsInterface \
-lFITKInterfaceGeometry \
-lCFDStructDataManager \
-lCFDStructOperatorsModel \
Debug:CONFIG += console
@ -58,6 +59,8 @@ win32{
-lOperatorsInterface \
-lFITKInterfaceGeometry \
-lCFDStructDataManager \
-lCFDStructOperatorsModel \
Debug:LIBS += -L$$PWD/../../Tools/Win64/SARibbon/libd/ \
-lSARibbonBard \

@ -23,6 +23,10 @@
#include <QSplitter>
#include <QTreeWidgetItem>
#include "CFDStructOperatorsModel/CFDStructOperatorsTimeModeManager.h"
//CFDStructMainWindow::CFDStructMainWindow() : GUI::MainWindow()
//{
// qDebug()<<"new CFSStructMainWindow";
@ -136,7 +140,14 @@ void CFDStructMainWindow::initPropertyWidget()
// });
// cuiconfig->printConfig();
// cuilayout->addWidget(cui->getUI());
QWidget* test = new CUI(nullptr,new CUIConfig({
{"type","LineEdit"},
{"name","test"}
}));
m_PropertyWidget->setWidget(cuiwidget);
m_PropertyWidget->setWidget(test);
}
void CFDStructMainWindow::initMainWindowMenu()

@ -5,7 +5,7 @@
#include "GUIFrame/MainTreeWidget.h"
#include "OperatorsInterface/GraphEventOperator.h"
#include "OperatorsInterface/TreeEventOperator.h"
#include "CFDOperatorsModel/CFDOperatorsTimeModeManager.h"
//#include "CFDOperatorsModel/CFDOperatorsTimeModeManager.h"
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"

@ -59,6 +59,9 @@ void CUI::buildUI()
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(widget);
this->setLayout(layout);
// QSpacerItem* spacer = new QSpacerItem(5000,5000,QSizePolicy::Maximum,QSizePolicy::Maximum);
// layout->addItem(spacer);
} else {
qDebug() << "----------- ui widget is null";
}

@ -67,6 +67,8 @@ CUIConfig::CUIConfig(QMap<QString, QVariant> property)
* - "name" :
* - sub :
*
* @subsection RadioButton
* - "name" :
*
* @param property
* @param sub

Loading…
Cancel
Save