20240709模型加载
parent
79ea61570b
commit
3f66cdb38f
|
|
@ -36,6 +36,23 @@ namespace WBFZ {
|
||||||
|
|
||||||
this->initVTKView(); // 初始化VTK视图
|
this->initVTKView(); // 初始化VTK视图
|
||||||
|
|
||||||
|
// 连接 comboBox 的 setCurrentText 信号与更新 listWidget 的槽函数
|
||||||
|
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::setCurrentText),
|
||||||
|
this, &DialogImportModelDataset::updateModellistWidget);
|
||||||
|
|
||||||
|
// 连接 comboBox 的 currentIndexChanged 信号与更新 listWidget 的槽函数
|
||||||
|
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
||||||
|
this, &DialogImportModelDataset::updateModellistWidget);
|
||||||
|
|
||||||
|
// 连接 listWidget 的 currentItemChanged 信号与更新 VTK 的槽函数
|
||||||
|
// connect(ui->ModellistWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)),
|
||||||
|
// this, SLOT(handleItemClicked(QListWidgetItem*, QListWidgetItem*)));
|
||||||
|
connect(ui->ModellistWidget, QOverload<QListWidgetItem *, QListWidgetItem *>::of(&QListWidget::currentItemChanged),
|
||||||
|
this, &DialogImportModelDataset::handleItemClicked);
|
||||||
|
|
||||||
|
// 连接 pushButton 的 clicked 信号与更新 listWidget 的槽函数
|
||||||
|
connect(ui->Addmodel_pushButton, SIGNAL(clicked()), this, SLOT(on_push_add_models_slot()));
|
||||||
|
// connect(ui->Addmodel_pushButton, &QPushButton::clicked, this, &DialogImportModelDataset::on_push_add_models);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,9 +85,6 @@ namespace WBFZ {
|
||||||
for (auto category : _categories.keys()) {
|
for (auto category : _categories.keys()) {
|
||||||
ui->FiltercomboBox->addItem(category);
|
ui->FiltercomboBox->addItem(category);
|
||||||
}
|
}
|
||||||
// 连接 comboBox 的 setCurrentText 信号与更新 listWidget 的槽函数
|
|
||||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::setCurrentText),
|
|
||||||
this, &DialogImportModelDataset::updateModellistWidget);
|
|
||||||
|
|
||||||
// 设置comboBox默认选项为"森林"
|
// 设置comboBox默认选项为"森林"
|
||||||
ui->FiltercomboBox->setCurrentText("森林"); // 使用中文名称
|
ui->FiltercomboBox->setCurrentText("森林"); // 使用中文名称
|
||||||
|
|
@ -78,10 +92,6 @@ namespace WBFZ {
|
||||||
// 初始显示默认选项对应的 listWidget 内容
|
// 初始显示默认选项对应的 listWidget 内容
|
||||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||||
|
|
||||||
// 连接 comboBox 的 currentIndexChanged 信号与更新 listWidget 的槽函数
|
|
||||||
connect(ui->FiltercomboBox, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
|
|
||||||
this, &DialogImportModelDataset::updateModellistWidget);
|
|
||||||
|
|
||||||
// 初始显示选项对应的 listWidget 内容
|
// 初始显示选项对应的 listWidget 内容
|
||||||
updateModellistWidget(ui->FiltercomboBox->currentText());
|
updateModellistWidget(ui->FiltercomboBox->currentText());
|
||||||
|
|
||||||
|
|
@ -96,47 +106,6 @@ namespace WBFZ {
|
||||||
// connect(ui->Addmodel_pushButton, SIGNAL(clicked()), this, SLOT(on_push_add_models()));
|
// connect(ui->Addmodel_pushButton, SIGNAL(clicked()), this, SLOT(on_push_add_models()));
|
||||||
connect(ui->Addmodel_pushButton, &QPushButton::clicked, this, &DialogImportModelDataset::on_push_add_models);
|
connect(ui->Addmodel_pushButton, &QPushButton::clicked, this, &DialogImportModelDataset::on_push_add_models);
|
||||||
|
|
||||||
// // 检查文件是否存在
|
|
||||||
// QFile iniFile(_librarySettingPath);
|
|
||||||
// if (iniFile.exists()) {
|
|
||||||
// // Here you can add more initialization code if needed
|
|
||||||
// Setting::BusAPI* busapi = Setting::BusAPI::instance(); // 指针调用 -> ,类::静态方法
|
|
||||||
// return; // 如果文件存在,则跳过写入操作
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// QSettings settings(_librarySettingPath, QSettings::IniFormat);
|
|
||||||
// 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.ply", "uav.stl"}},
|
|
||||||
// {"water", {"water.stl"}},
|
|
||||||
// {"dwater", {"dwater.stl"}},
|
|
||||||
// {"road", {"road.ply", "road.stl"}},
|
|
||||||
// {"geo", {"geo.stl"}},
|
|
||||||
// {"radi", {"radi.stl"}},
|
|
||||||
// {"soil", {"soil.ply", "soil.stl"}},
|
|
||||||
// {"land", {"land.stl"}},
|
|
||||||
// {"vegetation", {"vegetation.stl"}},
|
|
||||||
// {"water_scene", {"water_scene.stl"}}
|
|
||||||
// };
|
|
||||||
//
|
|
||||||
// settings.beginGroup("Models");
|
|
||||||
// for (const QString &category : categories) {
|
|
||||||
// settings.setValue(category, models[category]);
|
|
||||||
// }
|
|
||||||
// settings.endGroup();
|
|
||||||
//
|
|
||||||
// settings.beginGroup("Detail");
|
|
||||||
// for (const QString &category : categories) {
|
|
||||||
// for (const QString &model : models[category]) {
|
|
||||||
// QString path = QString("../../cmake-build-release/Release/model/%1").arg(model);
|
|
||||||
// settings.setValue(model, path);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// settings.endGroup();
|
|
||||||
|
|
||||||
// Here you can add more initialization code if needed
|
// Here you can add more initialization code if needed
|
||||||
Setting::BusAPI* busapi = Setting::BusAPI::instance(); // 指针调用 -> ,类::静态方法
|
Setting::BusAPI* busapi = Setting::BusAPI::instance(); // 指针调用 -> ,类::静态方法
|
||||||
}
|
}
|
||||||
|
|
@ -258,17 +227,27 @@ namespace WBFZ {
|
||||||
_renderWindow->AddRenderer(_render);
|
_renderWindow->AddRenderer(_render);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogImportModelDataset::on_push_add_models() {
|
void DialogImportModelDataset::on_push_add_models_slot() {
|
||||||
|
|
||||||
|
//模型文件选择框
|
||||||
QString filePath = QFileDialog::getOpenFileName(this, tr("请选择要上传的模型文件"), "", tr("ALL Files (*)"));
|
QString filePath = QFileDialog::getOpenFileName(this, tr("请选择要上传的模型文件"), "", tr("ALL Files (*)"));
|
||||||
if (filePath.isEmpty()) {
|
if (filePath.isEmpty()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString chineseName = QInputDialog::getText(this, tr("提示"), tr("请输入模型的中文名称:"));
|
//中文类名输入框
|
||||||
if (chineseName.isEmpty()) {
|
QString chineseClass = QInputDialog::getText(this, tr("提示"), tr("请输入模型的中文类名:"));
|
||||||
|
if(chineseClass.isEmpty()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//英文类名输入框
|
||||||
|
QString englishClass = QInputDialog::getText(this, tr("提示"), tr("请输入模型的英文类名:"));
|
||||||
|
if(englishClass.isEmpty()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//读入ini文件并获取需要上传的模型文件名称
|
||||||
QString iniFilePath = "D:\\WBFZCPP\\source\\LAMPCAE\\cmake-build-release\\Release\\model\\Library.ini";
|
QString iniFilePath = "D:\\WBFZCPP\\source\\LAMPCAE\\cmake-build-release\\Release\\model\\Library.ini";
|
||||||
QSettings iniFile(iniFilePath, QSettings::IniFormat);
|
QSettings iniFile(iniFilePath, QSettings::IniFormat);
|
||||||
iniFile.setIniCodec(QTextCodec::codecForName("UTF-8"));
|
iniFile.setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||||
|
|
@ -276,75 +255,60 @@ namespace WBFZ {
|
||||||
QString fileName = QFileInfo(filePath).fileName();
|
QString fileName = QFileInfo(filePath).fileName();
|
||||||
QString baseName = QFileInfo(filePath).baseName();
|
QString baseName = QFileInfo(filePath).baseName();
|
||||||
|
|
||||||
// 进入Names分组
|
//获取Names分组键名和值
|
||||||
iniFile.beginGroup("Names");
|
iniFile.beginGroup("Names");
|
||||||
// 获取Names分组下所有的键
|
QStringList namesKeys = iniFile.childKeys();
|
||||||
QStringList keys = iniFile.childKeys();
|
QStringList namesValues;
|
||||||
// 用于存储Names分组下所有的值
|
QString matchedKey = ""; //中文类反查英文类
|
||||||
QStringList values;
|
|
||||||
// 用于存储匹配的键
|
for (const QString &nameKey : namesKeys){
|
||||||
QString matchedKey;
|
QString value = iniFile.value(nameKey).toString();
|
||||||
// 遍历所有的键,获取对应的值
|
namesValues.append(value);
|
||||||
for (const QString &key : keys) {
|
if (value == chineseClass) {
|
||||||
QString value = iniFile.value(key).toString();
|
matchedKey = nameKey;
|
||||||
values.append(value);
|
|
||||||
if (value == chineseName) {
|
|
||||||
matchedKey = key; // 存储匹配的键
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 退出Names分组
|
|
||||||
iniFile.endGroup();
|
iniFile.endGroup();
|
||||||
|
|
||||||
if (iniFile.value("Models/" + baseName).toString() == fileName) {
|
//根据englishClass和chineseClass判断模型所属的类别是否存在,不需要新建Names分组
|
||||||
QMessageBox::warning(this, tr("错误"), tr("模型文件已经存在"));
|
if((namesKeys.contains(englishClass)) || (namesValues.contains(chineseClass))) {
|
||||||
return;
|
// 复制文件
|
||||||
}
|
QDir dir(QString("%1\\model").arg(Setting::BusAPI::instance()->getApplicationExePath()));
|
||||||
|
|
||||||
else if(values.contains(chineseName)) {
|
|
||||||
QDir dir("D:\\WBFZCPP\\source\\LAMPCAE\\cmake-build-release\\Release\\model");
|
|
||||||
if(!dir.exists()) {
|
if(!dir.exists()) {
|
||||||
dir.mkpath(".");
|
dir.mkpath(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString newFilePath = dir.filePath(fileName);
|
QString newFilePath = dir.filePath(fileName);
|
||||||
QFile::copy(filePath, newFilePath);
|
QFile::copy(filePath, newFilePath);
|
||||||
|
|
||||||
|
// 若matchedKey没有匹配上(即中文类有,但是英文没有)
|
||||||
|
if(matchedKey.isEmpty()) {
|
||||||
|
matchedKey = englishClass;
|
||||||
//此方法更新之后会带引号
|
}
|
||||||
// iniFile.beginGroup("Models");
|
// 根据Models分组的值判断模型名称是否已经存在
|
||||||
//
|
|
||||||
// // 获取当前的值
|
|
||||||
// QString currentValue = iniFile.value(matchedKey, "").toString();
|
|
||||||
// QString newValue;
|
|
||||||
// if(!currentValue.isEmpty()) {
|
|
||||||
// newValue = currentValue + "," + fileName;
|
|
||||||
// } else {
|
|
||||||
// newValue = fileName;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 更新Models分组中的值
|
|
||||||
// iniFile.setValue(matchedKey, newValue);
|
|
||||||
// iniFile.endGroup();
|
|
||||||
|
|
||||||
// 更新Models分组中的值
|
|
||||||
iniFile.beginGroup("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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建新的Models分组值
|
||||||
|
iniFile.beginGroup("Models");
|
||||||
QString currentValue = iniFile.value(matchedKey, "").toString();
|
QString currentValue = iniFile.value(matchedKey, "").toString();
|
||||||
QString newValue;
|
QString newValue;
|
||||||
if (!currentValue.isEmpty()) {
|
if(!currentValue.isEmpty()) {
|
||||||
newValue = currentValue + "," + fileName;
|
newValue = currentValue + "," + fileName;
|
||||||
} else {
|
} else {
|
||||||
newValue = fileName;
|
newValue = fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
iniFile.endGroup();
|
iniFile.endGroup();
|
||||||
|
|
||||||
// 手动更新ini文件,避免引号
|
// 手动更新ini文件,避免引号
|
||||||
QFile file(iniFilePath);
|
QFile file(iniFilePath);
|
||||||
if (file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
if(file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
||||||
QTextStream in(&file);
|
QTextStream in(&file);
|
||||||
in.setCodec("UTF-8"); // 确保读取时使用UTF-8编码
|
in.setCodec("UTF-8"); // 确保读取时使用UTF-8编码
|
||||||
QString content = in.readAll();
|
QString content = in.readAll();
|
||||||
|
|
@ -353,18 +317,20 @@ namespace WBFZ {
|
||||||
// 查找Models分组的位置
|
// 查找Models分组的位置
|
||||||
int modelsStartPos = content.indexOf("[Models]");
|
int modelsStartPos = content.indexOf("[Models]");
|
||||||
int modelsEndPos = content.indexOf("[", modelsStartPos + 1);
|
int modelsEndPos = content.indexOf("[", modelsStartPos + 1);
|
||||||
if (modelsEndPos == -1) modelsEndPos = content.length();
|
if(modelsEndPos == -1)
|
||||||
|
modelsEndPos = content.length();
|
||||||
|
|
||||||
QString modelsSection = content.mid(modelsStartPos, modelsEndPos - modelsStartPos);
|
QString modelsSection = content.mid(modelsStartPos, modelsEndPos - modelsStartPos);
|
||||||
QString modelsKey = matchedKey + "=";
|
QString modelsKey = matchedKey + "=";
|
||||||
int pos = modelsSection.indexOf(modelsKey);
|
int pos = modelsSection.indexOf(modelsKey);
|
||||||
|
|
||||||
if (pos != -1) {
|
if(pos != -1) {
|
||||||
// 找到现有键,更新其值
|
// 找到现有键,更新其值
|
||||||
int endPos = modelsSection.indexOf('\n', pos);
|
int endPos = modelsSection.indexOf('\n', pos);
|
||||||
if (endPos == -1) endPos = modelsSection.length();
|
if(endPos == -1)
|
||||||
|
endPos = modelsSection.length();
|
||||||
QString currentLine = modelsSection.mid(pos, endPos - pos);
|
QString currentLine = modelsSection.mid(pos, endPos - pos);
|
||||||
if (!currentLine.contains(fileName)) {
|
if(!currentLine.contains(fileName)) {
|
||||||
currentLine += "," + fileName;
|
currentLine += "," + fileName;
|
||||||
modelsSection.replace(pos, endPos - pos, currentLine);
|
modelsSection.replace(pos, endPos - pos, currentLine);
|
||||||
}
|
}
|
||||||
|
|
@ -376,72 +342,13 @@ namespace WBFZ {
|
||||||
// 重建ini文件内容,确保只替换Models分组
|
// 重建ini文件内容,确保只替换Models分组
|
||||||
content.replace(modelsStartPos, modelsEndPos - modelsStartPos, modelsSection);
|
content.replace(modelsStartPos, modelsEndPos - modelsStartPos, modelsSection);
|
||||||
|
|
||||||
if (file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
|
if(file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
|
||||||
QTextStream out(&file);
|
QTextStream out(&file);
|
||||||
out.setCodec("UTF-8"); // 确保写入时使用UTF-8编码
|
out.setCodec("UTF-8"); // 确保写入时使用UTF-8编码
|
||||||
out << content;
|
out << content;
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 更新Names分组中的键名
|
|
||||||
iniFile.beginGroup("Names");
|
|
||||||
|
|
||||||
// 获取当前的值
|
|
||||||
QString newKey;
|
|
||||||
if (!matchedKey.isEmpty()) {
|
|
||||||
newKey = matchedKey + "," + baseName;
|
|
||||||
} else {
|
|
||||||
newKey = baseName;
|
|
||||||
}
|
|
||||||
qDebug()<<newKey;
|
|
||||||
iniFile.endGroup();
|
|
||||||
|
|
||||||
// 手动更新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();
|
|
||||||
|
|
||||||
// 查找Names分组的位置
|
|
||||||
int namesStartPos = content.indexOf("[Names]");
|
|
||||||
int namesEndPos = content.indexOf("[", namesStartPos + 1);
|
|
||||||
if (namesEndPos == -1) namesEndPos = content.length();
|
|
||||||
|
|
||||||
QString namesSection = content.mid(namesStartPos, namesEndPos - namesStartPos);
|
|
||||||
QString namesKey = matchedKey + "=";
|
|
||||||
int pos = namesSection.indexOf(namesKey);
|
|
||||||
|
|
||||||
if (pos != -1) {
|
|
||||||
// 找到现有键,更新其键名
|
|
||||||
int endPos = namesSection.indexOf('\n', pos);
|
|
||||||
if (endPos == -1) endPos = namesSection.length();
|
|
||||||
QString currentLine = namesSection.mid(pos, endPos - pos);
|
|
||||||
|
|
||||||
// 替换键名
|
|
||||||
QString newLine = newKey + currentLine.mid(matchedKey.length());
|
|
||||||
namesSection.replace(pos, endPos - pos, newLine);
|
|
||||||
} else {
|
|
||||||
// 添加新的键值对
|
|
||||||
namesSection += "\n" + newKey + "=" + chineseName + "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 重建ini文件内容,确保只替换Names分组
|
|
||||||
content.replace(namesStartPos, namesEndPos - namesStartPos, namesSection);
|
|
||||||
|
|
||||||
if (file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
|
|
||||||
QTextStream out(&file);
|
|
||||||
out.setCodec("UTF-8"); // 确保写入时使用UTF-8编码
|
|
||||||
out << content;
|
|
||||||
file.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//更新Deatail分组的内容
|
//更新Deatail分组的内容
|
||||||
iniFile.beginGroup("Detail");
|
iniFile.beginGroup("Detail");
|
||||||
iniFile.setValue(fileName, newFilePath);
|
iniFile.setValue(fileName, newFilePath);
|
||||||
|
|
@ -453,38 +360,35 @@ namespace WBFZ {
|
||||||
this->initLibrary();
|
this->initLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
// else{
|
//判断模型所属的类别不存在,需要新建Names分组
|
||||||
// QDir dir("D:\\WBFZCPP\\source\\LAMPCAE\\cmake-build-release\\Release\\model");
|
else{
|
||||||
// if (!dir.exists()) {
|
QDir dir("D:\\WBFZCPP\\source\\LAMPCAE\\cmake-build-release\\Release\\model"); // 改成相对路径
|
||||||
// dir.mkpath(".");
|
if (!dir.exists()) {
|
||||||
// }
|
dir.mkpath(".");
|
||||||
//
|
}
|
||||||
// QString newFilePath = dir.filePath(fileName);
|
|
||||||
// QFile::copy(filePath, newFilePath); //复制文件
|
QString newFilePath = dir.filePath(fileName);
|
||||||
// // if (!QFile::copy(filePath, newFilePath)) {
|
QFile::copy(filePath, newFilePath); //复制文件
|
||||||
// // QMessageBox::warning(this, tr("错误"), tr("加载模型文件失败"));
|
|
||||||
// // return;
|
// 确保写入INI文件时正确处理UTF-8编码
|
||||||
// // }
|
iniFile.beginGroup("Names");
|
||||||
//
|
iniFile.setValue(englishClass, chineseClass);
|
||||||
// // 确保写入INI文件时正确处理UTF-8编码
|
iniFile.endGroup();
|
||||||
// iniFile.beginGroup("Names");
|
|
||||||
// iniFile.setValue(baseName, chineseName);
|
iniFile.beginGroup("Models");
|
||||||
// iniFile.endGroup();
|
iniFile.setValue(englishClass, fileName);
|
||||||
//
|
iniFile.endGroup();
|
||||||
// iniFile.beginGroup("Models");
|
|
||||||
// iniFile.setValue(baseName, fileName);
|
iniFile.beginGroup("Detail");
|
||||||
// iniFile.endGroup();
|
iniFile.setValue(fileName, newFilePath);
|
||||||
//
|
iniFile.endGroup();
|
||||||
// iniFile.beginGroup("Detail");
|
|
||||||
// iniFile.setValue(fileName, newFilePath);
|
QMessageBox::information(this, tr("提示"), tr("模型文件加载成功"));
|
||||||
// iniFile.endGroup();
|
|
||||||
//
|
//更新comboBOX选项 与 listWidget内容
|
||||||
// QMessageBox::information(this, tr("提示"), tr("模型文件加载成功"));
|
this->initLibrary();
|
||||||
//
|
qDebug()<<"on_click_over";
|
||||||
// //更新comboBOX选项 与 listWidget内容
|
}
|
||||||
// this->initLibrary();
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,14 @@ namespace WBFZ {
|
||||||
// virtual void accept();
|
// virtual void accept();
|
||||||
void updateModellistWidget(const QString &filterStr); // 声明 updateModellistWidget 函数
|
void updateModellistWidget(const QString &filterStr); // 声明 updateModellistWidget 函数
|
||||||
void handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous);
|
void handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous);
|
||||||
|
void on_push_add_models_slot();
|
||||||
// void on_TestLoadModelImport();
|
// void on_TestLoadModelImport();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GUI::MainWindow* _mainwindow;
|
GUI::MainWindow* _mainwindow;
|
||||||
Ui::DialogImportModelDataset* ui;
|
Ui::DialogImportModelDataset* ui;
|
||||||
QString _librarySettingPath; // ini 配置环境地址
|
QString _librarySettingPath; // ini 配置环境地址
|
||||||
|
QMap<QString, QString> _categories; // 用于存储Names分组的数据
|
||||||
|
|
||||||
// 三维模型操作
|
// 三维模型操作
|
||||||
public: // 陈增辉
|
public: // 陈增辉
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1003</width>
|
<width>1003</width>
|
||||||
<height>805</height>
|
<height>846</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|
@ -105,16 +105,13 @@
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
</widget>
|
||||||
<property name="text">
|
|
||||||
<string>模型1</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
<widget class="QPushButton" name="Addmodel_pushButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>模型2</string>
|
<string>上传模型</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
@ -161,7 +158,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonBox</sender>
|
<sender>buttonBox</sender>
|
||||||
<signal>accepted()</signal>
|
<signal>accepted()</signal>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue