12 #include "ui_DialogDecompressionValence1.h"
14 #include <QFileDialog>
26 ui->verticalLayout->addWidget(
helpButton, 0, Qt::AlignRight);
29 link =
"https://liris.cnrs.fr/mepp/doc/nightly/_filter_decompression_valence.html";
36 const std::string &p3dFilePath,
39 bool write_intermediate_meshes,
40 bool display_intermediate_meshes)
42 Qt::CheckState write_info_state =
43 write_info ? Qt::CheckState::Checked : Qt::CheckState::Unchecked;
44 Qt::CheckState write_intermediate_meshes_state =
45 write_intermediate_meshes ? Qt::CheckState::Checked
46 : Qt::CheckState::Unchecked;
47 Qt::CheckState display_intermediate_meshes_state =
48 display_intermediate_meshes ? Qt::CheckState::Checked
49 : Qt::CheckState::Unchecked;
51 ui->p3dFilePath->setText(QString::fromStdString(p3dFilePath));
52 ui->stop_level->setText(QString::number(stop_level));
53 ui->write_information->setCheckState(write_info_state);
54 ui->write_intermediate_meshes->setCheckState(write_intermediate_meshes_state);
55 ui->display_intermediate_meshes->setCheckState(
56 display_intermediate_meshes_state);
61 std::string &p3dFilePath,
64 bool &write_intermediate_meshes,
65 bool &display_intermediate_meshes)
67 p3dFilePath = ui->p3dFilePath->text().toStdString();
69 if(p3dFilePath.front() ==
'"' && p3dFilePath.back() ==
'"')
71 p3dFilePath.pop_back();
72 p3dFilePath.erase(0, 1);
76 std::replace(p3dFilePath.begin(), p3dFilePath.end(),
'\\',
'/');
79 stop_level = ui->stop_level->text().toInt();
80 write_info = ui->write_information->isChecked();
81 write_intermediate_meshes = ui->write_intermediate_meshes->isChecked();
82 display_intermediate_meshes = ui->display_intermediate_meshes->isChecked();
89 QFileDialog::getOpenFileName(
this,
91 ui->p3dFilePath->text(),
92 tr(
"P3D files (*.p3d);;All files (*)"),
94 QFileDialog::DontUseNativeDialog);
96 if(!filename.isEmpty())
97 ui->p3dFilePath->setText(filename);