Salome HOME
yfr : Merge V1.2
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RemoveNodesDlg.h
1 //  File      : SMESHGUI_RemoveNodesDlg.h
2 //  Created   : Fri Jun 07 11:18:42 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : SMESH
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10 #ifndef DIALOGBOX_REMOVE_NODES_H
11 #define DIALOGBOX_REMOVE_NODES_H
12
13 #include "SALOME_Selection.h"
14
15 // QT Includes
16 #include <qvariant.h>
17 #include <qdialog.h>
18
19 // Open CASCADE Includes
20 #include <TColStd_MapOfInteger.hxx>
21
22 class QVBoxLayout; 
23 class QHBoxLayout; 
24 class QGridLayout; 
25 class QButtonGroup;
26 class QGroupBox;
27 class QLabel;
28 class QLineEdit;
29 class QPushButton;
30 class QRadioButton;
31 class SMESHGUI;
32
33 // IDL Headers
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36
37 //=================================================================================
38 // class    : SMESHGUI_RemoveNodesDlg
39 // purpose  :
40 //=================================================================================
41 class SMESHGUI_RemoveNodesDlg : public QDialog
42
43     Q_OBJECT
44
45 public:
46     SMESHGUI_RemoveNodesDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
47     ~SMESHGUI_RemoveNodesDlg();
48
49 private:
50
51     void Init( SALOME_Selection* Sel ) ;
52     void closeEvent( QCloseEvent* e ) ;
53     void enterEvent ( QEvent * ) ;                          /* mouse enter the QWidget */
54
55     SMESHGUI*                     mySMESHGUI ;              /* Current SMESHGUI object */
56     SALOME_Selection*             mySelection ;             /* User shape selection */
57     bool                          myOkNodes ;               /* to check when arguments is defined */
58     int                           myConstructorId ;         /* Current constructor id = radio button id */
59     QLineEdit*                    myEditCurrentArgument;    /* Current  LineEdit */
60
61     SMESH::SMESH_Mesh_var         myMesh;
62     TColStd_MapOfInteger          myMapIndex;
63     
64     QButtonGroup* GroupConstructors;
65     QRadioButton* Constructor1;
66     QGroupBox* GroupButtons;
67     QPushButton* buttonOk;
68     QPushButton* buttonCancel;
69     QPushButton* buttonApply;
70     QGroupBox* GroupC1;
71     QLabel* TextLabelC1A1;
72     QPushButton* SelectButtonC1A1;
73     QLineEdit* LineEditC1A1;
74
75 private slots:
76
77     void ConstructorsClicked(int constructorId);
78     void ClickOnOk();
79     void ClickOnCancel();
80     void ClickOnApply();
81     void SetEditCurrentArgument() ;
82     void SelectionIntoArgument() ;
83     void DeactivateActiveDialog() ;
84     void ActivateThisDialog() ;
85
86 protected:
87     QGridLayout* SMESHGUI_RemoveNodesDlgLayout;
88     QGridLayout* GroupConstructorsLayout;
89     QGridLayout* GroupButtonsLayout;
90     QGridLayout* GroupC1Layout;
91 };
92
93 #endif // DIALOGBOX_REMOVE_NODES_H