ccOctreeSpinBox.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifndef CC_OCTREE_SPIN_BOX_HEADER
  18. #define CC_OCTREE_SPIN_BOX_HEADER
  19. //Local
  20. #include "qCC_db.h"
  21. //CCCoreLib
  22. #include <DgmOctree.h>
  23. //Qt
  24. #include <QSpinBox>
  25. class ccGenericPointCloud;
  26. //! Octree level editor dialog
  27. class QCC_DB_LIB_API ccOctreeSpinBox : public QSpinBox
  28. {
  29. Q_OBJECT
  30. public:
  31. //! Default constructor
  32. explicit ccOctreeSpinBox(QWidget* parent = nullptr);
  33. //! Inits the dialog with a cloud (on which the octree has been or will be computed)
  34. /** Alternative to ccOctreeSpinBox::setOctree
  35. **/
  36. void setCloud(ccGenericPointCloud* cloud);
  37. //! Inits the dialog with an octree
  38. /** Alternative to ccOctreeSpinBox::setCloud
  39. **/
  40. void setOctree(CCCoreLib::DgmOctree* octree);
  41. protected:
  42. //! Called each time the spinbox value changes
  43. void onValueChange(int);
  44. protected:
  45. //! Corresponding octree base size
  46. double m_octreeBoxWidth;
  47. };
  48. #endif //CC_OCTREE_SPIN_BOX_HEADER