|
|
|
|
#include "OperatorsIsosurf.h"
|
|
|
|
|
|
|
|
|
|
#include "GUIFrame/MainWindow.h"
|
|
|
|
|
#include "GUIFrame/MainTreeWidget.h"
|
|
|
|
|
#include "GUIWidget/TreeWidget.h"
|
|
|
|
|
#include "GUIDialog/IsosurfDialog.h"
|
|
|
|
|
#include "OperatorsInterface/GraphEventOperator.h"
|
|
|
|
|
#include "OperatorsInterface/ParaWidgetInterfaceOperator.h"
|
|
|
|
|
|
|
|
|
|
#include "FITK_Kernel/FITKAppFramework/FITKAppFramework.h"
|
|
|
|
|
#include "FITK_Kernel/FITKAppFramework/FITKGlobalData.h"
|
|
|
|
|
#include "FITK_Interface/FITKInterfaceCFDPost/FITKCFDPost3DManager.h"
|
|
|
|
|
#include "FITK_Interface/FITKInterfaceCFDPost/FITKCFDPostData.h"
|
|
|
|
|
#include "FITK_Interface/FITKInterfaceCFDPost/FITKCFDPostIsosurface.h"
|
|
|
|
|
|
|
|
|
|
namespace OperModel
|
|
|
|
|
{
|
|
|
|
|
OperatorsIsosurf::OperatorsIsosurf()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool OperatorsIsosurf::execGUI()
|
|
|
|
|
{
|
|
|
|
|
Interface::FITKCFDPost3DManager* manager = FITKAPP->getGlobalData()->getPostData<Interface::FITKCFDPostData>()->getPostDataManager();
|
|
|
|
|
if (manager == nullptr)return false;
|
|
|
|
|
GUI::MainWindow* mainWin = dynamic_cast<GUI::MainWindow*>(FITKAPP->getGlobalData()->getMainWindow());
|
|
|
|
|
if (mainWin == nullptr)return false;
|
|
|
|
|
GUI::TreeWidget* treeWidget = mainWin->getTreeWidget()->getTreeWidget();
|
|
|
|
|
if (treeWidget == nullptr)return false;
|
|
|
|
|
|
|
|
|
|
//获取树节点当前数据对象id
|
|
|
|
|
if (_senderName == "actionIsosurfCreate") {
|
|
|
|
|
GUI::IsosurfDialog* dialog = new GUI::IsosurfDialog(treeWidget->getCurrentDataID(), this, true);
|
|
|
|
|
dialog->show();
|
|
|
|
|
}
|
|
|
|
|
else if (_senderName == "actionIsosurfEdit") {
|
|
|
|
|
int objID = -1;
|
|
|
|
|
argValue(objID_String, objID);
|
|
|
|
|
if (objID <= 0)return false;
|
|
|
|
|
|
|
|
|
|
GUI::IsosurfDialog* dialog = new GUI::IsosurfDialog(objID, this, false);
|
|
|
|
|
dialog->show();
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool OperatorsIsosurf::execProfession()
|
|
|
|
|
{
|
|
|
|
|
Interface::FITKCFDPost3DManager* manager = FITKAPP->getGlobalData()->getPostData<Interface::FITKCFDPostData>()->getPostDataManager();
|
|
|
|
|
if (manager == nullptr)return false;
|
|
|
|
|
EventOper::GraphEventOperator* graphOper = FITKOPERREPO->getOperatorT<EventOper::GraphEventOperator>("OperGraphPreprocess");
|
|
|
|
|
if (graphOper == nullptr)return false;
|
|
|
|
|
EventOper::ParaWidgetInterfaceOperator* treeOper = FITKOPERREPO->getOperatorT<EventOper::ParaWidgetInterfaceOperator>("ModelTreeEvent");
|
|
|
|
|
if (treeOper == nullptr)return false;
|
|
|
|
|
|
|
|
|
|
int objID = -1;
|
|
|
|
|
argValue(objID_String, objID);
|
|
|
|
|
Interface::FITKAbstractCFDPostData* data = manager->getDataByID(objID);
|
|
|
|
|
if (data) {
|
|
|
|
|
graphOper->updateSingle(objID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
treeOper->updateTree();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|