| 1 |
//########################################################################## |
| 2 |
//# # |
| 3 |
//# CLOUDCOMPARE PLUGIN: qAutoSeg # |
| 4 |
//# # |
| 5 |
//# This program is free software; you can redistribute it and/or modify # |
| 6 |
//# it under the terms of the GNU General Public License as published by # |
| 7 |
//# the Free Software Foundation; version 2 or later of the License. # |
| 8 |
//# # |
| 9 |
//# This program is distributed in the hope that it will be useful, # |
| 10 |
//# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 11 |
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 12 |
//# GNU General Public License for more details. # |
| 13 |
//# # |
| 14 |
//# Cyberbuild,2020 # |
| 15 |
//# v1.2 # |
| 16 |
//# # |
| 17 |
//# # |
| 18 |
//########################################################################## |
| 19 |
|
| 20 |
#include "profileImportDlg.h" |
| 21 |
|
| 22 |
//Qt |
| 23 |
#include <QFileDialog> |
| 24 |
|
| 25 |
//System |
| 26 |
#include <assert.h> |
| 27 |
|
| 28 |
static double s_joints = 4; //Estimated mortar joints width in cm |
| 29 |
|
| 30 |
static double s_horizontal = 3; //Segmentation window in metres (X axis) |
| 31 |
static double s_vertical = 2; //Segmentation window in metres (Z axis) |
| 32 |
|
| 33 |
|
| 34 |
ProfileImportDlg::ProfileImportDlg(QWidget* parent) |
| 35 |
: QDialog(parent, Qt::Tool) |
| 36 |
, Ui::ProfileImportDlg() |
| 37 |
{ |
| 38 |
setupUi(this); |
| 39 |
|
| 40 |
connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveSettings)); |
| 41 |
jointsSpinBox->setValue(s_joints); |
| 42 |
segmentHSpinBox->setValue(s_horizontal); |
| 43 |
segmentVSpinBox->setValue(s_vertical); |
| 44 |
alignmentCheckBox->setChecked(true); |
| 45 |
alignmentCheckBox->setDisabled(true); |
| 46 |
this->setWindowTitle("Automatic Segmentation plugin"); |
| 47 |
|
| 48 |
} |
| 49 |
|
| 50 |
void ProfileImportDlg::saveSettings() { |
| 51 |
s_joints = jointsSpinBox->value(); |
| 52 |
s_horizontal = segmentHSpinBox->value(); |
| 53 |
s_vertical = segmentVSpinBox->value(); |
| 54 |
} |
| 55 |
|