sfEditDlg.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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_SF_EDIT_DIALOG_HEADER
  18. #define CC_SF_EDIT_DIALOG_HEADER
  19. //Qt
  20. #include <QWidget>
  21. class ccScalarField;
  22. class ccHistogramWindow;
  23. namespace Ui {
  24. class SFEditDlg;
  25. }
  26. //! GUI scalar field interactor for properties list dialog
  27. class sfEditDlg : public QWidget
  28. {
  29. Q_OBJECT
  30. public:
  31. //! Default constructor
  32. explicit sfEditDlg(QWidget* parent = nullptr);
  33. ~sfEditDlg();
  34. //! Updates dialog with a given scalar field
  35. void fillDialogWith(ccScalarField* sf);
  36. public:
  37. void minValSBChanged(double);
  38. void maxValSBChanged(double);
  39. void minSatSBChanged(double);
  40. void maxSatSBChanged(double);
  41. void minValHistoChanged(double);
  42. void maxValHistoChanged(double);
  43. void minSatHistoChanged(double);
  44. void maxSatHistoChanged(double);
  45. void nanInGrayChanged(bool);
  46. void alwaysShow0Changed(bool);
  47. void symmetricalScaleChanged(bool);
  48. void logScaleChanged(bool);
  49. Q_SIGNALS:
  50. //! Signal emitted when the SF display parameters have changed
  51. void entitySFHasChanged();
  52. protected:
  53. //conversionb between sliders (integer) and checkbox (double) values
  54. double dispSpin2slider(double val) const;
  55. double satSpin2slider(double val) const;
  56. double dispSlider2spin(int pos) const;
  57. double satSlider2spin(int pos) const;
  58. //! Associated scalar field
  59. ccScalarField* m_associatedSF;
  60. //! Associated scalar field histogram
  61. ccHistogramWindow* m_associatedSFHisto;
  62. Ui::SFEditDlg* m_ui;
  63. };
  64. #endif //CC_SF_EDIT_DIALOG_HEADER