Salome HOME
Update copyright information
[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, Open CASCADE S.A.S.
25 //
26 #ifndef SMESHGUI_BUILDCOMPOUNDDLG_H
27 #define SMESHGUI_BUILDCOMPOUNDDLG_H
28
29 // SMESH includes
30 #include "SMESH_SMESHGUI.hxx"
31
32 // Qt includes
33 #include <QDialog>
34
35 // IDL includes
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Gen)
38 #include CORBA_SERVER_HEADER(SMESH_Mesh)
39
40 class QGroupBox;
41 class QLabel;
42 class QLineEdit;
43 class QPushButton;
44 class QRadioButton;
45 class QCheckBox;
46 class QComboBox;
47 class SMESHGUI;
48 class SMESHGUI_SpinBox;
49 class LightApp_SelectionMgr;
50 class SUIT_SelectionFilter;
51
52 //=================================================================================
53 // class    : SMESHGUI_BuildCompoundDlg
54 // purpose  :
55 //=================================================================================
56 class SMESHGUI_EXPORT SMESHGUI_BuildCompoundDlg : public QDialog
57 {
58   Q_OBJECT;
59
60 public:
61
62   SMESHGUI_BuildCompoundDlg( SMESHGUI* );
63   ~SMESHGUI_BuildCompoundDlg();
64
65 public:
66   static QString          GetDefaultName( const QString& );
67
68 private:
69   void                    Init();
70   void                    closeEvent( QCloseEvent* );
71   void                    enterEvent( QEvent* );             /* mouse enter the QWidget */
72   void                    hideEvent( QHideEvent* );          /* ESC key */
73   void                    keyPressEvent( QKeyEvent* );
74
75 private:
76   SMESHGUI*               mySMESHGUI;     /* Current SMESHGUI object */
77   LightApp_SelectionMgr*  mySelectionMgr; /* User shape selection */
78
79   SMESH::SMESH_Mesh_var   myMesh;
80   SUIT_SelectionFilter*   myMeshFilter;
81   SMESH::mesh_array_var   myMeshArray;
82
83   // Widgets
84   QGroupBox*              GroupConstructors;
85   QRadioButton*           Constructor1;
86
87   QGroupBox*              GroupButtons;
88   QPushButton*            buttonOk;
89   QPushButton*            buttonCancel;
90   QPushButton*            buttonApply;
91   QPushButton*            buttonHelp;
92
93   QGroupBox*              GroupName;
94   QLabel*                 TextLabelName;
95   QLineEdit*              LineEditName;
96
97   QGroupBox*              GroupArgs;
98   QLabel*                 TextLabelMeshes;
99   QPushButton*            SelectButton;
100   QLineEdit*              LineEditMeshes;
101   QLabel*                 TextLabelUnion;
102   QComboBox*              ComboBoxUnion;
103   QCheckBox*              CheckBoxCommon;
104   QCheckBox*              CheckBoxMerge;
105   QLabel*                 TextLabelTol;
106   SMESHGUI_SpinBox*       SpinBoxTol;
107
108   QString                 myHelpFileName;
109
110 private slots:
111   void                    ClickOnOk();
112   void                    ClickOnCancel();
113   bool                    ClickOnApply();
114   void                    ClickOnHelp();
115   void                    SelectionIntoArgument();
116   void                    DeactivateActiveDialog();
117   void                    ActivateThisDialog();
118   void                    onSelectMerge( bool );
119 };
120
121 #endif // SMESHGUI_BUILDCOMPOUNDDLG_H