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