1、结构化时间模式设置管理;
parent
327e18a0cb
commit
57a590f984
@ -0,0 +1,95 @@
|
||||
#include "CFDStructDataSolverTimeModeManager.h"
|
||||
#include "CUIProperty/CUIConfig.h"
|
||||
|
||||
CFDStructDataSolverTimeModeManager::CFDStructDataSolverTimeModeManager(QObject *parent) : QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
CFDStructDataSolverTimeModeManager::~CFDStructDataSolverTimeModeManager()
|
||||
{
|
||||
if (m_uiConfig != nullptr) {
|
||||
delete m_uiConfig;
|
||||
m_uiConfig = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
CUIConfig *CFDStructDataSolverTimeModeManager::getParamUIConfig()
|
||||
{
|
||||
if (m_uiConfig != nullptr) {
|
||||
delete m_uiConfig;
|
||||
m_uiConfig = nullptr;
|
||||
}
|
||||
// 如果是定常
|
||||
if (m_runtype == 0) {
|
||||
m_uiConfig = this->genSteadyModeUIConfig();
|
||||
} else {
|
||||
// 如果是非定常
|
||||
m_uiConfig = this->genUnsteadyModeUIConfig();
|
||||
}
|
||||
return m_uiConfig;
|
||||
}
|
||||
|
||||
CUIConfig *CFDStructDataSolverTimeModeManager::genSteadyModeUIConfig()
|
||||
{
|
||||
return new CUIConfig({
|
||||
{"type", "Widget"}
|
||||
}, {
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"},
|
||||
{"name", "Time Mode"},
|
||||
}, {
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "steady"}
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "unsteady"}
|
||||
})
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"},
|
||||
{"name", "iteration count"}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
CUIConfig *CFDStructDataSolverTimeModeManager::genUnsteadyModeUIConfig()
|
||||
{
|
||||
return new CUIConfig({
|
||||
{"type", "Widget"}
|
||||
}, {
|
||||
new CUIConfig({
|
||||
{"type", "ComboBox"},
|
||||
{"name", "Time Mode"},
|
||||
}, {
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "steady"}
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "Item"},
|
||||
{"name", "unsteady"}
|
||||
})
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"},
|
||||
{"name", "alf0"}
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"},
|
||||
{"name", "realdt"}
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"},
|
||||
{"name", "nstep"}
|
||||
}),
|
||||
new CUIConfig({
|
||||
{"type", "LineEdit"},
|
||||
{"name", "mcyc"}
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue