Salome HOME
1) IPAL15174 (Dump study works wrong for Concatenate):
[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 DIALOGBOX_BUILD_MESH_H
29 #define DIALOGBOX_BUILD_MESH_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                              const char* title,
72                              const char* icon,
73                              int         theAction);
74   ~SMESHGUI_BuildCompoundDlg();
75
76 public :
77   static QString GetDefaultName(const QString& theOperation);
78
79  private:
80   void Init();
81   void closeEvent (QCloseEvent*);
82   void enterEvent (QEvent*);              /* mouse enter the QWidget */
83   void hideEvent  (QHideEvent*);          /* ESC key */
84   void keyPressEvent(QKeyEvent*);
85
86  private:
87   SMESHGUI*               mySMESHGUI;     /* Current SMESHGUI object */
88   LightApp_SelectionMgr*  mySelectionMgr; /* User shape selection */
89
90   SMESH::SMESH_Mesh_var   myMesh;
91   SUIT_SelectionFilter*   myMeshFilter;
92   SMESH::mesh_array_var   myMeshArray;
93
94   int myAction;
95
96   // Widgets
97   QButtonGroup* GroupConstructors;
98   QRadioButton* Constructor1;
99
100   QGroupBox* GroupButtons;
101   QPushButton* buttonOk;
102   QPushButton* buttonCancel;
103   QPushButton* buttonApply;
104   QPushButton* buttonHelp;
105
106   QGroupBox* GroupName;
107   QLabel* TextLabelName;
108   QLineEdit* LineEditName;
109
110   QGroupBox* GroupArgs;
111   QLabel* TextLabelMeshes;
112   QPushButton* SelectButton;
113   QLineEdit* LineEditMeshes;
114   QLabel* TextLabelUnion;
115   QComboBox* ComboBoxUnion;
116   QCheckBox* CheckBoxMerge;
117   QLabel* TextLabelTol;
118   SMESHGUI_SpinBox* SpinBoxTol;
119
120   //protected:
121   QGridLayout* SMESHGUI_BuildCompoundDlgLayout;
122   QGridLayout* GroupConstructorsLayout;
123   QGridLayout* GroupButtonsLayout;
124   QGridLayout* GroupNameLayout;
125   QGridLayout* GroupArgsLayout;
126
127   QString myHelpFileName;
128
129  private slots:
130   void ClickOnOk();
131   void ClickOnCancel();
132   void ClickOnApply();
133   void ClickOnHelp();
134   void SelectionIntoArgument();
135   void DeactivateActiveDialog();
136   void ActivateThisDialog();
137   void onSelectMerge(bool);
138 };
139
140 #endif // DIALOGBOX_BUILD_MESH_H