ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvOrthoSectionGenerationDlg.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
9 
10 // system
11 #include <cmath>
12 
14  : QDialog(parent, Qt::Tool),
15  Ui::OrthoSectionGenerationDlg(),
16  m_pathLength(0) {
17  setupUi(this);
18 
19  connect(stepDoubleSpinBox,
20  static_cast<void (QDoubleSpinBox::*)(double)>(
21  &QDoubleSpinBox::valueChanged),
23 }
24 
26  m_pathLength = l;
27  pathLengthLineEdit->setText(QString::number(l));
28  stepDoubleSpinBox->setValue(l / 9);
29  widthDoubleSpinBox->setValue(l / 5);
30 }
31 
33  autoSaveAndRemoveCheckBox->setChecked(state);
34 }
35 
37  return autoSaveAndRemoveCheckBox->isChecked();
38 }
39 
41  stepDoubleSpinBox->setValue(s);
42 }
43 
45  widthDoubleSpinBox->setValue(w);
46 }
47 
49  return stepDoubleSpinBox->value();
50 }
51 
53  return widthDoubleSpinBox->value();
54 }
55 
57  if (step < 0) return;
58 
59  unsigned count = step < 1.0e-6 ? 1
60  : 1 + static_cast<unsigned>(std::floor(
61  m_pathLength / step));
62  sectionCountLineEdit->setText(QString::number(count));
63 }
int count
void setAutoSaveAndRemove(bool state)
Sets whether the generatrix should be automatically saved and removed.
bool autoSaveAndRemove() const
Returns whether the generatrix should be automatically saved and removed.
void setSectionsWidth(double w)
Sets he sections width.
double getGenerationStep() const
Returns the generation step.
double getSectionsWidth() const
Returns the sections width.
void setGenerationStep(double s)
Sets the generation step.
void setPathLength(double l)
Sets the path legnth.
ccOrthoSectionGenerationDlg(QWidget *parent=0)
Default constructor.
MiniVec< float, N > floor(const MiniVec< float, N > &a)
Definition: MiniVec.h:75