ccSmoothPolylineDlg.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  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. //# COPYRIGHT: CloudCompare project #
  15. //# #
  16. //##########################################################################
  17. #include "ccSmoothPolylineDlg.h"
  18. //ui
  19. #include <ui_smoothPolylineDlg.h>
  20. //Qt
  21. #include <QDialog>
  22. ccSmoothPolylineDialog::ccSmoothPolylineDialog(QWidget* parent/*=nullptr*/)
  23. : QDialog(parent, Qt::Tool)
  24. , m_ui(new Ui_SmoothPolylineDialog)
  25. {
  26. m_ui->setupUi(this);
  27. }
  28. ccSmoothPolylineDialog::~ccSmoothPolylineDialog()
  29. {
  30. if (m_ui)
  31. {
  32. delete m_ui;
  33. m_ui = nullptr;
  34. }
  35. }
  36. void ccSmoothPolylineDialog::setIerationCount(int count)
  37. {
  38. m_ui->iterationSpinBox->setValue(count);
  39. }
  40. void ccSmoothPolylineDialog::setRatio(double ratio)
  41. {
  42. m_ui->ratioDoubleSpinBox->setValue(ratio);
  43. }
  44. int ccSmoothPolylineDialog::getIerationCount() const
  45. {
  46. return m_ui->iterationSpinBox->value();
  47. }
  48. double ccSmoothPolylineDialog::getRatio() const
  49. {
  50. return m_ui->ratioDoubleSpinBox->value();
  51. }