1 // Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File : GroupGUI_GroupDlg.h
25 // Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
27 #ifndef GROUPGUI_GROUPDLG_H
28 #define GROUPGUI_GROUPDLG_H
30 #include <GEOMBase_Skeleton.h>
32 #include <TopAbs_ShapeEnum.hxx>
33 #include <TColStd_DataMapOfIntegerInteger.hxx>
34 #include <TColStd_IndexedMapOfInteger.hxx>
43 class SalomeApp_DoubleSpinBox;
45 //=================================================================================
46 // class : GroupGUI_GroupDlg
48 //=================================================================================
49 class GroupGUI_GroupDlg : public GEOMBase_Skeleton
59 GroupGUI_GroupDlg (Mode mode, GeometryGUI*, QWidget* parent = 0);
63 // redefined from GEOMBase_Helper
64 virtual GEOM::GEOM_IOperations_ptr createOperation();
65 virtual bool isValid (QString&);
66 virtual bool execute (ObjectList&);
67 virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
68 virtual QList<GEOM::GeomObjPtr> getSourceObjects();
70 void closeEvent (QCloseEvent*);
75 void ActivateThisDialog();
76 void SelectionIntoArgument();
77 void SetEditCurrentArgument();
78 void ConstructorsClicked(int);
80 void selectAllSubShapes();
83 void showOnlySelected();
84 void selectionChanged();
85 void ClickOnOkFilter();
86 #ifndef DISABLE_PLOT2DVIEWER
89 void MeasureToggled();
93 void enterEvent (QEvent*);
95 int subSelectionWay() const;
96 TopAbs_ShapeEnum getShapeType() const;
97 void setShapeType (const TopAbs_ShapeEnum);
98 void activateSelection();
99 void updateState (bool isAdd = false);
100 void highlightSubShapes();
102 void setInPlaceObj (GEOM::GEOM_Object_var, const bool isVisible=1);
103 int getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex);
110 bool myWasHiddenMain;
111 GEOM::GEOM_Object_var myMainObj;
112 GEOM::GEOM_Object_var myGroup;
113 GEOM::GEOM_Object_var myInPlaceObj;
114 int myInPlaceObjSelectState;
115 TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices;
116 QList<int> myGroupIdList;
120 QPushButton* mySelBtn;
121 QLineEdit* myMainName;
122 QPushButton* mySelBtn2;
123 QLineEdit* myShape2Name;
124 QGroupBox* myRestrictGroupBox;
125 QButtonGroup* myRestrictGroup;
126 QPushButton* mySelAllBtn;
127 QPushButton* myAddBtn;
128 QPushButton* myRemBtn;
129 QPushButton* myShowOnlyBtn;
130 QPushButton* myHideSelBtn;
131 QPushButton* myShowAllBtn;
132 QListWidget* myIdList;
133 QCheckBox* myLessFilterCheck;
134 QCheckBox* myGreaterFilterCheck;
135 QComboBox* myLessFilterCombo;
136 QComboBox* myGreaterFilterCombo;
137 SalomeApp_DoubleSpinBox* myLessFilterSpin;
138 SalomeApp_DoubleSpinBox* myGreaterFilterSpin;
139 QPushButton* myApplyFilterButton;
140 QPushButton* myPlotDistributionButton;
141 QGroupBox* myFilterGrp;