Merge remote-tracking branch 'lamp/LAMP-dev-wuxiaxin' into LAMPCAE-dev
# Conflicts: # src/PluginMeshDataExchange/dialogimportmodeldataset.cpp # src/PluginMeshDataExchange/dialogimportmodeldataset.h # src/PluginMeshDataExchange/dialogimportmodeldataset.ui # src/PluginMeshDataExchange/meshDataExchangePlugin.cpppull/1/head
commit
5ac3f9aa67
|
@ -11,31 +11,30 @@
|
|||
// "ui_DialogImportModelDataset.h" resolved
|
||||
|
||||
#include "dialogimportmodeldataset.h"
|
||||
#include "ui_dialogimportmodeldataset.h"
|
||||
#include "ui_DialogImportModelDataset.h"
|
||||
#include "MainWindow/MainWindow.h"
|
||||
#include "Settings/BusAPI.h"
|
||||
|
||||
|
||||
namespace WBFZ {
|
||||
DialogImportModelDataset::DialogImportModelDataset(QWidget* parent)
|
||||
DialogImportModelDataset::DialogImportModelDataset(GUI::MainWindow* _mainwindow,QWidget* parent)
|
||||
: QDialog(parent)
|
||||
,_mainwindow(_mainwindow)
|
||||
, ui(new Ui::DialogImportModelDataset)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->initLibrary();
|
||||
}
|
||||
|
||||
DialogImportModelDataset::~DialogImportModelDataset()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
// 初始化模型库
|
||||
void DialogImportModelDataset::initLibrary() {
|
||||
|
||||
Setting::BusAPI* busapi=Setting::BusAPI::instance();
|
||||
QString executablePath = QApplication::applicationDirPath(); // exe 路径
|
||||
|
||||
|
||||
|
||||
Setting::BusAPI* busapi=Setting::BusAPI::instance(); // 指针调用 -> ,类::静态方法
|
||||
// QString executablePath = QApplication::applicationDirPath(); // exe 路径
|
||||
}
|
||||
// 模型筛选
|
||||
void DialogImportModelDataset::filterModel(QString filterStr)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace WBFZ
|
||||
|
|
|
@ -12,7 +12,13 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include "ModuleBase/graph3DWindow.h"
|
||||
#include
|
||||
#include <QString>
|
||||
|
||||
|
||||
|
||||
namespace GUI {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
|
||||
namespace WBFZ {
|
||||
|
@ -20,20 +26,21 @@ namespace WBFZ {
|
|||
namespace Ui {
|
||||
class DialogImportModelDataset;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class DialogImportModelDataset : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogImportModelDataset(QWidget* parent = nullptr);
|
||||
explicit DialogImportModelDataset(GUI::MainWindow* _mainwindow,QWidget* parent = nullptr);
|
||||
~DialogImportModelDataset() override;
|
||||
|
||||
public:
|
||||
void initLibrary();
|
||||
void filterModel();// 根据条件筛选
|
||||
|
||||
void filterModel(QString filterStr);// 根据条件筛选
|
||||
private:
|
||||
GUI::MainWindow* _mainwindow;
|
||||
Ui::DialogImportModelDataset* ui;
|
||||
QString _librarySettingPath; // ini 配置环境地址
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<widget class="QComboBox" name="FiltercomboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -92,7 +92,7 @@
|
|||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<widget class="QListWidget" name="ModellistWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
|
@ -105,6 +105,16 @@
|
|||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>模型1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>模型2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "PointClouddataExchange.h"
|
||||
#include "Dialogmeshsurfacesampling.h"
|
||||
#include "Common/DebugLogger.h"
|
||||
#include "AsciiOpenDialog.h"
|
||||
#include <QFileInfo>
|
||||
|
||||
GUI::MainWindow* MeshData::MeshDataExchangePlugin::_mainwindow = nullptr;
|
||||
|
@ -29,7 +28,16 @@ namespace MeshData {
|
|||
_mainwindow = m;
|
||||
|
||||
connect(_mainwindow, SIGNAL(on_actionvtkPointSamplorTriggleSIGNAL(GUI::MainWindow*)),this,SLOT(vtkPointSamplerDialog(GUI::MainWindow*)));
|
||||
// connect(_mainwindow, SIGNAL(on_actionLoadPointCloudText(GUI::MainWindow*)),this,SLOT(on_actionLoadPointCloudText(GUI::MainWindow*)));
|
||||
|
||||
// 添加 命令
|
||||
_toolboxMenu=new QMenu("ImportTestBar");
|
||||
// 增加菜单
|
||||
QAction* action_ModelFilterImport=_toolboxMenu->addAction("ModelFilterImport");
|
||||
|
||||
connect(action_ModelFilterImport, SIGNAL(triggered()),this, SLOT(on_TestLoadModelImport()));
|
||||
|
||||
m->menuBar()->addMenu(_toolboxMenu);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -115,6 +123,15 @@ namespace MeshData {
|
|||
MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling* w = new MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling(m);
|
||||
w->show();
|
||||
}
|
||||
|
||||
|
||||
// 用户点击按钮,触达这个函数执行
|
||||
void MeshDataExchangePlugin::on_TestLoadModelImport()
|
||||
{
|
||||
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -362,12 +379,10 @@ bool MESHDATAEXCHANGEPLUGINAPI FOAMexportMesh(QString AbFileName, int id)
|
|||
|
||||
bool MESHDATAEXCHANGEPLUGINAPI XYZimportPCL(QString AbFileName, int id)
|
||||
{
|
||||
|
||||
MeshData::loadXYZImportPCL(AbFileName, MeshData::MeshDataExchangePlugin::getMWpt());
|
||||
// auto xyzReader = new MeshData::PointClouddataExchange(
|
||||
// AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||
// ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||
// emit tc->threadStart(); // emit MSHwriter->start();
|
||||
auto xyzReader = new MeshData::PointClouddataExchange(
|
||||
AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||
ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||
emit tc->threadStart(); // emit MSHwriter->start();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "meshDataExchangePluginAPI.h"
|
||||
#include "PluginManager/pluginBase.h"
|
||||
#include <QMenuBar>
|
||||
#include <QMenu>
|
||||
|
||||
namespace MeshData {
|
||||
enum MeshOperation { MESH_NONE, MESH_READ, MESH_WRITE };
|
||||
|
@ -22,6 +24,10 @@ namespace MeshData {
|
|||
// void on_actionLoadPointCloudText(GUI::MainWindow* m);
|
||||
private:
|
||||
static GUI::MainWindow* _mainwindow;
|
||||
QMenuBar* menuBar= nullptr;
|
||||
QMenu* _toolboxMenu=nullptr;
|
||||
public slots:
|
||||
void on_TestLoadModelImport();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue