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.
79 lines
2.2 KiB
C++
79 lines
2.2 KiB
C++
#include "CFDOperatorsTimeModeManager.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
|
|
{
|
|
CFDOperatorsTimeModeManager::CFDOperatorsTimeModeManager()
|
|
{
|
|
qDebug() << "build Time Mode Manager";
|
|
}
|
|
|
|
CFDOperatorsTimeModeManager::~CFDOperatorsTimeModeManager()
|
|
{
|
|
}
|
|
|
|
bool CFDOperatorsTimeModeManager::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::TimeModeWidget(this);
|
|
// break;
|
|
// }
|
|
// }
|
|
qDebug() << " ---------------------- senderName: " << _senderName;
|
|
qDebug() << "Time Mode Manager11111111111";
|
|
widget = new QLabel("Time Mode Manager11111");
|
|
CUI* cui = new CUI(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"}
|
|
}, {})
|
|
}));
|
|
widget = cui->getUI();
|
|
// if (mainWindow->getPropertyWidget() && widget) {
|
|
propertyWidget->setWidget(widget);
|
|
// }
|
|
return false;
|
|
}
|
|
|
|
bool CFDOperatorsTimeModeManager::execProfession()
|
|
{
|
|
return true;
|
|
}
|
|
}
|