Salome HOME
PAL10332 - references are interpreted as original objects in filters, dialogs, etc.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RemoveElementsDlg.h
1 //  SMESH SMESHGUI : GUI for SMESH component
2 //
3 //  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SMESHGUI_RemoveElementsDlg.h
25 //  Author : Nicolas REJNERI
26 //  Module : SMESH
27 //  $Header$
28
29 #ifndef DIALOGBOX_REMOVE_ELEMENTS_H
30 #define DIALOGBOX_REMOVE_ELEMENTS_H
31
32 #include "SalomeApp_SelectionMgr.h"
33
34 // QT Includes
35 #include <qvariant.h>
36 #include <qdialog.h>
37
38 class QVBoxLayout; 
39 class QHBoxLayout; 
40 class QGridLayout; 
41 class QButtonGroup;
42 class QGroupBox;
43 class QLabel;
44 class QLineEdit;
45 class QPushButton;
46 class QRadioButton;
47
48 class SMESHGUI;
49 class SMESH_Actor;
50 class SVTK_Selector;
51 class SVTK_ViewWindow;
52
53 // IDL Headers
54 #include <SALOMEconfig.h>
55 #include CORBA_SERVER_HEADER(SMESH_Mesh)
56
57 //=================================================================================
58 // class    : SMESHGUI_RemoveElementsDlg
59 // purpose  :
60 //=================================================================================
61 class SMESHGUI_RemoveElementsDlg : public QDialog
62
63     Q_OBJECT
64
65 public:
66     SMESHGUI_RemoveElementsDlg(SMESHGUI* theModule,
67                                const char* name = 0,
68                                bool modal = FALSE,
69                                WFlags fl = 0);
70     ~SMESHGUI_RemoveElementsDlg();
71
72 private:
73
74     void Init() ;
75     void closeEvent( QCloseEvent* e ) ;
76     void enterEvent ( QEvent * ) ;                          /* mouse enter the QWidget */
77     void hideEvent ( QHideEvent * );                        /* ESC key */
78
79     SalomeApp_SelectionMgr*       mySelectionMgr;
80     SVTK_Selector*                mySelector;
81     SMESHGUI*                     mySMESHGUI;
82
83     int                           myNbOkElements;           /* to check when arguments is defined */
84     int                           myConstructorId;          /* Current constructor id = radio button id */
85     QLineEdit*                    myEditCurrentArgument;    /* Current  LineEdit */
86
87     bool                          myBusy;
88     SMESH::SMESH_Mesh_var         myMesh;
89     SMESH_Actor*                  myActor;
90     
91     QButtonGroup* GroupConstructors;
92     QRadioButton* Constructor1;
93     QGroupBox* GroupButtons;
94     QPushButton* buttonOk;
95     QPushButton* buttonCancel;
96     QPushButton* buttonApply;
97     QGroupBox* GroupC1;
98     QLabel* TextLabelC1A1;
99     QPushButton* SelectButtonC1A1;
100     QLineEdit* LineEditC1A1;
101
102 private slots:
103
104     void ConstructorsClicked(int constructorId);
105     void ClickOnOk();
106     void ClickOnCancel();
107     void ClickOnApply();
108     void SetEditCurrentArgument() ;
109     void SelectionIntoArgument() ;
110     void DeactivateActiveDialog() ;
111     void ActivateThisDialog() ;
112     void onTextChange(const QString&);
113
114 protected:
115     QGridLayout* SMESHGUI_RemoveElementsDlgLayout;
116     QGridLayout* GroupConstructorsLayout;
117     QGridLayout* GroupButtonsLayout;
118     QGridLayout* GroupC1Layout;
119 };
120
121 #endif // DIALOGBOX_REMOVE_ELEMENTS_H