#include "CFDStructOperatorsModelSolverProperty.h" #include "CFDStructOperatorsModelSolverProperty.h" #include "GUIFrame/MainWindow.h" #include "GUIFrame/PropertyWidget.h" #include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h" #include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h" #include "CFDStruct/CUIProperty/CUIPropertyWidget.h" #include "CUIProperty/CUIConfig.h" #include "CFDStructDataManager/CFDStructDataManager.h" #include "CFDStructDataManager/CFDStructSigsCenter.h" #include #include CFDStructOperatorsModelSolverProperty* CFDStructOperatorsModelSolverProperty::m_instance = nullptr; CFDStructOperatorsModelSolverProperty::CFDStructOperatorsModelSolverProperty(QObject *parent) : QObject(parent) { CFDStructSigsCenter* sigsCenter = CFDStructSigsCenter::getInstance(); connect(sigsCenter, &CFDStructSigsCenter::sig_solverModuleProperty, this, [ = ](SolutionAnalysisModuleProperty sig, QVariant idx) { if (sig == SolutionAnalysisModuleProperty::UNKNOW) { return; } m_module = sig; GUI::MainWindow* mainWindow = dynamic_cast(FITKAPP->getGlobalData()->getMainWindow()); if (mainWindow == nullptr) { return; } GUI::PropertyWidget* propertyWidget = mainWindow->getPropertyWidget(); if (propertyWidget == nullptr) { return; } // QString name = ""; // if (sig == SolutionAnalysisModuleProperty::KVISL) // name = "actionViscosityModelEdit"; CUIConfig* uiConfig = CFDStructDataManager::getInstance()->getActionParamUIConfig(sig, idx); // uiConfig->printConfig(); QWidget* widget = new CUIPropertyWidget(nullptr, uiConfig); propertyWidget->setWidget(widget); return; }); } CFDStructOperatorsModelSolverProperty *CFDStructOperatorsModelSolverProperty::getInstance() { if (m_instance == nullptr) { m_instance = new CFDStructOperatorsModelSolverProperty; } return m_instance; }