模型导入模块初始化
parent
d4123c36a8
commit
79e9634cae
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* @file dialogimportmodeldataset.cpp
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-6-25
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
// You may need to build the project (run Qt uic code generator) to get
|
||||
// "ui_DialogImportModelDataset.h" resolved
|
||||
|
||||
#include "dialogimportmodeldataset.h"
|
||||
#include "ui_DialogImportModelDataset.h"
|
||||
#include "MainWindow/MainWindow.h"
|
||||
#include "Settings/BusAPI.h"
|
||||
|
||||
namespace WBFZ {
|
||||
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 路径
|
||||
}
|
||||
// 模型筛选
|
||||
void DialogImportModelDataset::filterModel(QString filterStr)
|
||||
{
|
||||
}
|
||||
} // namespace WBFZ
|
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* @file dialogimportmodeldataset.h
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-6-25
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef LAMPCAE_DIALOGIMPORTMODELDATASET_H
|
||||
#define LAMPCAE_DIALOGIMPORTMODELDATASET_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ModuleBase/graph3DWindow.h"
|
||||
#include <QString>
|
||||
|
||||
|
||||
|
||||
namespace GUI {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
|
||||
namespace WBFZ {
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class DialogImportModelDataset;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class DialogImportModelDataset : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogImportModelDataset(GUI::MainWindow* _mainwindow,QWidget* parent = nullptr);
|
||||
~DialogImportModelDataset() override;
|
||||
|
||||
public:
|
||||
void initLibrary();
|
||||
void filterModel(QString filterStr);// 根据条件筛选
|
||||
private:
|
||||
GUI::MainWindow* _mainwindow;
|
||||
Ui::DialogImportModelDataset* ui;
|
||||
QString _librarySettingPath; // ini 配置环境地址
|
||||
};
|
||||
} // namespace WBFZ
|
||||
|
||||
#endif // LAMPCAE_DIALOGIMPORTMODELDATASET_H
|
|
@ -0,0 +1,165 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>WBFZ::DialogImportModelDataset</class>
|
||||
<widget class="QDialog" name="WBFZ::DialogImportModelDataset">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1003</width>
|
||||
<height>805</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>DialogImportModelDataset</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_3">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="FiltercomboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>预制模型类型</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QListWidget" name="ModellistWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="modelViewContent" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>600</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1000</width>
|
||||
<height>1000</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -8,6 +8,7 @@
|
|||
#include "KEYdataExchange.h"
|
||||
#include "ModelData/modelDataBase.h"
|
||||
#include "ModuleBase/ThreadControl.h"
|
||||
#include "dialogimportmodeldataset.h"
|
||||
#include "ModuleBase/ThreadTaskManager.h"
|
||||
#include "MSHdataExchange.h"
|
||||
#include "NEUdataExchange.h"
|
||||
|
@ -28,6 +29,17 @@ namespace MeshData {
|
|||
_mainwindow = m;
|
||||
|
||||
connect(_mainwindow, SIGNAL(on_actionvtkPointSamplorTriggleSIGNAL(GUI::MainWindow*)),this,SLOT(vtkPointSamplerDialog(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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool MeshDataExchangePlugin::install()
|
||||
|
@ -112,6 +124,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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,9 +143,6 @@ namespace MeshData {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* ps)
|
||||
{
|
||||
Plugins::PluginBase* p_meshdataExchangeplugin = new MeshData::MeshDataExchangePlugin(m);
|
||||
|
|
|
@ -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 };
|
||||
|
@ -21,6 +23,10 @@ namespace MeshData {
|
|||
void vtkPointSamplerDialog(GUI::MainWindow* m);
|
||||
private:
|
||||
static GUI::MainWindow* _mainwindow;
|
||||
QMenuBar* menuBar= nullptr;
|
||||
QMenu* _toolboxMenu=nullptr;
|
||||
public slots:
|
||||
void on_TestLoadModelImport();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue