You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
4.1 KiB
C++
101 lines
4.1 KiB
C++
3 weeks ago
|
#include "CFDOperatorsBasicModelManager.h"
|
||
|
|
||
|
#include "GUIFrame/MainWindow.h"
|
||
|
#include "GUIFrame/PropertyWidget.h"
|
||
|
|
||
|
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
|
||
|
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
|
||
|
#include "CFDStruct/CUIProperty/CUI.h"
|
||
|
#include "CUIProperty/CUIConfig.h"
|
||
|
|
||
|
#include <QLabel>
|
||
|
#include <QDebug>
|
||
|
|
||
|
namespace ModelOper
|
||
|
{
|
||
|
CFDOperatorsBasicModelManager::CFDOperatorsBasicModelManager()
|
||
|
{
|
||
|
qDebug()<<"build Time Mode Manager";
|
||
|
|
||
|
}
|
||
|
|
||
|
CFDOperatorsBasicModelManager::~CFDOperatorsBasicModelManager()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
bool CFDOperatorsBasicModelManager::execGUI()
|
||
|
{
|
||
|
QWidget* widget = nullptr;
|
||
|
|
||
|
GUI::MainWindow* mainWindow = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
|
||
|
if (mainWindow == nullptr)return false;
|
||
|
GUI::PropertyWidget* propertyWidget = mainWindow->getPropertyWidget();
|
||
|
if (propertyWidget == nullptr)return false;
|
||
|
|
||
|
// switch (_operType){
|
||
|
// case ModelOper::OperManagerBase::Edit:
|
||
|
// {
|
||
|
// widget = new GUI::BasicModelWidget(this);
|
||
|
// break;
|
||
|
// }
|
||
|
// }
|
||
|
|
||
|
qDebug()<<"Time Mode Manager11111111111";
|
||
|
widget = new QLabel("Time Mode Manager11111");
|
||
|
|
||
|
CUI* cui = new CUI(new CUIConfig({
|
||
|
{"type","Widget"}
|
||
|
},{
|
||
|
new CUIConfig({
|
||
|
{"type","LineEidt"},
|
||
|
{"name","Solver type"}
|
||
|
}),
|
||
|
new CUIConfig({
|
||
|
{"type","ComboBox"},
|
||
|
{"name","flow model"}
|
||
|
},{}),
|
||
|
new CUIConfig({
|
||
|
{"type","PushButton"},
|
||
|
{"name","flow model"}
|
||
|
}),
|
||
|
new CUIConfig({
|
||
|
{"type","GroupBox"},
|
||
|
{"name","Fluid properties"}
|
||
|
},{
|
||
|
new CUIConfig({
|
||
|
{"type","LineEdit"},
|
||
|
{"name","Gas composition"}
|
||
|
}),
|
||
|
new CUIConfig({
|
||
|
{"type","LineEdit"},
|
||
|
{"name","Gas constant (R)"}
|
||
|
}),
|
||
|
new CUIConfig({
|
||
|
{"type","LineEdit"},
|
||
|
{"name","Heat ratio"}
|
||
|
}),
|
||
|
new CUIConfig({
|
||
|
{"type","LineEdit"},
|
||
|
{"name","Laminar Prandtl number"}
|
||
|
}),
|
||
|
new CUIConfig({
|
||
|
{"type","LineEdit"},
|
||
|
{"name","Turbulent Prandtl number"}
|
||
|
}),
|
||
|
})
|
||
|
|
||
|
}));
|
||
|
widget = cui->getUI();
|
||
|
// if (mainWindow->getPropertyWidget() && widget) {
|
||
|
propertyWidget->setWidget(widget);
|
||
|
// }
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
bool CFDOperatorsBasicModelManager::execProfession()
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
}
|