20 #include <QMainWindow>
31 if (
name.isEmpty())
name =
"unnamed";
38 assert(comboBox && dbRoot);
39 if (!comboBox || !dbRoot) {
45 int index = comboBox->currentIndex();
50 assert(comboBox->itemData(index).isValid());
51 unsigned uniqueID = comboBox->itemData(index).toUInt();
57 return static_cast<ccMesh*
>(item);
65 : QDialog(app ? app->getMainWindow() : nullptr),
72 connect(showMesh1CheckBox, &QAbstractButton::toggled,
this,
74 connect(showMesh2CheckBox, &QAbstractButton::toggled,
this,
77 connect(swapMeshesToolButton, &QAbstractButton::clicked,
this,
88 if (!mesh1 || !mesh2) {
98 showMesh1CheckBox->blockSignals(
true);
99 showMesh1CheckBox->setChecked(mesh1->
isVisible());
100 showMesh1CheckBox->blockSignals(
false);
104 showMesh2CheckBox->blockSignals(
true);
105 showMesh2CheckBox->setChecked(mesh2->
isVisible());
106 showMesh2CheckBox->blockSignals(
false);
136 double voxelSize = voxelSizeDoubleSpinBox->value();
141 double azimuth = azDoubleSpinBox->value();
146 return exportCheckBox->isChecked();
150 return lossCheckBox->isChecked();
154 return QThread::idealThreadCount();
158 QSettings settings(
"qVoxFall");
165 settings.value(
"VoxelSize", voxelSizeDoubleSpinBox->value())
168 settings.value(
"Azimuth", azDoubleSpinBox->value()).toDouble();
169 bool exportMeshesEnabled =
170 settings.value(
"ExportMeshesEnabled", exportCheckBox->isChecked())
172 bool lossGainEnabled =
173 settings.value(
"LossGainEnabled", lossCheckBox->isChecked())
177 voxelSizeDoubleSpinBox->setValue(voxelSize);
178 azDoubleSpinBox->setValue(azimuth);
179 exportCheckBox->setChecked(exportMeshesEnabled);
180 lossCheckBox->setChecked(lossGainEnabled);
184 QSettings settings(
"qVoxFall");
190 settings.setValue(
"VoxelSize", voxelSizeDoubleSpinBox->value());
191 settings.setValue(
"Azimuth", azDoubleSpinBox->value());
192 settings.setValue(
"ExportMeshesEnabled", exportCheckBox->isChecked());
193 settings.setValue(
"LossGainEnabled", lossCheckBox->isChecked());
virtual bool isVisible() const
Returns whether entity is visible or not.
virtual void setVisible(bool state)
Sets entity visibility.
virtual void setRedraw(bool state)
Sets entity redraw mode.
Hierarchical CLOUDVIEWER Object.
ccHObject * find(unsigned uniqueID)
Finds an entity in this object hierarchy.
virtual QString getName() const
Returns object name.
virtual unsigned getUniqueID() const
Returns object unique ID.
bool isA(CV_CLASS_ENUM type) const
Main application interface (for plugins)
virtual void updateUI()=0
virtual void refreshAll(bool only2D=false, bool forceRedraw=true)=0
Redraws all GL windows that have the 'refresh' flag on.
void setMesh1Visibility(bool)
void loadParamsFromPersistentSettings()
void setMeshes(ccMesh *mesh1, ccMesh *mesh2)
Sets meshes.
void saveParamsToPersistentSettings()
bool getExportMeshesActivation() const
Returns whether the blocks will be exported as meshes.
void loadParamsFrom(const QSettings &settings)
bool getLossGainActivation() const
Labels the blocks as loss or gain clusters.
void saveParamsTo(QSettings &settings)
double getVoxelSize() const
Returns voxel size.
ecvMainAppInterface * m_app
void setMesh2Visibility(bool)
int getMaxThreadCount() const
Returns the max number of threads to use.
qVoxFallDialog(ccMesh *mesh1, ccMesh *mesh2, ecvMainAppInterface *app)
Default constructor.
double getAzimuth() const
Returns slope azimuth.
static ccMesh * GetMeshFromCombo(QComboBox *comboBox, ccHObject *dbRoot)
static QString GetEntityName(ccHObject *obj)