Salome HOME
0020321: EDF : Some windows do not appear depending on the platform (MinimumSizeHint())
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_CreatePolyhedralVolumeDlg.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_CreatePolyhedralVolumeDlg.h
24 // Author : Michael ZORIN, Open CASCADE S.A.S.
25 //
26 #ifndef SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_H
27 #define SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_H
28
29 // SMESH includes
30 #include "SMESH_SMESHGUI.hxx"
31
32 // Qt includes
33 #include <QDialog>
34
35 // IDL includes
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38
39 class QButtonGroup;
40 class QGroupBox;
41 class QListWidget;
42 class QLabel;
43 class QLineEdit;
44 class QPushButton;
45 class QRadioButton;
46 class QCheckBox;
47 class SMESHGUI;
48 class SMESH_Actor;
49 class SVTK_Selector;
50 class LightApp_SelectionMgr;
51
52 namespace SMESH
53 {
54   struct TPolySimulation;
55 }
56
57 //=================================================================================
58 // class    : SMESHGUI_CreatePolyhedralVolumeDlg
59 // purpose  :
60 //=================================================================================
61 class SMESHGUI_EXPORT SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog
62
63   Q_OBJECT
64
65 public:
66   SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI* );
67   ~SMESHGUI_CreatePolyhedralVolumeDlg();
68
69 private:
70   void                     Init();
71   void                     closeEvent( QCloseEvent* );
72   void                     enterEvent( QEvent* );          /* mouse enter the QWidget */
73   void                     hideEvent( QHideEvent* );       /* ESC key */
74   void                     keyPressEvent( QKeyEvent* );
75   int                      GetConstructorId();
76   void                     displaySimulation();
77     
78   int                      checkEditLine( bool = true ); /*! Checking for indices, return 1 if all ok, esle -1*/
79     
80   SMESHGUI*                mySMESHGUI;                   /* Current SMESHGUI object */
81   LightApp_SelectionMgr*   mySelectionMgr;               /* User shape selection */
82   SVTK_Selector*           mySelector;
83   QString                  myIDs;
84   int                      myNbOkElements;               /* to check when elements are defined */
85
86   QLineEdit*               myEditCurrentArgument;
87    
88   SMESH::SMESH_Mesh_var    myMesh;
89   SMESH_Actor*             myActor;
90   SMESH::TPolySimulation*  mySimulation;
91   
92   QGroupBox*               ConstructorsBox;
93   QButtonGroup*            GroupConstructors;
94   QRadioButton*            RadioButton1;
95   QRadioButton*            RadioButton2;
96   QCheckBox*               Preview;
97   QGroupBox*               GroupButtons;
98   QPushButton*             buttonOk;
99   QPushButton*             buttonCancel;
100   QPushButton*             buttonApply;
101   QPushButton*             buttonHelp;
102   QGroupBox*               GroupContent;
103   QLabel*                  TextLabelIds;
104   QPushButton*             SelectElementsButton;
105   QLineEdit*               LineEditElements;
106   QListWidget*             myFacesByNodes;
107   QLabel*                  myFacesByNodesLabel;
108   QPushButton*             AddButton;
109   QPushButton*             RemoveButton;
110
111   QString                  myHelpFileName;
112        
113 public slots:
114   void                     onAdd();
115   void                     onRemove();
116
117 private slots:
118   void                     ConstructorsClicked( int );
119   void                     ClickOnPreview( bool );
120   void                     ClickOnOk();
121   void                     ClickOnCancel();
122   void                     ClickOnApply();
123   void                     ClickOnHelp();
124   void                     SetEditCurrentArgument();
125   void                     SelectionIntoArgument();
126   void                     DeactivateActiveDialog();
127   void                     ActivateThisDialog();
128   void                     onTextChange( const QString& );
129   void                     onListSelectionChanged();
130 };
131
132 #endif // SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_H