#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 #include namespace ModelOper { CFDOperatorsTimeModeManager::CFDOperatorsTimeModeManager() { qDebug()<<"build Time Mode Manager"; } CFDOperatorsTimeModeManager::~CFDOperatorsTimeModeManager() { } bool CFDOperatorsTimeModeManager::execGUI() { QWidget* widget = nullptr; GUI::MainWindow* mainWindow = dynamic_cast(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()<<"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; } }