ccSelectChildrenDlg.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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_SELECT_CHILDREN_DLG_HEADER
  18. #define CC_SELECT_CHILDREN_DLG_HEADER
  19. //Qt
  20. #include <QDialog>
  21. //qCC_db
  22. #include <ccObject.h>
  23. namespace Ui {
  24. class SelectChildrenDialog;
  25. }
  26. //! Minimal dialog to pick one element in a list (combo box)
  27. class ccSelectChildrenDlg : public QDialog
  28. {
  29. Q_OBJECT
  30. public:
  31. //! Default constructor
  32. explicit ccSelectChildrenDlg(QWidget* parent = nullptr);
  33. ~ccSelectChildrenDlg() override;
  34. //! Add an element to the 'type' combo box
  35. void addType(QString typeName, CC_CLASS_ENUM type);
  36. //! Returns the selected type
  37. CC_CLASS_ENUM getSelectedType();
  38. //! Returns the selected name (if any)
  39. QString getSelectedName();
  40. //! Returns the state of the strict type checkbox
  41. bool getStrictMatchState() const;
  42. //! if the type checkbox is checked the children are filtered
  43. //! before checking the name for matches
  44. bool getTypeIsUsed() const;
  45. //! if the name must be considered as regex
  46. bool getNameIsRegex() const;
  47. //! if performing name-match (regex or not)
  48. bool getNameMatchIsUsed() const;
  49. protected:
  50. //! Called when the dialog is accepted
  51. void onAccept();
  52. private:
  53. Ui::SelectChildrenDialog *mUI;
  54. };
  55. #endif //CC_SELECT_CHILDREN_DLG_HEADER