]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h
Salome HOME
0020313
[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   bool                    isValid();
76   
77 private:
78   SMESHGUI*               mySMESHGUI;     /* Current SMESHGUI object */
79   LightApp_SelectionMgr*  mySelectionMgr; /* User shape selection */
80
81   SMESH::SMESH_Mesh_var   myMesh;
82   SUIT_SelectionFilter*   myMeshFilter;
83   SMESH::mesh_array_var   myMeshArray;
84
85   // Widgets
86   QGroupBox*              GroupConstructors;
87   QRadioButton*           Constructor1;
88
89   QGroupBox*              GroupButtons;
90   QPushButton*            buttonOk;
91   QPushButton*            buttonCancel;
92   QPushButton*            buttonApply;
93   QPushButton*            buttonHelp;
94
95   QGroupBox*              GroupName;
96   QLabel*                 TextLabelName;
97   QLineEdit*              LineEditName;
98
99   QGroupBox*              GroupArgs;
100   QLabel*                 TextLabelMeshes;
101   QPushButton*            SelectButton;
102   QLineEdit*              LineEditMeshes;
103   QLabel*                 TextLabelUnion;
104   QComboBox*              ComboBoxUnion;
105   QCheckBox*              CheckBoxCommon;
106   QCheckBox*              CheckBoxMerge;
107   QLabel*                 TextLabelTol;
108   SMESHGUI_SpinBox*       SpinBoxTol;
109
110   QString                 myHelpFileName;
111
112 private slots:
113   void                    ClickOnOk();
114   void                    ClickOnCancel();
115   bool                    ClickOnApply();
116   void                    ClickOnHelp();
117   void                    SelectionIntoArgument();
118   void                    DeactivateActiveDialog();
119   void                    ActivateThisDialog();
120   void                    onSelectMerge( bool );
121 };
122
123 #endif // SMESHGUI_BUILDCOMPOUNDDLG_H