14 : QDialog(parent),
Ui::UnrollDialog() {
17 connect(checkBoxAuto, &QCheckBox::stateChanged,
this,
19 connect(comboBoxUnrollShapeType,
20 static_cast<void (QComboBox::*)(
int)
>(
21 &QComboBox::currentIndexChanged),
23 connect(comboBoxAxisDimension,
24 static_cast<void (QComboBox::*)(
int)
>(
25 &QComboBox::currentIndexChanged),
28 checkBoxAuto->setChecked(
true);
36 comboBoxUnrollShapeType->currentIndex());
40 return comboBoxAxisDimension->currentIndex();
44 return (checkBoxAuto->checkState() == Qt::Checked);
48 start_deg = startAngleDoubleSpinBox->value();
49 stop_deg = stopAngleDoubleSpinBox->value();
62 return halfAngleDoubleSpinBox->value();
66 return exportDeviationSFCheckBox->isChecked();
73 angleFrame->setVisible(
false);
74 autoCenterFrame->setVisible(
true);
75 radiusFrame->setVisible(
true);
76 groupBoxAxisPosition->setTitle(
"Axis position");
77 radiusLabel->setText(
"Radius");
82 angleFrame->setVisible(
true);
83 autoCenterFrame->setVisible(
false);
84 radiusFrame->setVisible(
false);
85 radiusLabel->setText(
"Base radius");
86 groupBoxAxisPosition->setTitle(
"Cone apex");
89 doubleSpinBoxAxisX->setDisabled(
false);
90 doubleSpinBoxAxisY->setDisabled(
false);
91 doubleSpinBoxAxisZ->setDisabled(
false);
97 angleFrame->setVisible(
true);
98 radiusFrame->setVisible(
true);
99 autoCenterFrame->setVisible(
false);
100 groupBoxAxisPosition->setTitle(
"Cone apex");
103 doubleSpinBoxAxisX->setDisabled(
false);
104 doubleSpinBoxAxisY->setDisabled(
false);
105 doubleSpinBoxAxisZ->setDisabled(
false);
111 if (checkState == Qt::Unchecked) {
112 axisFrame->setEnabled(
true);
115 axisFrame->setEnabled(
false);
121 if (comboBoxUnrollShapeType->currentIndex() != 0 ||
122 checkBoxAuto->checkState() == Qt::Checked) {
127 doubleSpinBoxAxisX->setDisabled(index == 0);
128 doubleSpinBoxAxisY->setDisabled(index == 1);
129 doubleSpinBoxAxisZ->setDisabled(index == 2);
139 settings.beginGroup(
"Unroll");
141 settings.setValue(
"shapeType", comboBoxUnrollShapeType->currentIndex());
142 settings.setValue(
"axisDimension",
143 comboBoxAxisDimension->currentIndex());
144 settings.setValue(
"angle", halfAngleDoubleSpinBox->value());
145 settings.setValue(
"radius", radiusDoubleSpinBox->value());
146 settings.setValue(
"autoCenter", checkBoxAuto->isChecked());
147 settings.setValue(
"exportDeviationSF",
148 exportDeviationSFCheckBox->isChecked());
162 settings.beginGroup(
"Unroll");
164 int shapeType = settings.value(
"shapeType",
165 comboBoxUnrollShapeType->currentIndex())
167 int axisDim = settings.value(
"axisDimension",
168 comboBoxAxisDimension->currentIndex())
170 double angle = settings.value(
"angle", halfAngleDoubleSpinBox->value())
172 double radius = settings.value(
"radius", radiusDoubleSpinBox->value())
175 settings.value(
"autoCenter", checkBoxAuto->isChecked())
178 settings.value(
"exportDeviationSF",
179 exportDeviationSFCheckBox->isChecked())
182 comboBoxUnrollShapeType->setCurrentIndex(shapeType);
183 comboBoxAxisDimension->setCurrentIndex(axisDim);
184 halfAngleDoubleSpinBox->setValue(angle);
185 radiusDoubleSpinBox->setValue(radius);
186 checkBoxAuto->setChecked(autoCenter);
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
float PointCoordinateType
Type of the coordinates of a (N-D) point.
CCVector3 getAxisPosition() const
double getConeHalfAngle() const
void shapeTypeChanged(int index)
bool isAxisPositionAuto() const
void axisDimensionChanged(int index)
void toPersistentSettings() const
ccPointCloud::UnrollMode getType() const
int getAxisDimension() const
ccUnrollDlg(QWidget *parent=0)
Default constructor.
bool exportDeviationSF() const
void fromPersistentSettings()
void getAngleRange(double &start_deg, double &stop_deg) const
void axisAutoStateChanged(int checkState)
static CCVector3d s_axisCenter(0, 0, 0)
static double s_startAngle_deg
static double s_stopAngle_deg