#include "IO/IOConfig.h" #include "ModelData/modelDataBase.h" #include "ModuleBase/ThreadControl.h" #include "ModuleBase/ThreadTaskManager.h" #include "WBFZExchangePlugin.h" #include "DialogPCLStatisticalRemoveFilter.h" #include "DialogPCLRadiusOutlierRemoval.h" #include "DialogPCLGuassFilter.h" #include "DialogPCLBilateralFilter.h" #include "DialogPCLGPMesh.h" #include "DialogPCLPoissonMesh.h" #include #include "Common/DebugLogger.h" #include "AllHead.h" #include "TaskTreeClass.h" #include "TaskNodeList.h" #include "EchoTableEditWindow.h" #include "SqliteDBMainWindow.h" #include "LAMPImageCreateClass.h" //#include "dialogechodatashow.h" namespace WBFZ { GUI::MainWindow* WBFZ::WBFZExchangePlugin::_mainwindow = nullptr; WBFZExchangePlugin::WBFZExchangePlugin(GUI::MainWindow* m) { _describe = "WBFZExchangePlugin Installed Successfully"; _mainwindow = m; // 点云操作 connect(_mainwindow, SIGNAL(on_pclStatisticalRemoveFilter(GUI::MainWindow*)), this, SLOT(pclStatisticalRemoveFilter(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_pclRadiusOutlierRemoval(GUI::MainWindow*)), this, SLOT(pclRadiusOutlierRemoval(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_pclGuassFilter(GUI::MainWindow*)), this, SLOT(pclGuassFilter(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_pclBilateralFilter(GUI::MainWindow*)), this, SLOT(pclBilateralFilter(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_pclGPMesh(GUI::MainWindow*)), this, SLOT(pclGPMesh(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_pclPoissonMesh(GUI::MainWindow*)), this, SLOT(pclPoissonMesh(GUI::MainWindow*))); // FEKO connect(_mainwindow, SIGNAL(on_actionImageSetting(GUI::MainWindow*)), this, SLOT(actionImageSetting(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_actionFEKO2csv(GUI::MainWindow*)), this, SLOT(actionFEKO2csv(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_actionScatterExport(GUI::MainWindow*)), this, SLOT(actionScatterExport(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_actionFEKOImage(GUI::MainWindow*)), this, SLOT(actionFEKOImage(GUI::MainWindow*))); connect(_mainwindow, SIGNAL(on_actionantScatteringFEKOSetting(GUI::MainWindow*)), this, SLOT(actionantScatteringFEKOSetting(GUI::MainWindow*))); // 属性表 connect(_mainwindow, SIGNAL(on_actionAttriutionDBShow(GUI::MainWindow*)), this, SLOT(actionAttriutionDBShow(GUI::MainWindow*))); connect(_mainwindow,SIGNAL(on_actionImageShowToolTriggleSIGNAL(GUI::MainWindow* )),this,SLOT(actionImageShowToolShow(GUI::MainWindow*))); connect(_mainwindow,SIGNAL(on_actionRCShowToolSIGNAL(GUI::MainWindow* )),this,SLOT(actionactionRCShowTool(GUI::MainWindow*))); DebugInfo("WBFZExchangePlugin::WBFZExchangePlugin has init \n"); } bool WBFZExchangePlugin::install() { if(_mainwindow == nullptr) return false; PluginBase::install(); DebugInfo("WBFZExchangePlugin::WBFZExchangePlugin has install PluginBase::install\n "); return true; } bool WBFZExchangePlugin::uninstall() { PluginBase::uninstall(); return true; } void WBFZExchangePlugin::reTranslate(QString) {} GUI::MainWindow* WBFZExchangePlugin::getMWpt() { return _mainwindow; } // 事件绑定 void WBFZExchangePlugin::pclStatisticalRemoveFilter(GUI::MainWindow* m) { DebugInfo("WBFZExchangePlugin::pclStatisticalRemoveFilter has init\n"); MainWidget::DialogPCLStatisticalRemoveFilter dlg(m); dlg.exec(); } void WBFZExchangePlugin::pclRadiusOutlierRemoval(GUI::MainWindow* m) { DebugInfo("WBFZExchangePlugin::pclRadiusOutlierRemoval has init\n"); MainWidget::DialogPCLRadiusOutlierRemoval dlg(m); dlg.exec(); } void WBFZExchangePlugin::pclGuassFilter(GUI::MainWindow* m) { DebugInfo("WBFZExchangePlugin::pclGuassFilter has init\n"); MainWidget::DialogPCLGuassFilter dlg(m); dlg.exec(); } void WBFZExchangePlugin::pclBilateralFilter(GUI::MainWindow* m) { DebugInfo("WBFZExchangePlugin::pclBilateralFilter has init\n"); MainWidget::DialogPCLBilateralFilter dlg(m); dlg.exec(); } void WBFZExchangePlugin::pclGPMesh(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::pclGPMesh has init\n"); MainWidget::DialogPCLGPMesh dlg(m); dlg.exec(); } // FEKO 设置 void WBFZExchangePlugin::actionImageSetting(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionImageSetting has init\n"); FEKOImageSettingFun(m); } void WBFZExchangePlugin::actionFEKO2csv(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionFEKO2csv has init\n"); FEKO2csvFun(m); } void WBFZExchangePlugin::actionScatterExport(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionScatterExport has init\n"); ScatterExportFun(m); } void WBFZExchangePlugin::actionFEKOImage(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionFEKOImage has init\n"); FEKOImageFun(m); } void WBFZExchangePlugin::actionantScatteringFEKOSetting(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionantScatteringFEKOSetting has init\n"); antScatteringFEKOSettingFun(m); } void WBFZExchangePlugin::actionAttriutionDBShow(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionAttriutionDBShow has init\n"); SqliteDBMainWindow* w = new SqliteDBMainWindow(m); w->show(); } void WBFZExchangePlugin::actionImageShowToolShow(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::actionImageShowToolShow has init\n"); LAMPDataShowClass* w = new LAMPDataShowClass(m); w->show(); } void WBFZExchangePlugin::actionactionRCShowTool(GUI::MainWindow* m) { // DebugInfo(" WBFZExchangePlugin::actionactionRCShowTool has init\n"); // WBCLFZ::DialogEchoDataShow* w = new WBCLFZ::DialogEchoDataShow(m); // w->show(); } void WBFZExchangePlugin::pclPoissonMesh(GUI::MainWindow* m) { DebugInfo(" WBFZExchangePlugin::pclPoissonMesh has init\n"); MainWidget::DialogPCLPoissonMesh dlg(m); dlg.exec(); } } // namespace WBFZ void Register(GUI::MainWindow* m, QList* ps) { Plugins::PluginBase* p = new WBFZ::WBFZExchangePlugin(m); ps->append(p); } void FEKOImageSettingFun(GUI::MainWindow* m) { DebugInfo(" FEKOImageSettingFun has init\n"); // 参数界面设置 FEKOImageSettingTaskNodeClass* imageNode = new FEKOImageSettingTaskNodeClass(); imageNode->TaskWindows->setOCCTDocument(m); DebugInfo(" FEKOImageSettingFun has init imageNode\n"); QString xmlfilepath = getSaveFilePath(m, QString::fromUtf8(u8"任务xml"), QString::fromUtf8(u8"xml文件 (*.xml)")); imageNode->loadXmlFile(xmlfilepath); DebugInfo(" FEKOImageSettingFun has init loadXmlFile\n"); imageNode->TaskWindows->setOCCTDocument(m); //this->addTaskNode(imageNode); DebugInfo(" FEKOImageSettingFun has init ExcuteTask\n"); imageNode->ExcuteTask(); } void FEKO2csvFun(GUI::MainWindow* m) { DebugInfo(" FEKO2csvFun has init\n"); QString xmlfilepath = getSaveFilePath(m, QString::fromUtf8(u8"设置FEKO结果导入任务xml"), QString::fromUtf8(u8"xml文件 (*.xml)")); DebugInfo(" xml file path %s \n",xmlfilepath.toStdString().c_str()); FEKOResultImportTaskNode* fekoresulttask = new FEKOResultImportTaskNode(); fekoresulttask->loadXmlFile(xmlfilepath); fekoresulttask->ExcuteTask(); } void ScatterExportFun(GUI::MainWindow* m) { DebugInfo(" ScatterExportFun has init\n"); EchoTableEditWindow* echoEditwindow = new EchoTableEditWindow(m); echoEditwindow->show(); } void FEKOImageFun(GUI::MainWindow* m) { DebugInfo(" FEKOImageFun has init\n"); LAMPImageCreateClass* imagewindows = new LAMPImageCreateClass; imagewindows->on_pushButton_loadfekosimulationxml_clicked(); imagewindows->show(); } void antScatteringFEKOSettingFun(GUI::MainWindow* m) { DebugInfo(" antScatteringFEKOSettingFun has init\n"); FEKOScatterSettingTaskNodeClass* scattertasknode=new FEKOScatterSettingTaskNodeClass(); scattertasknode->TaskWindows->setDocument3d(m); QString xmlfilepath = getSaveFilePath(m, QString::fromUtf8(u8"任务xml"), QString::fromUtf8(u8"xml文件 (*.xml)")); scattertasknode->loadXmlFile(xmlfilepath); scattertasknode->TaskWindows->setDocument3d(m); //this->addTaskNode(scattertasknode); DebugInfo(" antScatteringFEKOSettingFun ExcuteTask t\n"); scattertasknode->ExcuteTask(); } // FEKO 参数调用