1 // Copyright (C) 2007-2013 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.
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 : EntityGUI_FieldDlg.h
26 #ifndef EntityGUI_FieldDlg_H
27 #define EntityGUI_FieldDlg_H
29 #include <GEOMBase_Skeleton.h>
31 #include <TopAbs_ShapeEnum.hxx>
32 #include <TColStd_DataMapOfIntegerInteger.hxx>
33 #include <TColStd_IndexedMapOfInteger.hxx>
34 #include <TopTools_IndexedMapOfShape.hxx>
44 class SalomeApp_IntSpinBox;
46 //=================================================================================
47 // class : EntityGUI_FieldDlg
49 //=================================================================================
50 class EntityGUI_FieldDlg : public GEOMBase_Skeleton
62 EntityGUI_FieldDlg (GeometryGUI* theGeometryGUI,
63 GEOM::GEOM_Field_ptr theField, int stepID=0,
65 bool modal=false, Qt::WindowFlags fl=0);
66 ~EntityGUI_FieldDlg();
69 // redefined from GEOMBase_Helper
70 virtual GEOM::GEOM_IOperations_ptr createOperation();
71 virtual bool isValid (QString&);
72 virtual bool execute ();
77 void ActivateThisDialog();
78 void SelectionIntoArgument();
79 void SetEditCurrentArgument();
88 void onNbCompsChange();
90 void highlightSubShapes();
94 void enterEvent (QEvent*);
95 void activateSelection();
97 TopAbs_ShapeEnum getShapeType(int* dim=0) const;
99 int getDataType() const;
100 int getCurStepID() const;
101 int getNbComps() const;
102 void updateShapeIDs();
103 void updateDims(int curDim=-1);
104 int getSelectedSubshapes (TColStd_IndexedMapOfInteger& map);
109 GEOM::GEOM_Field_var myField;
110 GEOM::GEOM_Object_var myShape;
111 QVector< int > myShapeIDs;
112 TopTools_IndexedMapOfShape myShapeMap;
115 StepTable* myCurStepTable;
116 QMap< int, StepTable* > myStepTables;
117 QSet< int > myRemovedSteps;
122 QPushButton* myShapeSelBtn;
123 QLineEdit* myShapeName;
124 QComboBox* myTypeCombo;
125 QComboBox* myDimCombo;
126 QPushButton* myPrevStepBtn;
127 QPushButton* myNextStepBtn;
128 QPushButton* myRmStepBtn;
130 SalomeApp_IntSpinBox* myNbCompsSpin;
131 QWidget* mySwitchTableWdg;
132 QComboBox* myStepsCombo;
133 SalomeApp_IntSpinBox* myStampSpin;