增加了不同模型预加载窗口
parent
972deee3ad
commit
cc69919cff
|
@ -427,98 +427,8 @@ namespace MainWidget {
|
|||
threshold->SetUpperThreshold(1.5);
|
||||
threshold->Update();
|
||||
_displayData->DeepCopy(threshold->GetOutput());
|
||||
// vtkSmartPointer<vtkGeometryFilter> geofilter = vtkSmartPointer<vtkGeometryFilter>::New();
|
||||
// geofilter->SetInputData(threshold->GetOutput());
|
||||
// geofilter->Update();
|
||||
// datanew = vtkPolyData::SafeDownCast(geofilter->GetOutput());
|
||||
// qDebug() << (QString("void MeshKernalViewObj::updateDisplayMember() %1\n")
|
||||
// .arg(datanew == nullptr));
|
||||
//
|
||||
// QString("cell number %1").arg(nullptr == datanew);
|
||||
// vtkDataArray* cellNewIDS = datanew->GetPointData()->GetArray("IDS");
|
||||
// std::set<int> pointSet;
|
||||
// for(int i = 0; i < cellNewIDS->GetNumberOfTuples(); i++) {
|
||||
// pointSet.insert(cellNewIDS->GetComponent(i, 1));
|
||||
// }
|
||||
//
|
||||
// // Points
|
||||
// vtkDataArray* PointShowArray = dataold->GetPointData()->GetArray("SHOW");
|
||||
// vtkDataArray* PointIDSArray = dataold->GetPointData()->GetArray("IDS");
|
||||
// int numArrays = dataold->GetNumberOfPoints();
|
||||
// vtkPointData* pointDataold = dataold->GetPointData();
|
||||
//
|
||||
// // 复制与粘贴
|
||||
// vtkDataArray* cellIDSArray = dataold->GetCellData()->GetArray("IDS");
|
||||
// int maxIds=0;
|
||||
// for(int i=0;i<cellIDSArray->GetNumberOfTuples();i++){
|
||||
// maxIds=std::max(maxIds,int(cellIDSArray->GetComponent(i,1)));
|
||||
// }
|
||||
//
|
||||
// int kid=_kernal->getID();
|
||||
//
|
||||
// DebugInfo("void MeshKernalViewObj::updateDisplayMember()\n");
|
||||
// for(int i = 0; i < numArrays; ++i) {
|
||||
// if(fabs(PointShowArray->GetComponent(i, 0)) > 0.5
|
||||
// && pointSet.find(int(PointIDSArray->GetComponent(i, 1))) == pointSet.end()) { // 显示同时又不在显示的点
|
||||
// // 处理几何
|
||||
// vtkIdType pid=datanew->GetPoints()->InsertNextPoint(dataold->GetPoint(i));
|
||||
// vtkVertex* newVertex = vtkVertex::New();
|
||||
// newVertex->GetPointIds()->SetId(pid, pid);
|
||||
// datanew->GetPolys()->InsertNextCell(newVertex);
|
||||
//
|
||||
// int numArrays = pointDataold->GetNumberOfArrays();
|
||||
// for(int i = 0; i < numArrays; ++i) {
|
||||
// vtkDataArray* dataArray = pointDataold->GetArray(i);
|
||||
// if(nullptr==dataArray){continue;}
|
||||
// const char* arrayName = dataArray->GetName();
|
||||
// vtkDataArray* dataArraynew=datanew->GetPointData()->GetArray(arrayName);
|
||||
// if(nullptr==dataArraynew){continue;}
|
||||
// datanew->GetPointData()->GetArray(arrayName)->InsertNextTuple(dataArray->GetTuple(i));
|
||||
// }
|
||||
//
|
||||
// // 处理显示
|
||||
// datanew->GetCellData()->GetArray("IDS")->InsertNextTuple2(kid , maxIds++);
|
||||
// datanew->GetCellData()->GetArray("SHOW")->InsertNextTuple1(1);
|
||||
// datanew->GetCellData()->GetArray("MATERIAL")->InsertNextTuple1(-1);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// DebugInfo("void MeshKernalViewObj::updateDisplayMember()\n");
|
||||
// vtkSmartPointer<vtkGeometryFilter> geofilters =vtkSmartPointer<vtkGeometryFilter>::New();
|
||||
// geofilters->AddInputData(datanew);
|
||||
//// geofilters->AddInputData(polygon);
|
||||
// geofilters->Update();
|
||||
//// DebugInfo("void MeshKernalViewObj::updateDisplayMember()\n");
|
||||
// DebugInfo("void MeshKernalViewObj::updateDisplayMember()\n");
|
||||
// datanew=geofilters->GetOutput();
|
||||
_displayData->DeepCopy(datanew);
|
||||
// // 分析平衡性
|
||||
// qDebug()<<QString("Point nummber %1\n").arg(_displayData->GetNumberOfPoints());
|
||||
// qDebug()<<QString("Point nummber IDS %1\n").arg(_displayData->GetPointData()->GetArray("IDS")->GetNumberOfTuples());
|
||||
// qDebug()<<QString("Point nummber SHOW %1\n").arg(_displayData->GetPointData()->GetArray("SHOW")->GetNumberOfTuples());
|
||||
// qDebug()<<QString("Point nummber MATERIAL %1\n").arg(_displayData->GetPointData()->GetArray("MATERIAL")->GetNumberOfTuples());
|
||||
// qDebug()<<QString("cell nummber %1\n").arg(_displayData->GetNumberOfCells());
|
||||
// qDebug()<<QString("cell nummber IDS %1\n").arg(_displayData->GetCellData()->GetArray("IDS")->GetNumberOfTuples());
|
||||
// qDebug()<<QString("cell nummber SHOW %1\n").arg(_displayData->GetCellData()->GetArray("SHOW")->GetNumberOfTuples());
|
||||
// qDebug()<<QString("cell nummber MATERIAL %1\n").arg(_displayData->GetCellData()->GetArray("MATERIAL")->GetNumberOfTuples());
|
||||
//
|
||||
// vtkSmartPointer<vtkPolyDataWriter> writer = vtkSmartPointer<vtkPolyDataWriter>::New();
|
||||
// writer->SetInputData(_displayData);
|
||||
// writer->SetFileTypeToBinary();
|
||||
// writer->SetFileName("testOut.vtk");
|
||||
// writer->Write();
|
||||
//
|
||||
// vtkSmartPointer<vtkSTLWriter> stlwriter = vtkSmartPointer<vtkSTLWriter>::New();
|
||||
// stlwriter->SetInputData(_displayData);
|
||||
// // writer->SetInputData(ungird);
|
||||
// stlwriter->SetFileTypeToBinary();
|
||||
// stlwriter->SetFileName("testOut.stl");
|
||||
// stlwriter->Write();
|
||||
//
|
||||
//
|
||||
// DebugInfo("void MeshKernalViewObj::updateDisplayMember()\n");
|
||||
_displayData->Modified();
|
||||
|
||||
}
|
||||
void MeshKernalViewObj::modifyPointDisplay()
|
||||
{
|
||||
|
|
|
@ -308,8 +308,7 @@ namespace GUI {
|
|||
_viewSignalMapper->setMapping(_ui->actionViewYMinus, QString("YMinus"));
|
||||
_viewSignalMapper->setMapping(_ui->actionViewZPlus, QString("ZPlus"));
|
||||
_viewSignalMapper->setMapping(_ui->actionViewZMinus, QString("ZMinus"));
|
||||
connect(_viewSignalMapper, SIGNAL(mapped(QString)), _subWindowManager,
|
||||
SLOT(setView(QString)));
|
||||
connect(_viewSignalMapper, SIGNAL(mapped(QString)), _subWindowManager,SLOT(setView(QString)));
|
||||
// 设置mesh选择模式
|
||||
_selectSignalMapper = new QSignalMapper(this);
|
||||
connect(_ui->actionSelectOff, SIGNAL(triggered()), _selectSignalMapper, SLOT(map()));
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/**
|
||||
* @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.
|
||||
*/
|
||||
* @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
|
||||
|
@ -20,315 +20,391 @@
|
|||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
#include <QTextCodec>
|
||||
#include <vtkAxesActor.h>
|
||||
#include <QFileDialog>
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
namespace WBFZ {
|
||||
DialogImportModelDataset::DialogImportModelDataset(GUI::MainWindow* _mainwindow, QWidget* parent)
|
||||
: QDialog(_mainwindow),
|
||||
_mainwindow(_mainwindow),
|
||||
ui(new Ui::DialogImportModelDataset)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->initLibrary();
|
||||
this->initVTKView();// 初始化VTK视图
|
||||
DialogImportModelDataset::DialogImportModelDataset(GUI::MainWindow* _mainwindow, QWidget* parent)
|
||||
: QDialog(_mainwindow),
|
||||
_mainwindow(_mainwindow),
|
||||
ui(new Ui::DialogImportModelDataset)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
// 初始化 comboBox 的选项
|
||||
QMap<QString, QString> categories = {
|
||||
{"forest", "森林"},
|
||||
{"crop", "农作物"},
|
||||
{"grass", "草地"},
|
||||
{"uav", "人工"},
|
||||
{"water", "水体"},
|
||||
{"dwater", "动态水体"},
|
||||
{"road", "道路"},
|
||||
{"geo", "几何"},
|
||||
{"radi", "辐射"},
|
||||
{"soil", "土壤"},
|
||||
{"land", "陆表"},
|
||||
{"vegetation", "植被"},
|
||||
{"water_scene", "水体场景"}
|
||||
};
|
||||
for (auto category : categories.values()) {
|
||||
ui->FiltercomboBox->addItem(category);
|
||||
}
|
||||
this->initLibrary(); //初始化comboBox和listMidget内容
|
||||
|
||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::setCurrentText),
|
||||
this, &DialogImportModelDataset::updateModellistWidget);
|
||||
this->initVTKView(); // 初始化VTK视图
|
||||
|
||||
ui->FiltercomboBox->setCurrentText("crop");
|
||||
this->ui->progressBar->setValue(0);
|
||||
// 连接 comboBox 的 setCurrentText 信号与更新 listWidget 的槽函数
|
||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::setCurrentText), this, &DialogImportModelDataset::updateModellistWidget);
|
||||
|
||||
// 初始显示第一个选项对应的 listWidget 内容
|
||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||
// 连接 comboBox 的 currentIndexChanged 信号与更新 listWidget 的槽函数
|
||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged), this, &DialogImportModelDataset::updateModellistWidget);
|
||||
|
||||
// 连接 comboBox 的 currentIndexChanged 信号与更新 listWidget 的槽函数
|
||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||
this, &DialogImportModelDataset::updateModellistWidget);
|
||||
// 连接 listWidget 的 currentItemChanged 信号与更新 VTK 的槽函数
|
||||
connect(ui->ModellistWidget, QOverload<QListWidgetItem *, QListWidgetItem *>::of(&QListWidget::currentItemChanged),
|
||||
this, &DialogImportModelDataset::handleItemClicked);
|
||||
|
||||
// 初始显示第一个选项对应的 listWidget 内容
|
||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||
// 连接 pushButton 的 clicked 信号与更新 listWidget 的槽函数
|
||||
connect(ui->Addmodel_pushButton, SIGNAL(clicked()), this, SLOT(on_push_add_models_slot()));
|
||||
|
||||
// 初始化其它设置
|
||||
_librarySettingPath = QString("%1\\model\\library.ini").arg(Setting::BusAPI::instance()->getApplicationExePath()); // 替换为实际的配置文件路径
|
||||
initLibrary(); // 初始化库
|
||||
connect(ui->ModellistWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(modelItem_doubleClicked(QListWidgetItem *)));
|
||||
|
||||
connect(ui->ModellistWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
|
||||
this,SLOT(handleItemClicked(QListWidgetItem*, QListWidgetItem*)));
|
||||
}
|
||||
connect(this, SIGNAL(updateFilterModel(const QString )), this, SLOT(filterModel(const QString)));
|
||||
|
||||
DialogImportModelDataset::~DialogImportModelDataset()
|
||||
{
|
||||
delete ui;
|
||||
delete _qvtkWidget; // 释放内存
|
||||
}
|
||||
// connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(on_TestLoadModelImport()));
|
||||
}
|
||||
|
||||
// 初始化模型库
|
||||
void DialogImportModelDataset::initLibrary() {
|
||||
DialogImportModelDataset::~DialogImportModelDataset()
|
||||
{
|
||||
delete ui;
|
||||
delete _qvtkWidget; // 释放内存
|
||||
}
|
||||
|
||||
if(QFileInfo(_librarySettingPath).exists()){
|
||||
qDebug()<<"_librarySettingPath exists";
|
||||
// 判断所有模型类型是否存在
|
||||
// 初始化模型库
|
||||
void DialogImportModelDataset::initLibrary() {
|
||||
|
||||
//清除FiltercomboBox内容
|
||||
ui->FiltercomboBox->clear();
|
||||
|
||||
// 初始化其它设置
|
||||
_librarySettingPath = QString("%1\\model\\library.ini").arg(Setting::BusAPI::instance()->getApplicationExePath()); // 替换为实际的配置文件路径
|
||||
|
||||
// 读取INI文件中的Names分组
|
||||
QSettings settings(_librarySettingPath, QSettings::IniFormat);
|
||||
settings.setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
|
||||
}else{}
|
||||
settings.beginGroup("Names");
|
||||
QStringList keys = settings.childKeys();
|
||||
for (const QString &key : keys) {
|
||||
_categories[settings.value(key).toString()] = key; // 将中文名称作为键,英文名称作为值存储
|
||||
}
|
||||
settings.endGroup();
|
||||
|
||||
QSettings settings(_librarySettingPath, QSettings::IniFormat);
|
||||
for (auto category : _categories.keys()) {
|
||||
ui->FiltercomboBox->addItem(category);
|
||||
}
|
||||
|
||||
QStringList categories = {"forest", "crop", "grass", "uav", "water", "dwater", "road", "geo", "radi", "soil", "land", "vegetation", "water_scene"};
|
||||
QMap<QString, QStringList> models = {
|
||||
{"forest", {"forest.stl"}},
|
||||
{"crop", {"crop.stl"}},
|
||||
{"grass", {"grass.stl"}},
|
||||
{"uav", {"uav.stl"}},
|
||||
{"water", {"water.stl"}},
|
||||
{"dwater", {"dwater.stl"}},
|
||||
{"road", {"road.stl"}},
|
||||
{"geo", {"geo.stl"}},
|
||||
{"radi", {"radi.stl"}},
|
||||
{"soil", {"soil.stl"}},
|
||||
{"land", {"land.stl"}},
|
||||
{"vegetation", {"vegetation.stl"}},
|
||||
{"water_scene", {"water_scene.stl"}}
|
||||
};
|
||||
QString exepath= Setting::BusAPI::instance()->getApplicationExePath(); // 指针调用 -> ,类::静态方法
|
||||
qDebug()<<exepath;
|
||||
settings.beginGroup("Models");
|
||||
for (const QString &category : categories) {
|
||||
settings.setValue(category, models[category]);
|
||||
}
|
||||
settings.endGroup();
|
||||
// 设置comboBox默认选项为"森林"
|
||||
ui->FiltercomboBox->setCurrentText("森林"); // 使用中文名称
|
||||
|
||||
settings.beginGroup("Detail");
|
||||
for (const QString &category : categories) {
|
||||
for (const QString &model : models[category]) {
|
||||
QString path = QString("%1/model/%2").arg(exepath).arg(model);
|
||||
settings.setValue(model, path);
|
||||
}
|
||||
}
|
||||
settings.endGroup();
|
||||
// 初始显示默认选项对应的 listWidget 内容
|
||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||
|
||||
// Here you can add more initialization code if needed
|
||||
// 初始显示选项对应的 listWidget 内容
|
||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||
|
||||
}
|
||||
Setting::BusAPI* busapi = Setting::BusAPI::instance(); // 指针调用 -> ,类::静态方法
|
||||
}
|
||||
|
||||
// 模型筛选
|
||||
void DialogImportModelDataset::filterModelChinese(QString filterStr) {
|
||||
QSettings settings(_librarySettingPath, QSettings::IniFormat);
|
||||
// 模型筛选
|
||||
void DialogImportModelDataset::filterModel(QString filterStr) {
|
||||
QSettings settings(_librarySettingPath, QSettings::IniFormat);
|
||||
|
||||
settings.beginGroup("Models");
|
||||
QString key = getEnglishCategory(filterStr);
|
||||
QStringList models = settings.value(key).toStringList();
|
||||
settings.endGroup();
|
||||
settings.beginGroup("Models");
|
||||
QString key = getEnglishCategory(filterStr);
|
||||
QStringList models = settings.value(key).toStringList();
|
||||
settings.endGroup();
|
||||
|
||||
ui->ModellistWidget->clear();
|
||||
if (!models.isEmpty()) {
|
||||
ui->ModellistWidget->addItems(models);
|
||||
}
|
||||
}
|
||||
ui->ModellistWidget->clear();
|
||||
if (!models.isEmpty()) {
|
||||
ui->ModellistWidget->addItems(models);
|
||||
qDebug()<<"ui->ModellistWidget->addItems(models);";
|
||||
}
|
||||
// 重新加载模型库
|
||||
|
||||
// 模型筛选
|
||||
void DialogImportModelDataset::filterModelEnglish(QString filterStr) {
|
||||
QSettings settings(_librarySettingPath, QSettings::IniFormat);
|
||||
}
|
||||
|
||||
settings.beginGroup("Models");
|
||||
QString key = getEnglishCategory(filterStr);
|
||||
QStringList models = settings.value(key).toStringList();
|
||||
settings.endGroup();
|
||||
// 更新 listWidget 的槽函数
|
||||
void DialogImportModelDataset::updateModellistWidget(const QString &filterStr) {
|
||||
qDebug() << "void DialogImportModelDataset::handleItemClicked";
|
||||
filterModel(filterStr);
|
||||
}
|
||||
|
||||
ui->ModellistWidget->clear();
|
||||
if (!models.isEmpty()) {
|
||||
ui->ModellistWidget->addItems(models);
|
||||
}
|
||||
}
|
||||
// 根据中文分类名称获取英文分类名称
|
||||
QString DialogImportModelDataset::getEnglishCategory(const QString &chineseCategory) {
|
||||
return _categories.value(chineseCategory, "");
|
||||
}
|
||||
|
||||
void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)
|
||||
{
|
||||
// 单击废弃
|
||||
}
|
||||
|
||||
// 更新 listWidget 的槽函数
|
||||
void DialogImportModelDataset::updateModellistWidget(const QString &filterStr) {
|
||||
qDebug() << "void DialogImportModelDataset::handleItemClicked";
|
||||
filterModelChinese(filterStr);
|
||||
}
|
||||
// 导入网格
|
||||
void DialogImportModelDataset::importMeshModelToMainWindows(QString stdPath) {
|
||||
QFileInfo info(stdPath);
|
||||
QString name = info.fileName();
|
||||
QString path = info.filePath();
|
||||
QString suffix = "STL(*.stl)"; // 这里应该与 MeshDataExchangePlugin::install() 中的一致
|
||||
//info.suffix().toLower();
|
||||
emit _mainwindow->importMeshSIGN(stdPath,suffix,-1);
|
||||
}
|
||||
// 初始化三维模型
|
||||
void DialogImportModelDataset::importPreViewModel(QString stdPath) {
|
||||
this->ui->label_info->setText("loading model ......");
|
||||
this->ui->progressBar->setValue(30);
|
||||
curViewPath=stdPath;//清楚所有模型
|
||||
_render->RemoveAllViewProps(); // 删除当前渲染器中的所有对象
|
||||
_renderWindow->Render(); // 重新渲染窗口
|
||||
|
||||
// 根据中文分类名称获取英文分类名称
|
||||
QString DialogImportModelDataset::getEnglishCategory(const QString &chineseCategory) {
|
||||
QMap<QString, QString> categories = {
|
||||
{"森林", "forest"},
|
||||
{"农作物", "crop"},
|
||||
{"草地", "grass"},
|
||||
{"人工", "uav"},
|
||||
{"水体", "water"},
|
||||
{"动态水体", "dwater"},
|
||||
{"道路", "road"},
|
||||
{"几何", "geo"},
|
||||
{"辐射", "radi"},
|
||||
{"土壤", "soil"},
|
||||
{"陆表", "land"},
|
||||
{"植被", "vegetation"},
|
||||
{"水体场景", "water_scene"}
|
||||
};
|
||||
return categories.value(chineseCategory, "");
|
||||
}
|
||||
void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)
|
||||
{
|
||||
qDebug() << "void DialogImportModelDataset::handleItemClicked "<<current->text();
|
||||
// 在你的主窗口或者其他适当的位置初始化 VTK 相关变量
|
||||
vtkSmartPointer<vtkSTLReader> reader = vtkSmartPointer<vtkSTLReader>::New();
|
||||
reader->SetFileName(stdPath.toLocal8Bit().data()); // 设置 STL 模型文件路径
|
||||
this->ui->progressBar->setValue(50);
|
||||
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
|
||||
mapper->SetInputConnection(reader->GetOutputPort());
|
||||
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
|
||||
actor->SetMapper(mapper);
|
||||
this->ui->progressBar->setValue(60);
|
||||
_render->AddActor(actor);
|
||||
// 更新渲染窗口
|
||||
_render->ResetCamera();
|
||||
_renderWindow->Render();
|
||||
_qvtkWidget->update();
|
||||
this->ui->progressBar->setValue(100);
|
||||
this->ui->label_info->setText(" ");
|
||||
this->ui->progressBar->setValue(0);
|
||||
}
|
||||
void DialogImportModelDataset::initVTKView() {
|
||||
// 添加控件
|
||||
_qvtkWidget = new QVTKOpenGLNativeWidget(this);
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(ui->modelViewContent);
|
||||
mainLayout->addWidget(_qvtkWidget);
|
||||
|
||||
if (!current) return; // 确保当前项非空
|
||||
// 读取 item 文本或其他相关信息
|
||||
QString itemName = current->text();
|
||||
qDebug() << "Current item selected: " << itemName;
|
||||
QString iniFilePath = QString("%1\\model\\library.ini").arg(Setting::BusAPI::instance()->getApplicationExePath());
|
||||
// 初始化渲染器
|
||||
_renderWindow = _qvtkWidget->renderWindow();
|
||||
_render = vtkSmartPointer<vtkOpenGLRenderer>::New();
|
||||
_render->SetGradientBackground(true);
|
||||
// 设置渲染背景色
|
||||
Setting::GraphOption *option = Setting::BusAPI::instance()->getGraphOption();
|
||||
QColor topcolor = option->getBackgroundTopColor();
|
||||
QColor bottomcolor = option->getBackgroundBottomColor();
|
||||
_render->SetBackground2(topcolor.redF(), topcolor.greenF(), topcolor.blueF());
|
||||
_render->SetBackground(bottomcolor.redF(), bottomcolor.greenF(), bottomcolor.blueF());
|
||||
|
||||
// 检查文件是否存在
|
||||
if (!QFileInfo::exists(iniFilePath)) {
|
||||
qDebug() << "INI file not found: " << iniFilePath;
|
||||
return;
|
||||
}
|
||||
// 开启硬件加速特性
|
||||
_render->UseDepthPeelingOn();
|
||||
_render->SetUseFXAA(true);
|
||||
_interactor = _renderWindow->GetInteractor();
|
||||
_renderWindow->AddRenderer(_render);
|
||||
}
|
||||
|
||||
// 使用 QSettings 读取 INI 文件
|
||||
QSettings settings(iniFilePath, QSettings::IniFormat);
|
||||
settings.beginGroup("Detail");
|
||||
void DialogImportModelDataset::on_push_add_models_slot() {
|
||||
|
||||
// 获取与当前 item 名称匹配的路径
|
||||
QString modelPath = settings.value(itemName).toString();
|
||||
if (modelPath.isEmpty()) {
|
||||
qDebug() << "No model path found for item: " << itemName;
|
||||
} else {
|
||||
qDebug() << "Model path: " << modelPath;
|
||||
this->importPreViewModel(modelPath);
|
||||
}
|
||||
settings.endGroup();
|
||||
//模型文件选择框
|
||||
QString filePath = QFileDialog::getOpenFileName(this, tr("请选择要上传的模型文件"), "", tr("STL(*.stl)"));
|
||||
if (filePath.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
//中文类名输入框
|
||||
QString chineseClass = QInputDialog::getText(this, tr("提示"), tr("请输入模型的中文类名:"));
|
||||
if(chineseClass.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
||||
// 导入网格
|
||||
void DialogImportModelDataset::importMeshModelToMainWindows(QString stdPath) {
|
||||
QFileInfo info(stdPath);
|
||||
QString name = info.fileName();
|
||||
QString path = info.filePath();
|
||||
QString suffix = "STL(*.stl)"; // 这里应该与 MeshDataExchangePlugin::install() 中的一致
|
||||
//info.suffix().toLower();
|
||||
emit _mainwindow->importMeshSIGN(stdPath,suffix,-1);
|
||||
}
|
||||
// 初始化三维模型
|
||||
void DialogImportModelDataset::importPreViewModel(QString stdPath) {
|
||||
qDebug()<<"void DialogImportModelDataset::importPreViewModel(QString stdPath) start";
|
||||
//清楚所有模型
|
||||
// _render->RemoveAllViewProps();
|
||||
//英文类名输入框
|
||||
QString englishClass = QInputDialog::getText(this, tr("提示"), tr("请输入模型的英文类名:"));
|
||||
if(englishClass.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
||||
vtkSmartPointer<vtkSTLReader> reader = vtkSmartPointer<vtkSTLReader>::New();
|
||||
reader->SetFileName(stdPath.toLocal8Bit().data()); // 设置 STL 模型文件路径
|
||||
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
|
||||
mapper->SetInputConnection(reader->GetOutputPort());
|
||||
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
|
||||
actor->SetMapper(mapper);
|
||||
_render->AddActor(actor);
|
||||
// 调整相机以确保整个场景可见
|
||||
_render->ResetCamera();
|
||||
_renderWindow->AddRenderer(_render);
|
||||
_renderWindow->Render();
|
||||
_qvtkWidget->update();
|
||||
qDebug()<<"void DialogImportModelDataset::importPreViewModel(QString stdPath) finish!!!";
|
||||
}
|
||||
void DialogImportModelDataset::initVTKView() {
|
||||
// 添加控件
|
||||
_qvtkWidget = new QVTKOpenGLNativeWidget(this);
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(ui->modelViewContent);
|
||||
mainLayout->addWidget(_qvtkWidget);
|
||||
|
||||
// 初始化渲染器
|
||||
_renderWindow = _qvtkWidget->renderWindow();
|
||||
_render = vtkSmartPointer<vtkOpenGLRenderer>::New();
|
||||
_render->SetGradientBackground(true);
|
||||
// 设置渲染背景色
|
||||
Setting::GraphOption *option = Setting::BusAPI::instance()->getGraphOption();
|
||||
QColor topcolor = option->getBackgroundTopColor();
|
||||
QColor bottomcolor = option->getBackgroundBottomColor();
|
||||
_render->SetBackground2(topcolor.redF(), topcolor.greenF(), topcolor.blueF());
|
||||
_render->SetBackground(bottomcolor.redF(), bottomcolor.greenF(), bottomcolor.blueF());
|
||||
//读入ini文件并获取需要上传的模型文件名称
|
||||
QString iniFilePath = QString("%1\\model\\Library.ini").arg(Setting::BusAPI::instance()->getApplicationExePath());
|
||||
QSettings iniFile(iniFilePath, QSettings::IniFormat);
|
||||
iniFile.setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
|
||||
QString fileName = QFileInfo(filePath).fileName();
|
||||
QString baseName = QFileInfo(filePath).baseName();
|
||||
|
||||
// 创建一个坐标系
|
||||
vtkSmartPointer<vtkAxesActor> axes = vtkSmartPointer<vtkAxesActor>::New();
|
||||
//获取Names分组键名和值
|
||||
iniFile.beginGroup("Names");
|
||||
QStringList namesKeys = iniFile.childKeys();
|
||||
QStringList namesValues;
|
||||
QString matchedKey = ""; //中文类反查英文类
|
||||
|
||||
// 将坐标系添加到渲染器中
|
||||
vtkSmartPointer<vtkOrientationMarkerWidget> widget = vtkSmartPointer<vtkOrientationMarkerWidget>::New();
|
||||
widget->SetOrientationMarker(axes);
|
||||
widget->SetInteractor(_renderWindow->GetInteractor());
|
||||
widget->SetViewport(0.0, 0.0, 0.2, 0.2); // 设置坐标系小部件的位置和大小
|
||||
widget->EnabledOn();
|
||||
for (const QString &nameKey : namesKeys){
|
||||
QString value = iniFile.value(nameKey).toString();
|
||||
namesValues.append(value);
|
||||
if (value == chineseClass) {
|
||||
matchedKey = nameKey;
|
||||
}
|
||||
}
|
||||
iniFile.endGroup();
|
||||
|
||||
//根据englishClass和chineseClass判断模型所属的类别是否存在,不需要新建Names分组
|
||||
if((namesKeys.contains(englishClass)) || (namesValues.contains(chineseClass))) {
|
||||
// 复制文件
|
||||
QDir dir(QString("%1\\model").arg(Setting::BusAPI::instance()->getApplicationExePath()));
|
||||
if(!dir.exists()) {
|
||||
dir.mkpath(".");
|
||||
}
|
||||
QString newFilePath = dir.filePath(fileName);
|
||||
QFile::copy(filePath, newFilePath);
|
||||
|
||||
// 开启硬件加速特性
|
||||
_render->UseDepthPeelingOn();
|
||||
_render->SetUseFXAA(true);
|
||||
_interactor = _renderWindow->GetInteractor();
|
||||
_renderWindow->AddRenderer(_render);
|
||||
// 若matchedKey没有匹配上(即中文类有,但是英文没有)
|
||||
if(matchedKey.isEmpty()) {
|
||||
matchedKey = englishClass;
|
||||
}
|
||||
// 根据Models分组的值判断模型名称是否已经存在
|
||||
iniFile.beginGroup("Models");
|
||||
QString modelFileName = iniFile.value(matchedKey, "").toString();
|
||||
iniFile.endGroup();
|
||||
|
||||
if (modelFileName.contains(fileName)) {
|
||||
qDebug() << "Models/" + matchedKey;
|
||||
QMessageBox::warning(this, tr(u8"错误"), tr(u8"模型名称已经存在"));
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
void DialogImportModelDataset::accept()
|
||||
{
|
||||
QListWidgetItem *current=ui->ModellistWidget->currentItem();
|
||||
if (!current) {return;} // 确保当前项非空
|
||||
// 读取 item 文本或其他相关信息
|
||||
QString itemName = current->text();
|
||||
qDebug() << "Current item selected: " << itemName;
|
||||
QString iniFilePath = QString("%1\\model\\library.ini").arg(Setting::BusAPI::instance()->getApplicationExePath());
|
||||
// 构建新的Models分组值
|
||||
iniFile.beginGroup("Models");
|
||||
QString currentValue = iniFile.value(matchedKey, "").toString();
|
||||
QString newValue;
|
||||
if(!currentValue.isEmpty()) {
|
||||
newValue = currentValue + "," + fileName;
|
||||
} else {
|
||||
newValue = fileName;
|
||||
}
|
||||
iniFile.endGroup();
|
||||
|
||||
// 检查文件是否存在
|
||||
if (!QFileInfo::exists(iniFilePath)) {
|
||||
qDebug() << "INI file not found: " << iniFilePath;
|
||||
return;
|
||||
}
|
||||
// 手动更新ini文件,避免引号
|
||||
QFile file(iniFilePath);
|
||||
if(file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
||||
QTextStream in(&file);
|
||||
in.setCodec("UTF-8"); // 确保读取时使用UTF-8编码
|
||||
QString content = in.readAll();
|
||||
file.close();
|
||||
|
||||
// 使用 QSettings 读取 INI 文件
|
||||
QSettings settings(iniFilePath, QSettings::IniFormat);
|
||||
settings.beginGroup("Detail");
|
||||
// 查找Models分组的位置
|
||||
int modelsStartPos = content.indexOf("[Models]");
|
||||
int modelsEndPos = content.indexOf("[", modelsStartPos + 1);
|
||||
if(modelsEndPos == -1)
|
||||
modelsEndPos = content.length();
|
||||
|
||||
// 获取与当前 item 名称匹配的路径
|
||||
QString modelPath = settings.value(itemName).toString();
|
||||
if (modelPath.isEmpty()) {
|
||||
qDebug() << "No model path found for item: " << itemName;
|
||||
} else {
|
||||
qDebug() << "Model path: " << modelPath;
|
||||
this->importPreViewModel(modelPath);
|
||||
}
|
||||
settings.endGroup();
|
||||
QDialog::accept();
|
||||
}
|
||||
// 窗体点击按钮的类别
|
||||
void DialogImportModelDataset::setCurrentCatorgy(QString cato) {
|
||||
qDebug()<<"DialogImportModelDataset::setCurrentCatorgy(QString cato) "<< cato;
|
||||
// ui->FiltercomboBox->setCurrentText(cato);
|
||||
QString modelsSection = content.mid(modelsStartPos, modelsEndPos - modelsStartPos);
|
||||
QString modelsKey = matchedKey + "=";
|
||||
int pos = modelsSection.indexOf(modelsKey);
|
||||
|
||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::setCurrentText),
|
||||
this, &DialogImportModelDataset::updateModellistWidget);
|
||||
if(pos != -1) {
|
||||
// 找到现有键,更新其值
|
||||
int endPos = modelsSection.indexOf('\n', pos);
|
||||
if(endPos == -1)
|
||||
endPos = modelsSection.length();
|
||||
QString currentLine = modelsSection.mid(pos, endPos - pos);
|
||||
if(!currentLine.contains(fileName)) {
|
||||
currentLine += "," + fileName;
|
||||
modelsSection.replace(pos, endPos - pos, currentLine);
|
||||
}
|
||||
} else {
|
||||
// 添加新的键值对
|
||||
modelsSection += "\n" + modelsKey + newValue + "\n";
|
||||
}
|
||||
|
||||
ui->FiltercomboBox->setCurrentText(cato);
|
||||
// 重建ini文件内容,确保只替换Models分组
|
||||
content.replace(modelsStartPos, modelsEndPos - modelsStartPos, modelsSection);
|
||||
|
||||
// 初始显示第一个选项对应的 listWidget 内容
|
||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||
if(file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
|
||||
QTextStream out(&file);
|
||||
out.setCodec("UTF-8"); // 确保写入时使用UTF-8编码
|
||||
out << content;
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
//更新Deatail分组的内容
|
||||
iniFile.beginGroup("Detail");
|
||||
iniFile.setValue(fileName, newFilePath);
|
||||
iniFile.endGroup();
|
||||
|
||||
}
|
||||
QMessageBox::information(this, tr("提示"), tr("模型文件加载成功"));
|
||||
|
||||
// 更新comboBOX选项 与 listWidget内容
|
||||
this->initLibrary();
|
||||
}
|
||||
|
||||
//判断模型所属的类别不存在,需要新建Names分组
|
||||
else{
|
||||
QDir dir(QString("%1\\model").arg(Setting::BusAPI::instance()->getApplicationExePath())); // 改成相对路径
|
||||
if (!dir.exists()) {
|
||||
dir.mkpath(".");
|
||||
}
|
||||
|
||||
QString newFilePath = dir.filePath(fileName);
|
||||
QFile::copy(filePath, newFilePath); //复制文件
|
||||
|
||||
// 确保写入INI文件时正确处理UTF-8编码
|
||||
iniFile.beginGroup("Names");
|
||||
iniFile.setValue(englishClass, chineseClass);
|
||||
iniFile.endGroup();
|
||||
|
||||
iniFile.beginGroup("Models");
|
||||
iniFile.setValue(englishClass, fileName);
|
||||
iniFile.endGroup();
|
||||
|
||||
iniFile.beginGroup("Detail");
|
||||
iniFile.setValue(fileName, newFilePath);
|
||||
iniFile.endGroup();
|
||||
|
||||
QMessageBox::information(this, tr("提示"), tr("模型文件加载成功"));
|
||||
|
||||
//更新comboBOX选项 与 listWidget内容
|
||||
this->initLibrary();
|
||||
qDebug()<<"on_click_over";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DialogImportModelDataset::modelItem_doubleClicked(QListWidgetItem* current) {
|
||||
|
||||
// QString selectPath=item->text();
|
||||
|
||||
qDebug() << "void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)";
|
||||
|
||||
if (!current) return; // 确保当前项非空
|
||||
|
||||
// 读取 item 文本或其他相关信息
|
||||
QString itemName = current->text();
|
||||
qDebug() << "Current item selected: " << itemName;
|
||||
|
||||
// 定义 INI 文件的路径
|
||||
QString iniFilePath = QString("%1\\model\\library.ini").arg(Setting::BusAPI::instance()->getApplicationExePath());
|
||||
|
||||
// 检查文件是否存在
|
||||
if (!QFileInfo::exists(iniFilePath)) {
|
||||
qDebug() << "INI file not found: " << iniFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用 QSettings 读取 INI 文件
|
||||
QSettings settings(iniFilePath, QSettings::IniFormat);
|
||||
settings.beginGroup("Detail");
|
||||
|
||||
// 获取与当前 item 名称匹配的路径
|
||||
QString modelPath = settings.value(itemName).toString();
|
||||
|
||||
if (modelPath.isEmpty()) {
|
||||
qDebug() << "No model path found for item: " << itemName;
|
||||
} else {
|
||||
qDebug() << "Model path: " << modelPath;
|
||||
|
||||
// 根据获取的路径导入预览模型
|
||||
this->importPreViewModel(modelPath);
|
||||
// this->importMeshModelToMainWindows(modelPath);
|
||||
}
|
||||
|
||||
settings.endGroup();
|
||||
//
|
||||
//
|
||||
// qDebug()<<"modelItem_doubleClicked : "+selectPath;
|
||||
// this->importPreViewModel(selectPath);
|
||||
}
|
||||
void DialogImportModelDataset::accept()
|
||||
{
|
||||
this->importMeshModelToMainWindows(this->curViewPath);
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
} // namespace WBFZ
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/**
|
||||
* @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.
|
||||
*/
|
||||
* @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
|
||||
|
@ -20,56 +20,60 @@
|
|||
|
||||
|
||||
namespace GUI {
|
||||
class MainWindow;
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
namespace WBFZ {
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class DialogImportModelDataset;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
class DialogImportModelDataset : public QDialog {
|
||||
Q_OBJECT
|
||||
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:
|
||||
explicit DialogImportModelDataset(GUI::MainWindow* _mainwindow, QWidget* parent = nullptr);
|
||||
~DialogImportModelDataset() override;
|
||||
|
||||
|
||||
public:
|
||||
void initLibrary();
|
||||
void filterModelChinese(QString filterStr);// 根据条件筛选
|
||||
void filterModelEnglish(QString filterStr);// 根据条件筛选
|
||||
void setCurrentCatorgy(QString cato);
|
||||
QString getEnglishCategory(const QString &chineseCategory); // 新增中英文转换函数声明
|
||||
|
||||
public slots:
|
||||
virtual void accept();
|
||||
void updateModellistWidget(const QString &filterStr); // 声明 updateModellistWidget 函数
|
||||
void handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous);
|
||||
void on_push_add_models_slot();
|
||||
// void on_TestLoadModelImport();
|
||||
public:
|
||||
void initLibrary();
|
||||
void filterModel(QString filterStr);// 根据条件筛选
|
||||
QString getEnglishCategory(const QString &chineseCategory); // 新增中英文转换函数声明
|
||||
|
||||
private:
|
||||
GUI::MainWindow* _mainwindow;
|
||||
Ui::DialogImportModelDataset* ui;
|
||||
QString _librarySettingPath; // ini 配置环境地址
|
||||
QMap<QString, QString> _categories; // 用于存储Names分组的数据
|
||||
signals:
|
||||
void updateFilterModel(const QString filterStr); // 声明 updateFilterModel 函数
|
||||
|
||||
// 三维模型操作
|
||||
public: // 陈增辉
|
||||
void importMeshModelToMainWindows(QString stdPath); // 最终导入模型
|
||||
void importPreViewModel(QString stdPath); // 导入预览模型
|
||||
void initVTKView();// 初始化VTK视图
|
||||
|
||||
private:
|
||||
QVTKOpenGLNativeWidget *_qvtkWidget; // 三维模型
|
||||
vtkSmartPointer<vtkOpenGLRenderer> _render{};
|
||||
vtkSmartPointer<vtkCubeAxesActor> _cubeAxesActor{};
|
||||
vtkSmartPointer<vtkRenderWindow> _renderWindow{};
|
||||
vtkSmartPointer< vtkRenderWindowInteractor > _interactor{};
|
||||
};
|
||||
public slots:
|
||||
|
||||
virtual void accept();
|
||||
void updateModellistWidget(const QString &filterStr); // 声明 updateModellistWidget 函数
|
||||
void handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous);
|
||||
void on_push_add_models_slot();
|
||||
// void on_TestLoadModelImport();
|
||||
void modelItem_doubleClicked(QListWidgetItem *item);
|
||||
private:
|
||||
GUI::MainWindow* _mainwindow;
|
||||
Ui::DialogImportModelDataset* ui;
|
||||
QString _librarySettingPath; // ini 配置环境地址
|
||||
QMap<QString, QString> _categories; // 用于存储Names分组的数据
|
||||
|
||||
// 三维模型操作
|
||||
public: // 陈增辉
|
||||
void importMeshModelToMainWindows(QString stdPath); // 最终导入模型
|
||||
void importPreViewModel(QString stdPath); // 导入预览模型
|
||||
void initVTKView();// 初始化VTK视图
|
||||
|
||||
private:
|
||||
QVTKOpenGLNativeWidget *_qvtkWidget; // 三维模型
|
||||
vtkSmartPointer<vtkOpenGLRenderer> _render{};
|
||||
vtkSmartPointer<vtkCubeAxesActor> _cubeAxesActor{};
|
||||
vtkSmartPointer<vtkRenderWindow> _renderWindow{};
|
||||
vtkSmartPointer< vtkRenderWindowInteractor > _interactor{};
|
||||
QString curViewPath; // 当前视图路径
|
||||
};
|
||||
} // namespace WBFZ
|
||||
|
||||
#endif // LAMPCAE_DIALOGIMPORTMODELDATASET_H
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1003</width>
|
||||
<width>1161</width>
|
||||
<height>846</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>DialogImportModelDataset</string>
|
||||
<string>预制模型导入界面</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
@ -146,10 +146,54 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_info">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</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>
|
||||
|
|
|
@ -146,8 +146,8 @@ namespace MeshData {
|
|||
{
|
||||
// emit this->on_loadPreMeshFile(this, "radi");
|
||||
WBFZ::DialogImportModelDataset* dialog = new WBFZ::DialogImportModelDataset(_mainwindow);
|
||||
dialog->setCurrentCatorgy(_fileType);
|
||||
dialog->exec();
|
||||
dialog->show();
|
||||
emit dialog->updateFilterModel(_fileType);
|
||||
}
|
||||
void MeshDataExchangePlugin::on_deleteMesh(GUI::MainWindow* m)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue