#include "CFDStructOperatorsTimeModeManager.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 "CFDStructDataManager/CFDStructDataManager.h" #include "CFDStructDataManager/CFDStructSigsCenter.h" #include #include namespace ModelOper { CFDStructOperatorsTimeModeManager::CFDStructOperatorsTimeModeManager() { qDebug() << "build Time Mode Manager"; CFDStructSigsCenter* sigsCenter = CFDStructSigsCenter::getInstance(); connect(sigsCenter, &CFDStructSigsCenter::sig_solverTimeModeDataChanged, this, [ = ]() { QObject sender; sender.setObjectName("actionTimeModeEdit"); this->setEmitter(&sender); this->execGUI(); }); } CFDStructOperatorsTimeModeManager::~CFDStructOperatorsTimeModeManager() { } bool CFDStructOperatorsTimeModeManager::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; } qDebug() << " ---------------------- senderName: " << _senderName; qDebug() << "Time Mode Manager11111111111"; widget = new QLabel("Time Mode Manager11111"); if (_senderName == "actionTimeModeEdit") { CUIConfig* uiConfig = CFDStructDataManager::getInstance()->getActionParamUIConfig(1); // uiConfig->printConfig(); widget = new CUI(nullptr, uiConfig); } propertyWidget->setWidget(widget); return false; } bool CFDStructOperatorsTimeModeManager::execProfession() { return true; } }