ccEnvelopeExtractorDlg.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #pragma once
  2. //##########################################################################
  3. //# #
  4. //# CLOUDCOMPARE #
  5. //# #
  6. //# This program is free software; you can redistribute it and/or modify #
  7. //# it under the terms of the GNU General Public License as published by #
  8. //# the Free Software Foundation; version 2 or later of the License. #
  9. //# #
  10. //# This program is distributed in the hope that it will be useful, #
  11. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  12. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  13. //# GNU General Public License for more details. #
  14. //# #
  15. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  16. //# #
  17. //##########################################################################
  18. //Qt
  19. #include <QDialog>
  20. #include <QEventLoop>
  21. //qCC_db
  22. #include <ccBBox.h>
  23. //GUI
  24. #include <ui_envelopeExtractorDlg.h>
  25. class ccGLWindowInterface;
  26. class ccHObject;
  27. //! Dialog for debugging envelope extraction
  28. class ccEnvelopeExtractorDlg : public QDialog, public Ui::EnvelopeExtractorDlg
  29. {
  30. Q_OBJECT
  31. public:
  32. //! Default constructor
  33. explicit ccEnvelopeExtractorDlg(QWidget* parent = nullptr);
  34. //! Initializes the display
  35. void init();
  36. //! Display a new message
  37. void displayMessage(QString message, bool waitForUserConfirmation = false);
  38. //! Waits for user action
  39. void waitForUser(unsigned defaultDelay_ms = 100);
  40. //! Returns associated GL window
  41. inline ccGLWindowInterface* win() { return m_glWindow; }
  42. //! Zooms on a given 2D region (3D bouding-box considered in 2D only)
  43. void zoomOn(const ccBBox& bbox);
  44. //! Forces refresh
  45. void refresh();
  46. //! Adds an entity to the (2D/3D) display
  47. void addToDisplay(ccHObject* obj, bool noDependency = true);
  48. //! Removes an entity from the (2D/3D) display
  49. void removFromDisplay(ccHObject* obj);
  50. //! Returns whether the dialog has been 'skipped' or not
  51. bool isSkipped() const;
  52. protected:
  53. //! When the skip button is clicked
  54. void onSkipButtonClicked();
  55. protected:
  56. //! Skip flag
  57. bool m_skipped;
  58. //! Local event loop
  59. QEventLoop m_loop;
  60. //! Associated 3D window
  61. ccGLWindowInterface* m_glWindow;
  62. };