#include "OperatorsMeshBaseManager.h" #include "GUIFrame/MainWindow.h" #include "GUIFrame/PropertyWidget.h" #include "OperatorsInterface/GraphEventOperator.h" #include "OperatorsInterface/TreeEventOperator.h" #include "GUIDialog/GUIMeshDialog/MeshBaseWidget.h" #include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h" #include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h" namespace ModelOper { OperatorsMeshBaseManager::OperatorsMeshBaseManager() { } OperatorsMeshBaseManager::~OperatorsMeshBaseManager() { } bool OperatorsMeshBaseManager::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::MeshBaseWidget(this); break; } } if (mainWindow->getPropertyWidget() && widget) { propertyWidget->setWidget(widget); } return false; } bool OperatorsMeshBaseManager::execProfession() { // 获取模型树控制器 auto treeOper = Core::FITKOperatorRepo::getInstance()->getOperatorT("ModelTreeEvent"); if (treeOper == nullptr) return false; EventOper::GraphEventOperator* graphOper = FITKOPERREPO->getOperatorT("GraphPreprocess"); if (graphOper == nullptr)return false; GUI::MainWindow* mainWindow = dynamic_cast(FITKAPP->getGlobalData()->getMainWindow()); if (mainWindow == nullptr)return false; GUI::PropertyWidget* propertyWidget = mainWindow->getPropertyWidget(); if (propertyWidget == nullptr)return false; return true; } }