ccPlaneEditDlg.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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: SAGE INGENIERIE #
  15. //# #
  16. //##########################################################################
  17. #ifndef CC_PLANE_EDIT_DLG_HEADER
  18. #define CC_PLANE_EDIT_DLG_HEADER
  19. //Local
  20. #include <ui_planeEditDlg.h>
  21. #include "ccPickingListener.h"
  22. //CCCoreLib
  23. #include <CCGeom.h>
  24. //Qt
  25. #include <QDialog>
  26. class ccGLWindowInterface;
  27. class ccPlane;
  28. class ccHObject;
  29. class ccPickingHub;
  30. //! Dialog to create (or edit the parameters) of a plane
  31. class ccPlaneEditDlg : public QDialog, public ccPickingListener, public Ui::PlaneEditDlg
  32. {
  33. Q_OBJECT
  34. public:
  35. //! Default constructor
  36. explicit ccPlaneEditDlg(ccPickingHub* pickingHub, QWidget* parent);
  37. //! Destructor
  38. virtual ~ccPlaneEditDlg();
  39. //! Links this dialog with an existing plane
  40. void initWithPlane(ccPlane* plane);
  41. //! Updates a plane with the current parameters
  42. void updatePlane(ccPlane* plane);
  43. //! Inherited from ccPickingListener
  44. virtual void onItemPicked(const PickedItem& pi);
  45. public:
  46. void pickPointAsCenter(bool);
  47. void onDipDirChanged(double);
  48. void onDipDirModified(bool);
  49. void onNormalChanged(double);
  50. protected:
  51. void saveParamsAndAccept();
  52. protected: //members
  53. //! Picking window (if any)
  54. ccGLWindowInterface* m_pickingWin;
  55. //! Associated plane (if any)
  56. ccPlane* m_associatedPlane;
  57. //! Picking hub
  58. ccPickingHub* m_pickingHub;
  59. };
  60. #endif