Salome HOME
0020210: EDF SMESH 976: Update of a smesh group after modification of the associated...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_BuildCompoundDlg.h
1 //  Copyright (C) 2007-2008  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.
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 //  SMESH SMESHGUI : GUI for SMESH component
23 //  File   : SMESHGUI_BuildCompoundDlg.h
24 //  Author : Alexander KOVALEV
25 //  Module : SMESH
26 //
27 #ifndef SMESHGUI_BuildCompoundDlg_H
28 #define SMESHGUI_BuildCompoundDlg_H
29
30 #include "LightApp_SelectionMgr.h"
31 #include "SUIT_SelectionFilter.h"
32
33 // QT Includes
34 #include <qdialog.h>
35
36 #include <vector>
37
38 // Open CASCADE Includes
39
40 class QGridLayout;
41 class QButtonGroup;
42 class QGroupBox;
43 class QLabel;
44 class QLineEdit;
45 class QPushButton;
46 class QRadioButton;
47 class SMESHGUI;
48 class QCheckBox;
49 class SMESHGUI_SpinBox;
50 class QComboBox;
51 class QSizePolicy;
52 class QString;
53
54 // IDL Headers
55 #include <SALOMEconfig.h>
56 #include CORBA_SERVER_HEADER(SMESH_Mesh)
57 #include CORBA_SERVER_HEADER(SMESH_Gen)
58
59 //=================================================================================
60 // class    : SMESHGUI_BuildCompoundDlg
61 // purpose  :
62 //=================================================================================
63 class SMESHGUI_BuildCompoundDlg : public QDialog
64 {
65   Q_OBJECT;
66
67  public:
68
69   SMESHGUI_BuildCompoundDlg (SMESHGUI  * theModule);
70   ~SMESHGUI_BuildCompoundDlg();
71
72 public :
73   static QString GetDefaultName(const QString& theOperation);
74
75  private:
76   void Init();
77   void closeEvent (QCloseEvent*);
78   void enterEvent (QEvent*);              /* mouse enter the QWidget */
79   void hideEvent  (QHideEvent*);          /* ESC key */
80   void keyPressEvent(QKeyEvent*);
81
82  private:
83   SMESHGUI*               mySMESHGUI;     /* Current SMESHGUI object */
84   LightApp_SelectionMgr*  mySelectionMgr; /* User shape selection */
85
86   SMESH::SMESH_Mesh_var   myMesh;
87   SUIT_SelectionFilter*   myMeshFilter;
88   SMESH::mesh_array_var   myMeshArray;
89
90   // Widgets
91   QButtonGroup* GroupConstructors;
92   QRadioButton* Constructor1;
93
94   QGroupBox* GroupButtons;
95   QPushButton* buttonOk;
96   QPushButton* buttonCancel;
97   QPushButton* buttonApply;
98   QPushButton* buttonHelp;
99
100   QGroupBox* GroupName;
101   QLabel* TextLabelName;
102   QLineEdit* LineEditName;
103
104   QGroupBox* GroupArgs;
105   QLabel* TextLabelMeshes;
106   QPushButton* SelectButton;
107   QLineEdit* LineEditMeshes;
108   QLabel* TextLabelUnion;
109   QComboBox* ComboBoxUnion;
110   QCheckBox* CheckBoxCommon;
111   QCheckBox* CheckBoxMerge;
112   QLabel* TextLabelTol;
113   SMESHGUI_SpinBox* SpinBoxTol;
114
115   //protected:
116   QGridLayout* SMESHGUI_BuildCompoundDlgLayout;
117   QGridLayout* GroupConstructorsLayout;
118   QGridLayout* GroupButtonsLayout;
119   QGridLayout* GroupNameLayout;
120   QGridLayout* GroupArgsLayout;
121
122   QString myHelpFileName;
123
124  private slots:
125   void ClickOnOk();
126   void ClickOnCancel();
127   bool ClickOnApply();
128   void ClickOnHelp();
129   void SelectionIntoArgument();
130   void DeactivateActiveDialog();
131   void ActivateThisDialog();
132   void onSelectMerge(bool);
133 };
134
135 #endif // SMESHGUI_BuildCompoundDlg_H