Salome HOME
Merge from V5_1_main 14/05/2010
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_WhatIsDlg.h
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // SMESH SMESHGUI : GUI for SMESH component
21 // File   : SMESHGUI_WhatIsDlg.h
22 // Author : Vladimir TURIN, Open CASCADE S.A.S.
23 //
24 #ifndef SMESHGUI_WHATISDLG_H
25 #define SMESHGUI_WHATISDLG_H
26
27 // Qt includes
28 #include <QDialog>
29
30 // IDL includes
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SMESH_Mesh)
33
34 class QGroupBox;
35 class QLabel;
36 class QLineEdit;
37 class QPushButton;
38 class QRadioButton;
39 class QTextBrowser;
40 class SMESHGUI;
41 class SMESH_Actor;
42 class SVTK_Selector;
43 class LightApp_SelectionMgr;
44 class SMESH_LogicalFilter;
45
46 //=================================================================================
47 // class    : SMESHGUI_WhatIsDlg
48 // purpose  :
49 //=================================================================================
50 class SMESHGUI_WhatIsDlg : public QDialog
51
52   Q_OBJECT
53    
54 public:
55   SMESHGUI_WhatIsDlg( SMESHGUI* );
56   ~SMESHGUI_WhatIsDlg();
57   
58 private:
59   void                          Init( bool = true );
60   void                          closeEvent( QCloseEvent* );
61   void                          enterEvent( QEvent* );         /* mouse enter the QWidget */
62   void                          hideEvent( QHideEvent* );      /* ESC key */
63   void                          keyPressEvent( QKeyEvent* );
64
65   SMESHGUI*                     mySMESHGUI;              /* Current SMESHGUI object */
66   LightApp_SelectionMgr*        mySelectionMgr;          /* User shape selection */
67
68   SVTK_Selector*                mySelector;
69
70   bool                          myBusy;
71   SMESH::SMESH_Mesh_var         myMesh;
72   SMESH_Actor*                  myActor;
73   SMESH_LogicalFilter*          myMeshOrSubMeshOrGroupFilter;
74
75   QGroupBox*                    GroupSelections;
76   QRadioButton*                 RadioButtonNodes;
77   QRadioButton*                 RadioButtonElements;
78   QGroupBox*                    GroupButtons;
79   QPushButton*                  buttonOk;
80   QPushButton*                  buttonHelp;
81   QGroupBox*                    GroupArguments;
82   QGroupBox*                    GroupMesh;
83   QLabel*                       TextLabelElements;
84   QLineEdit*                    LineEditElements;
85   QLabel*                       MeshLabel;
86   QLineEdit*                    MeshName;
87
88   QTextBrowser*                 Info;
89     
90   QString                       myHelpFileName;
91
92 private slots:
93   void                          SelectionsClicked( int );
94   void                          ClickOnOk();
95   void                          ClickOnCancel();
96   void                          ClickOnHelp();
97   void                          SelectionIntoArgument();
98   void                          DeactivateActiveDialog();
99   void                          ActivateThisDialog();
100   void                          onTextChange( const QString& );
101 };
102
103 #endif // SMESHGUI_WHATISDLG_H