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.
61 lines
2.0 KiB
C++
61 lines
2.0 KiB
C++
#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<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::MeshBaseWidget(this);
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (mainWindow->getPropertyWidget() && widget) {
|
|
propertyWidget->setWidget(widget);
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool OperatorsMeshBaseManager::execProfession()
|
|
{
|
|
// 获取模型树控制器
|
|
auto treeOper = Core::FITKOperatorRepo::getInstance()->getOperatorT<EventOper::TreeEventOperator>("ModelTreeEvent");
|
|
if (treeOper == nullptr) return false;
|
|
EventOper::GraphEventOperator* graphOper = FITKOPERREPO->getOperatorT<EventOper::GraphEventOperator>("GraphPreprocess");
|
|
if (graphOper == nullptr)return false;
|
|
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;
|
|
return true;
|
|
}
|
|
}
|