ccLabelingDlg.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #include "ccLabelingDlg.h"
  18. #include <DgmOctree.h>
  19. ccLabelingDlg::ccLabelingDlg(QWidget* parent/*=nullptr*/)
  20. : QDialog(parent, Qt::Tool)
  21. , Ui::LabelingDialog()
  22. {
  23. setupUi(this);
  24. octreeLevelSpinBox->setMaximum(CCCoreLib::DgmOctree::MAX_OCTREE_LEVEL);
  25. }
  26. int ccLabelingDlg::getOctreeLevel()
  27. {
  28. return octreeLevelSpinBox->value();
  29. }
  30. int ccLabelingDlg::getMinPointsNb()
  31. {
  32. return minPtsSpinBox->value();
  33. }
  34. bool ccLabelingDlg::randomColors()
  35. {
  36. return (randomColorsCheckBox->checkState() == Qt::Checked);
  37. }
  38. void ccLabelingDlg::setOctreeLevel(int octreeLevel)
  39. {
  40. octreeLevelSpinBox->setValue(octreeLevel);
  41. }
  42. void ccLabelingDlg::setMinPointsNb(int minPointsNb)
  43. {
  44. minPtsSpinBox->setValue(minPointsNb);
  45. }
  46. void ccLabelingDlg::setRandomColors(bool state)
  47. {
  48. randomColorsCheckBox->setChecked(state);
  49. }