12 #include "ui_G3PointDialog.h"
18 setAttribute(Qt::WA_DeleteOnClose,
true);
19 setWindowFlag(Qt::WindowStaysOnTopHint,
true);
20 setWindowTitle(
"G3Point");
21 ui->labelCloud->setText(cloudName);
23 connect(this->ui->spinBoxkNN, &QSpinBox::editingFinished,
this,
25 connect(this->ui->pushButtonSegment, &QPushButton::clicked,
this,
27 connect(this->ui->pushButtonClusterAndOrClean, &QPushButton::clicked,
this,
29 connect(this->ui->pushButtonGetBorders, &QPushButton::clicked,
this,
32 connect(this->ui->radioButtonAll, &QRadioButton::clicked,
this,
34 connect(this->ui->radioButtonOnlyOne, &QRadioButton::clicked,
this,
36 connect(this->ui->spinBoxOnlyOne, qOverload<int>(&QSpinBox::valueChanged),
39 connect(this->ui->pushButtonFit, &QPushButton::clicked,
this,
41 connect(this->ui->pushButtonExportResults, &QPushButton::clicked,
this,
43 connect(this->ui->pushButtonWolman, &QPushButton::clicked,
this,
45 connect(this->ui->pushButtonAngles, &QPushButton::clicked,
this,
47 connect(this->ui->checkBoxSurfaces, &QCheckBox::clicked,
this,
49 connect(this->ui->checkBoxWireframes, &QCheckBox::clicked,
this,
51 connect(this->ui->checkBoxPoints, &QCheckBox::clicked,
this,
53 connect(this->ui->spinBoxGLPointSize,
54 qOverload<int>(&QSpinBox::valueChanged),
this,
57 connect(this->ui->radioButtonOnlyOne, &QRadioButton::toggled,
this,
65 settings.beginGroup(
"G3Point");
68 int kNN = settings.value(
"kNN", 20).toInt();
69 this->ui->spinBoxkNN->setValue(kNN);
71 double radiusFactor = settings.value(
"radiusFactor", 0.6).toDouble();
72 this->ui->doubleSpinBoxRadiusFactor->setValue(radiusFactor);
74 double maxAngle1 = settings.value(
"maxAngle1", 60).toDouble();
75 this->ui->doubleSpinBoxRadiusFactor->setValue(maxAngle1);
77 int wolmanNbIter = settings.value(
"wolmanNbIter", 20).toInt();
78 this->ui->spinBoxWolmanNbIter->setValue(wolmanNbIter);
80 int anglesNbBins = settings.value(
"anglesNbBins", 10).toInt();
81 this->ui->spinBoxAnglesNbBins->setValue(anglesNbBins);
86 settings.beginGroup(
"G3Point");
89 settings.setValue(
"kNN", ui->spinBoxkNN->value());
91 settings.setValue(
"radiusFactor", ui->doubleSpinBoxRadiusFactor->value());
93 settings.setValue(
"maxAngle1", ui->doubleSpinBoxMaxAngle1->value());
95 settings.setValue(
"wolmanNbIter", ui->spinBoxWolmanNbIter->value());
97 settings.setValue(
"anglesNbBins", ui->spinBoxAnglesNbBins->value());
101 return this->ui->doubleSpinBoxMaxAngle1->value();
105 return this->ui->doubleSpinBoxMaxAngle2->value();
109 return this->ui->doubleSpinBoxMinFlatness->value();
117 return this->ui->spinBoxWolmanNbIter->value();
121 if (this->ui->radioButtonAutoNbBins->isChecked()) {
124 return this->ui->spinBoxAnglesNbBins->value();
129 return ui->doubleSpinBoxRadiusFactor->value();
133 return this->ui->radioButtonSteepestSlope->isChecked();
137 this->ui->groupBoxClusterAndOrClean->setEnabled(state);
141 return this->ui->checkBoxClustering->isChecked();
145 return this->ui->checkBoxCleaning->isChecked();
149 emit
allClicked(this->ui->radioButtonAll->isChecked());
154 this->ui->spinBoxOnlyOne->setMaximum(
max);
158 this->ui->checkBoxPoints->setEnabled(state);
159 this->ui->spinBoxGLPointSize->setEnabled(state);
void emitClusterAndOrClean()
void emitAllClicked(bool state)
G3PointDialog(QString cloudName, QWidget *parent=nullptr)
void enableClusterAndOrClean(bool state)
void emitOnlyOneClicked(bool state)
void enableDrawPointsForOnlyOneGrain(bool state)
void emitGLPointSizeChanged(int size)
void emitDrawLines(bool state)
void onlyOneChanged(int idx)
void emitDrawSurfaces(bool state)
void allClicked(bool state)
void setOnlyOneMax(int idx)
void emitOnlyOneChanged(int idx)
void emitDrawPoints(bool state)