ccDisplaySettingsDlg.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. #include "CCAppCommon.h"
  19. //Local
  20. #include "ccOptions.h"
  21. //qCC_gl
  22. #include <ccGuiParameters.h>
  23. //Qt
  24. #include <QDialog>
  25. namespace Ui
  26. {
  27. class DisplaySettingsDlg;
  28. }
  29. //! Dialog to setup display settings
  30. class CCAPPCOMMON_LIB_API ccDisplaySettingsDlg : public QDialog
  31. {
  32. Q_OBJECT
  33. public:
  34. explicit ccDisplaySettingsDlg(QWidget* parent);
  35. ~ccDisplaySettingsDlg() override;
  36. Q_SIGNALS:
  37. void aspectHasChanged();
  38. protected:
  39. void changeLightDiffuseColor();
  40. void changeLightAmbientColor();
  41. void changeLightSpecularColor();
  42. void changeMeshFrontDiffuseColor();
  43. void changeMeshBackDiffuseColor();
  44. void changeMeshSpecularColor();
  45. void changePointsColor();
  46. void changeBBColor();
  47. void changeTextColor();
  48. void changeBackgroundColor();
  49. void changeLabelBackgroundColor();
  50. void changeLabelMarkerColor();
  51. void changeMaxMeshSize(double);
  52. void changeMaxCloudSize(double);
  53. void changeVBOUsage();
  54. void changeColorScaleRampWidth(int);
  55. void changePickingCursor(int);
  56. void changeLogVerbosity(int);
  57. void changeDefaultFontSize(int);
  58. void changeLabelFontSize(int);
  59. void changeNumberPrecision(int);
  60. void changeLabelOpacity(int);
  61. void changeLabelMarkerSize(int);
  62. void changeZoomSpeed(double);
  63. void changeAutoComputeOctreeOption(int);
  64. void doAccept();
  65. void doReject();
  66. void apply();
  67. void reset();
  68. protected:
  69. //! Refreshes dialog to reflect new parameters values
  70. void refresh();
  71. // Colors
  72. QColor m_lightDiffuseColor;
  73. QColor m_lightAmbientColor;
  74. QColor m_lightSpecularColor;
  75. QColor m_meshFrontDiff;
  76. QColor m_meshBackDiff;
  77. QColor m_meshSpecularColor;
  78. QColor m_pointsDefaultCol;
  79. QColor m_textDefaultCol;
  80. QColor m_backgroundCol;
  81. QColor m_labelBackgroundCol;
  82. QColor m_labelMarkerCol;
  83. QColor m_bbDefaultCol;
  84. //! Current GUI parameters
  85. ccGui::ParamStruct m_parameters;
  86. //! Current options
  87. ccOptions m_options;
  88. //! Old parameters (for restore)
  89. ccGui::ParamStruct m_oldParameters;
  90. //! Old options (for restore)
  91. ccOptions m_oldOptions;
  92. //! Default style (active when the dialog was first shown)
  93. int m_defaultAppStyleIndex;
  94. private:
  95. Ui::DisplaySettingsDlg* m_ui;
  96. };