Salome HOME
Update of CheckDone
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RenumberingDlg.h
1 // Copyright (C) 2007-2024  CEA, EDF, 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, or (at your option) any later version.
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                          enterEvent( QEvent* );         /* mouse enter the QWidget */
64   void                          keyPressEvent( QKeyEvent* );
65   
66   SMESHGUI*                     mySMESHGUI;              /* Current SMESHGUI object */
67   LightApp_SelectionMgr*        mySelectionMgr;          /* User shape selection */
68   int                           myConstructorId;         /* Current constructor id = radio button id */
69   QLineEdit*                    myEditCurrentArgument;   /* Current  LineEdit */
70   
71   int myUnit;    
72   SMESH::SMESH_Mesh_var         myMesh;
73   //Handle(SMESH_TypeFilter)      myMeshFilter;
74   SUIT_SelectionFilter*         myMeshFilter;
75   
76   QGroupBox*                    GroupConstructors;
77   QRadioButton*                 Constructor1;
78   QGroupBox*                    GroupButtons;
79   QPushButton*                  buttonOk;
80   QPushButton*                  buttonCancel;
81   QPushButton*                  buttonApply;
82   QPushButton*                  buttonHelp;
83   QGroupBox*                    GroupMesh;
84   QLabel*                       TextLabelMesh;
85   QPushButton*                  SelectButton;
86   QLineEdit*                    LineEditMesh;
87   
88   QString                       myHelpFileName;
89
90 protected slots:
91   virtual void                  reject();
92
93 private slots:
94   void                          ClickOnOk();
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