Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EntityGUI_SubShapeDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File : EntityGUI_SubShapeDlg.h
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26 
27 #ifndef ENTITYGUI_SUBSHAPEDLG_H
28 #define ENTITYGUI_SUBSHAPEDLG_H
29 
30 #include <GEOMBase_Skeleton.h>
31 
32 #include <TColStd_IndexedMapOfInteger.hxx>
33 
34 class QCheckBox;
35 class QComboBox;
36 class QGroupBox;
37 class QPushButton;
38 class SalomeApp_DoubleSpinBox;
40 
41 //=================================================================================
42 // class : EntityGUI_SubShapeDlg
43 // purpose :
44 //=================================================================================
46 {
47  Q_OBJECT
48 
49 public:
50  EntityGUI_SubShapeDlg (GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0);
52 
53 protected:
54  // redefined from GEOMBase_Helper
55  virtual GEOM::GEOM_IOperations_ptr createOperation();
56  virtual bool isValid (QString&);
57  virtual bool execute (ObjectList&);
58  virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
59  virtual QString getNewObjectName (int CurrObj = -1) const;
60  virtual QList<GEOM::GeomObjPtr> getSourceObjects();
61 
62  void closeEvent (QCloseEvent*);
63 
64 private slots:
65  void ClickOnOk();
66  bool ClickOnApply();
67  void ActivateThisDialog();
68  void LineEditReturnPressed();
69  void SelectionIntoArgument();
71  void SubShapeToggled();
72  void ComboTextChanged();
73 
74  void showOnlySelected();
75  void ClickOnOkFilter();
76 #ifndef DISABLE_PLOT2DVIEWER
77  void ClickOnPlot();
78 #endif
79  void MeasureToggled();
80 
81 private:
82  void Init();
83  void enterEvent (QEvent*);
84 
85  void ResetStateOfDialog();
86 
87  void activateSelection();
88  int getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex);
89  void updateButtonState();
90  bool isAllSubShapes() const;
91  int shapeType() const;
92 
93 private:
94  TopoDS_Shape myShape;
95  GEOM::GEOM_Object_var myObject;
96  int myDmMode;
97 
99 
101  QCheckBox* myLessFilterCheck;
103  QComboBox* myLessFilterCombo;
105  SalomeApp_DoubleSpinBox* myLessFilterSpin;
106  SalomeApp_DoubleSpinBox* myGreaterFilterSpin;
107  QPushButton* myApplyFilterButton;
110 };
111 
112 #endif // ENTITYGUI_SUBSHAPEDLG_H