Version: 9.13.0
GroupGUI_GroupDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2024 CEA, EDF, 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 : GroupGUI_GroupDlg.h
25 // Author : Sergey ANIKIN, Open CASCADE S.A.S. (sergey.anikin@opencascade.com)
26 
27 #ifndef GROUPGUI_GROUPDLG_H
28 #define GROUPGUI_GROUPDLG_H
29 
30 #include <GEOMBase_Skeleton.h>
31 
32 #include <TopAbs_ShapeEnum.hxx>
33 #include <TColStd_DataMapOfIntegerInteger.hxx>
34 #include <TColStd_IndexedMapOfInteger.hxx>
35 
36 class QCheckBox;
37 class QComboBox;
38 class QPushButton;
39 class QGroupBox;
40 class QLineEdit;
41 class QListWidget;
42 class QButtonGroup;
43 class SalomeApp_DoubleSpinBox;
44 
45 //=================================================================================
46 // class : GroupGUI_GroupDlg
47 // purpose :
48 //=================================================================================
50 {
51  Q_OBJECT
52 
53 public:
54  typedef enum {
56  EditGroup
57  } Mode;
58 
59  GroupGUI_GroupDlg (Mode mode, GeometryGUI*, QWidget* parent = 0);
61 
62 protected:
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();
69 
70  void closeEvent (QCloseEvent*);
71 
72 private slots:
73  void ClickOnOk();
74  bool ClickOnApply();
75  void ActivateThisDialog();
76  void SelectionIntoArgument();
78  void ConstructorsClicked(int);
79 
80  void selectAllSubShapes();
81  void add();
82  void remove();
83  void showOnlySelected();
84  void selectionChanged();
85  void ClickOnOkFilter();
86 #ifndef DISABLE_PLOT2DVIEWER
87  void ClickOnPlot();
88 #endif
89  void MeasureToggled();
90 
91 private:
92  void Init();
93  void enterEvent (QEvent*);
94 
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();
101  void onGetInPlace();
102  void setInPlaceObj (GEOM::GEOM_Object_var, const bool isVisible=1);
103  int getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex);
104 
105 private:
107  bool myBusy;
111  GEOM::GEOM_Object_var myMainObj;
112  GEOM::GEOM_Object_var myGroup;
113  GEOM::GEOM_Object_var myInPlaceObj;
115  TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices;
116  QList<int> myGroupIdList;
117  int myDmMode;
119 
120  QPushButton* mySelBtn;
121  QLineEdit* myMainName;
122  QPushButton* mySelBtn2;
123  QLineEdit* myShape2Name;
125  QButtonGroup* myRestrictGroup;
126  QPushButton* mySelAllBtn;
127  QPushButton* myAddBtn;
128  QPushButton* myRemBtn;
129  QPushButton* myShowOnlyBtn;
130  QPushButton* myHideSelBtn;
131  QPushButton* myShowAllBtn;
133  QCheckBox* myLessFilterCheck;
135  QComboBox* myLessFilterCombo;
137  SalomeApp_DoubleSpinBox* myLessFilterSpin;
138  SalomeApp_DoubleSpinBox* myGreaterFilterSpin;
139  QPushButton* myApplyFilterButton;
142 };
143 
144 #endif
std::list< GEOM::GEOM_Object_ptr > ObjectList
Definition: GEOMBase_Helper.h:46
Definition: GEOMBase_Skeleton.h:53
Definition: GeometryGUI.h:74
Definition: GroupGUI_GroupDlg.h:50
GEOM::GEOM_Object_var myGroup
Definition: GroupGUI_GroupDlg.h:112
void setInPlaceObj(GEOM::GEOM_Object_var, const bool isVisible=1)
Definition: GroupGUI_GroupDlg.cxx:536
QPushButton * myPlotDistributionButton
Definition: GroupGUI_GroupDlg.h:140
GEOM::GEOM_Object_var myInPlaceObj
Definition: GroupGUI_GroupDlg.h:113
void add()
Definition: GroupGUI_GroupDlg.cxx:928
int myDmMode
Definition: GroupGUI_GroupDlg.h:117
void activateSelection()
Definition: GroupGUI_GroupDlg.cxx:1026
void ConstructorsClicked(int)
Definition: GroupGUI_GroupDlg.cxx:676
void closeEvent(QCloseEvent *)
Definition: GroupGUI_GroupDlg.cxx:368
QButtonGroup * myRestrictGroup
Definition: GroupGUI_GroupDlg.h:125
QPushButton * myAddBtn
Definition: GroupGUI_GroupDlg.h:127
void ClickOnPlot()
Definition: GroupGUI_GroupDlg.cxx:1480
void ClickOnOk()
Definition: GroupGUI_GroupDlg.cxx:380
QGroupBox * myFilterGrp
Definition: GroupGUI_GroupDlg.h:141
QComboBox * myLessFilterCombo
Definition: GroupGUI_GroupDlg.h:135
SalomeApp_DoubleSpinBox * myGreaterFilterSpin
Definition: GroupGUI_GroupDlg.h:138
QCheckBox * myLessFilterCheck
Definition: GroupGUI_GroupDlg.h:133
QComboBox * myGreaterFilterCombo
Definition: GroupGUI_GroupDlg.h:136
QLineEdit * myMainName
Definition: GroupGUI_GroupDlg.h:121
QLineEdit * myShape2Name
Definition: GroupGUI_GroupDlg.h:123
void highlightSubShapes()
Definition: GroupGUI_GroupDlg.cxx:1204
void selectionChanged()
Definition: GroupGUI_GroupDlg.cxx:1195
void showOnlySelected()
Definition: GroupGUI_GroupDlg.cxx:750
Mode
Definition: GroupGUI_GroupDlg.h:54
@ CreateGroup
Definition: GroupGUI_GroupDlg.h:55
@ EditGroup
Definition: GroupGUI_GroupDlg.h:56
QGroupBox * myRestrictGroupBox
Definition: GroupGUI_GroupDlg.h:124
bool myBusy
Definition: GroupGUI_GroupDlg.h:107
void selectAllSubShapes()
Definition: GroupGUI_GroupDlg.cxx:694
int subSelectionWay() const
Definition: GroupGUI_GroupDlg.cxx:979
TopAbs_ShapeEnum getShapeType() const
Definition: GroupGUI_GroupDlg.cxx:988
QPushButton * myShowAllBtn
Definition: GroupGUI_GroupDlg.h:131
bool myIsHiddenMain
Definition: GroupGUI_GroupDlg.h:109
virtual GEOM::GEOM_Object_ptr getFather(GEOM::GEOM_Object_ptr)
Definition: GroupGUI_GroupDlg.cxx:1412
QList< int > myGroupIdList
Definition: GroupGUI_GroupDlg.h:116
QListWidget * myIdList
Definition: GroupGUI_GroupDlg.h:132
virtual GEOM::GEOM_IOperations_ptr createOperation()
Definition: GroupGUI_GroupDlg.cxx:1314
int getSelectedSubshapes(TColStd_IndexedMapOfInteger &theMapIndex)
Definition: GroupGUI_GroupDlg.cxx:844
GroupGUI_GroupDlg(Mode mode, GeometryGUI *, QWidget *parent=0)
Definition: GroupGUI_GroupDlg.cxx:86
QPushButton * mySelAllBtn
Definition: GroupGUI_GroupDlg.h:126
QPushButton * myRemBtn
Definition: GroupGUI_GroupDlg.h:128
Mode myMode
Definition: GroupGUI_GroupDlg.h:106
QPushButton * mySelBtn
Definition: GroupGUI_GroupDlg.h:120
void setShapeType(const TopAbs_ShapeEnum)
Definition: GroupGUI_GroupDlg.cxx:1003
void SetEditCurrentArgument()
Definition: GroupGUI_GroupDlg.cxx:450
QPushButton * mySelBtn2
Definition: GroupGUI_GroupDlg.h:122
void enterEvent(QEvent *)
Definition: GroupGUI_GroupDlg.cxx:358
QCheckBox * myGreaterFilterCheck
Definition: GroupGUI_GroupDlg.h:134
bool myWasHiddenMain
Definition: GroupGUI_GroupDlg.h:110
bool ClickOnApply()
Definition: GroupGUI_GroupDlg.cxx:393
int myInPlaceObjSelectState
Definition: GroupGUI_GroupDlg.h:114
void remove()
Definition: GroupGUI_GroupDlg.cxx:961
bool myIsAccept
Definition: GroupGUI_GroupDlg.h:118
void updateState(bool isAdd=false)
Definition: GroupGUI_GroupDlg.cxx:1158
QPushButton * myApplyFilterButton
Definition: GroupGUI_GroupDlg.h:139
virtual bool execute(ObjectList &)
Definition: GroupGUI_GroupDlg.cxx:1353
void Init()
Definition: GroupGUI_GroupDlg.cxx:255
void ActivateThisDialog()
Definition: GroupGUI_GroupDlg.cxx:436
virtual QList< GEOM::GeomObjPtr > getSourceObjects()
Definition: GroupGUI_GroupDlg.cxx:1503
GEOM::GEOM_Object_var myMainObj
Definition: GroupGUI_GroupDlg.h:111
QPushButton * myShowOnlyBtn
Definition: GroupGUI_GroupDlg.h:129
bool myIsShapeType
Definition: GroupGUI_GroupDlg.h:108
void SelectionIntoArgument()
Definition: GroupGUI_GroupDlg.cxx:583
~GroupGUI_GroupDlg()
Definition: GroupGUI_GroupDlg.cxx:235
void ClickOnOkFilter()
Definition: GroupGUI_GroupDlg.cxx:1422
QPushButton * myHideSelBtn
Definition: GroupGUI_GroupDlg.h:130
SalomeApp_DoubleSpinBox * myLessFilterSpin
Definition: GroupGUI_GroupDlg.h:137
virtual bool isValid(QString &)
Definition: GroupGUI_GroupDlg.cxx:1329
void onGetInPlace()
Definition: GroupGUI_GroupDlg.cxx:489
TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices
Definition: GroupGUI_GroupDlg.h:115
void MeasureToggled()
Definition: GroupGUI_GroupDlg.cxx:1490