Salome HOME
c7bc29cdae464578ea268d1b4779dac3d73a3189
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_BuildCompoundDlg.h
1 //  SMESH SMESHGUI : GUI for SMESH component
2 //
3 //  Copyright (C) 2003  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 //
23 //
24 //  File   : SMESHGUI_BuildCompoundDlg.h
25 //  Author : Alexander KOVALEV
26 //  Module : SMESH
27
28 #ifndef SMESHGUI_BuildCompoundDlg_H
29 #define SMESHGUI_BuildCompoundDlg_H
30
31 #include "LightApp_SelectionMgr.h"
32 #include "SUIT_SelectionFilter.h"
33
34 // QT Includes
35 #include <qdialog.h>
36
37 #include <vector>
38
39 // Open CASCADE Includes
40
41 class QGridLayout;
42 class QButtonGroup;
43 class QGroupBox;
44 class QLabel;
45 class QLineEdit;
46 class QPushButton;
47 class QRadioButton;
48 class SMESHGUI;
49 class QCheckBox;
50 class SMESHGUI_SpinBox;
51 class QComboBox;
52 class QSizePolicy;
53 class QString;
54
55 // IDL Headers
56 #include <SALOMEconfig.h>
57 #include CORBA_SERVER_HEADER(SMESH_Mesh)
58 #include CORBA_SERVER_HEADER(SMESH_Gen)
59
60 //=================================================================================
61 // class    : SMESHGUI_BuildCompoundDlg
62 // purpose  :
63 //=================================================================================
64 class SMESHGUI_BuildCompoundDlg : public QDialog
65 {
66   Q_OBJECT;
67
68  public:
69
70   SMESHGUI_BuildCompoundDlg (SMESHGUI  * theModule);
71   ~SMESHGUI_BuildCompoundDlg();
72
73 public :
74   static QString GetDefaultName(const QString& theOperation);
75
76  private:
77   void Init();
78   void closeEvent (QCloseEvent*);
79   void enterEvent (QEvent*);              /* mouse enter the QWidget */
80   void hideEvent  (QHideEvent*);          /* ESC key */
81   void keyPressEvent(QKeyEvent*);
82
83  private:
84   SMESHGUI*               mySMESHGUI;     /* Current SMESHGUI object */
85   LightApp_SelectionMgr*  mySelectionMgr; /* User shape selection */
86
87   SMESH::SMESH_Mesh_var   myMesh;
88   SUIT_SelectionFilter*   myMeshFilter;
89   SMESH::mesh_array_var   myMeshArray;
90
91   // Widgets
92   QButtonGroup* GroupConstructors;
93   QRadioButton* Constructor1;
94
95   QGroupBox* GroupButtons;
96   QPushButton* buttonOk;
97   QPushButton* buttonCancel;
98   QPushButton* buttonApply;
99   QPushButton* buttonHelp;
100
101   QGroupBox* GroupName;
102   QLabel* TextLabelName;
103   QLineEdit* LineEditName;
104
105   QGroupBox* GroupArgs;
106   QLabel* TextLabelMeshes;
107   QPushButton* SelectButton;
108   QLineEdit* LineEditMeshes;
109   QLabel* TextLabelUnion;
110   QComboBox* ComboBoxUnion;
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