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
|
// "ui_DialogImportModelDataset.h" resolved
|
||||||
|
|
||||||
#include "dialogimportmodeldataset.h"
|
#include "dialogimportmodeldataset.h"
|
||||||
#include "ui_dialogimportmodeldataset.h"
|
#include "ui_DialogImportModelDataset.h"
|
||||||
|
#include "MainWindow/MainWindow.h"
|
||||||
#include "Settings/BusAPI.h"
|
#include "Settings/BusAPI.h"
|
||||||
|
|
||||||
|
|
||||||
namespace WBFZ {
|
namespace WBFZ {
|
||||||
DialogImportModelDataset::DialogImportModelDataset(QWidget* parent)
|
DialogImportModelDataset::DialogImportModelDataset(GUI::MainWindow* _mainwindow,QWidget* parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
|
,_mainwindow(_mainwindow)
|
||||||
, ui(new Ui::DialogImportModelDataset)
|
, ui(new Ui::DialogImportModelDataset)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
this->initLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogImportModelDataset::~DialogImportModelDataset()
|
DialogImportModelDataset::~DialogImportModelDataset()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化模型库
|
// 初始化模型库
|
||||||
void DialogImportModelDataset::initLibrary() {
|
void DialogImportModelDataset::initLibrary() {
|
||||||
|
Setting::BusAPI* busapi=Setting::BusAPI::instance(); // 指针调用 -> ,类::静态方法
|
||||||
Setting::BusAPI* busapi=Setting::BusAPI::instance();
|
// QString executablePath = QApplication::applicationDirPath(); // exe 路径
|
||||||
QString executablePath = QApplication::applicationDirPath(); // exe 路径
|
}
|
||||||
|
// 模型筛选
|
||||||
|
void DialogImportModelDataset::filterModel(QString filterStr)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WBFZ
|
} // namespace WBFZ
|
||||||
|
|
|
@ -12,7 +12,13 @@
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "ModuleBase/graph3DWindow.h"
|
#include "ModuleBase/graph3DWindow.h"
|
||||||
#include
|
#include <QString>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace GUI {
|
||||||
|
class MainWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace WBFZ {
|
namespace WBFZ {
|
||||||
|
@ -20,20 +26,21 @@ namespace WBFZ {
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class DialogImportModelDataset;
|
class DialogImportModelDataset;
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
class DialogImportModelDataset : public QDialog {
|
class DialogImportModelDataset : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DialogImportModelDataset(QWidget* parent = nullptr);
|
explicit DialogImportModelDataset(GUI::MainWindow* _mainwindow,QWidget* parent = nullptr);
|
||||||
~DialogImportModelDataset() override;
|
~DialogImportModelDataset() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void initLibrary();
|
void initLibrary();
|
||||||
void filterModel();// 根据条件筛选
|
void filterModel(QString filterStr);// 根据条件筛选
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
GUI::MainWindow* _mainwindow;
|
||||||
Ui::DialogImportModelDataset* ui;
|
Ui::DialogImportModelDataset* ui;
|
||||||
QString _librarySettingPath; // ini 配置环境地址
|
QString _librarySettingPath; // ini 配置环境地址
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="comboBox">
|
<widget class="QComboBox" name="FiltercomboBox">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="listWidget">
|
<widget class="QListWidget" name="ModellistWidget">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
|
@ -105,6 +105,16 @@
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>模型1</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>模型2</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include "PointClouddataExchange.h"
|
#include "PointClouddataExchange.h"
|
||||||
#include "Dialogmeshsurfacesampling.h"
|
#include "Dialogmeshsurfacesampling.h"
|
||||||
#include "Common/DebugLogger.h"
|
#include "Common/DebugLogger.h"
|
||||||
#include "AsciiOpenDialog.h"
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
GUI::MainWindow* MeshData::MeshDataExchangePlugin::_mainwindow = nullptr;
|
GUI::MainWindow* MeshData::MeshDataExchangePlugin::_mainwindow = nullptr;
|
||||||
|
@ -29,7 +28,16 @@ namespace MeshData {
|
||||||
_mainwindow = m;
|
_mainwindow = m;
|
||||||
|
|
||||||
connect(_mainwindow, SIGNAL(on_actionvtkPointSamplorTriggleSIGNAL(GUI::MainWindow*)),this,SLOT(vtkPointSamplerDialog(GUI::MainWindow*)));
|
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);
|
MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling* w = new MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling(m);
|
||||||
w->show();
|
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)
|
bool MESHDATAEXCHANGEPLUGINAPI XYZimportPCL(QString AbFileName, int id)
|
||||||
{
|
{
|
||||||
|
auto xyzReader = new MeshData::PointClouddataExchange(
|
||||||
MeshData::loadXYZImportPCL(AbFileName, MeshData::MeshDataExchangePlugin::getMWpt());
|
AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||||
// auto xyzReader = new MeshData::PointClouddataExchange(
|
ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||||
// AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
emit tc->threadStart(); // emit MSHwriter->start();
|
||||||
// ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
|
||||||
// emit tc->threadStart(); // emit MSHwriter->start();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include "meshDataExchangePluginAPI.h"
|
#include "meshDataExchangePluginAPI.h"
|
||||||
#include "PluginManager/pluginBase.h"
|
#include "PluginManager/pluginBase.h"
|
||||||
|
#include <QMenuBar>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
namespace MeshData {
|
namespace MeshData {
|
||||||
enum MeshOperation { MESH_NONE, MESH_READ, MESH_WRITE };
|
enum MeshOperation { MESH_NONE, MESH_READ, MESH_WRITE };
|
||||||
|
@ -22,6 +24,10 @@ namespace MeshData {
|
||||||
// void on_actionLoadPointCloudText(GUI::MainWindow* m);
|
// void on_actionLoadPointCloudText(GUI::MainWindow* m);
|
||||||
private:
|
private:
|
||||||
static GUI::MainWindow* _mainwindow;
|
static GUI::MainWindow* _mainwindow;
|
||||||
|
QMenuBar* menuBar= nullptr;
|
||||||
|
QMenu* _toolboxMenu=nullptr;
|
||||||
|
public slots:
|
||||||
|
void on_TestLoadModelImport();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue