Salome HOME
Merge from V5_1_main 14/05/2010
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RenumberingDlg.h
1 //  Copyright (C) 2007-2010  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
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File   : SMESHGUI_RenumberingDlg.h
25 // Author : Michael ZORIN, Open CASCADE S.A.S.
26 //
27 #ifndef SMESHGUI_RENUMBERINGDLG_H
28 #define SMESHGUI_RENUMBERINGDLG_H
29
30 // SMESH includes
31 #include "SMESH_SMESHGUI.hxx"
32
33 // Qt includes
34 #include <QDialog>
35
36 // IDL includes
37 #include <SALOMEconfig.h>
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 SMESHGUI;
46 class LightApp_SelectionMgr;
47 class SUIT_SelectionFilter;
48
49 //=================================================================================
50 // class    : SMESHGUI_RenumberingDlg
51 // purpose  : If the unit == 0 nodes will be renumbered, if the unit == 1 the elements will.
52 //=================================================================================
53 class SMESHGUI_EXPORT SMESHGUI_RenumberingDlg : public QDialog
54
55   Q_OBJECT
56
57 public:
58   SMESHGUI_RenumberingDlg( SMESHGUI*, const int = 0 );
59   ~SMESHGUI_RenumberingDlg();
60
61 private:
62   void                          Init();
63   void                          closeEvent( QCloseEvent* );
64   void                          enterEvent( QEvent* );         /* mouse enter the QWidget */
65   void                          hideEvent( QHideEvent* );       /* ESC key */
66   void                          keyPressEvent( QKeyEvent* );
67   
68   SMESHGUI*                     mySMESHGUI;              /* Current SMESHGUI object */
69   LightApp_SelectionMgr*        mySelectionMgr;          /* User shape selection */
70   int                           myConstructorId;         /* Current constructor id = radio button id */
71   QLineEdit*                    myEditCurrentArgument;   /* Current  LineEdit */
72   
73   int myUnit;    
74   SMESH::SMESH_Mesh_var         myMesh;
75   //Handle(SMESH_TypeFilter)      myMeshFilter;
76   SUIT_SelectionFilter*         myMeshFilter;
77   
78   QGroupBox*                    GroupConstructors;
79   QRadioButton*                 Constructor1;
80   QGroupBox*                    GroupButtons;
81   QPushButton*                  buttonOk;
82   QPushButton*                  buttonCancel;
83   QPushButton*                  buttonApply;
84   QPushButton*                  buttonHelp;
85   QGroupBox*                    GroupMesh;
86   QLabel*                       TextLabelMesh;
87   QPushButton*                  SelectButton;
88   QLineEdit*                    LineEditMesh;
89   
90   QString                       myHelpFileName;
91
92 private slots:
93   void                          ClickOnOk();
94   void                          ClickOnCancel();
95   void                          ClickOnApply();
96   void                          ClickOnHelp();
97   void                          SetEditCurrentArgument();
98   void                          SelectionIntoArgument();
99   void                          DeactivateActiveDialog();
100   void                          ActivateThisDialog();
101 };
102
103 #endif // SMESHGUI_RENUMBERINGDLG_H