Salome HOME
Fix bug 12796: Warning missed for the bad file 'test18.med'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_CreatePolyhedralVolumeDlg.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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //
23 //
24 //  File   : SMESHGUI_CreatePolyhedralVolumeDlg.h
25 //  Author : Michael ZORIN
26 //  Module : SMESH
27 //  $Header: 
28
29 #ifndef DIALOGBOX_CREATEPOLYHEDRAL_H
30 #define DIALOGBOX_CREATEPOLYHEDRAL_H
31
32 // QT Includes
33 #include <qdialog.h>
34
35 class QGridLayout; 
36 class QButtonGroup;
37 class QGroupBox;
38 class QListBox;
39 class QLabel;
40 class QLineEdit;
41 class QPushButton;
42 class QRadioButton;
43 class QCheckBox;
44 class SMESHGUI;
45 class SMESH_Actor;
46 class SVTK_Selector;
47 class SVTK_ViewWindow;
48 class LightApp_SelectionMgr;
49
50 namespace SMESH{
51   struct TPolySimulation;
52 }
53
54 // IDL Headers
55 #include <SALOMEconfig.h>
56 #include CORBA_SERVER_HEADER(SMESH_Mesh)
57
58 //=================================================================================
59 // class    : SMESHGUI_CreatePolyhedralVolumeDlg
60 // purpose  :
61 //=================================================================================
62 class SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog
63
64     Q_OBJECT
65
66 public:
67     SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI*, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
68     ~SMESHGUI_CreatePolyhedralVolumeDlg();
69
70 private:
71
72     void Init() ;
73     void closeEvent( QCloseEvent* e ) ;
74     void enterEvent ( QEvent * ) ;                          /* mouse enter the QWidget */
75     void hideEvent ( QHideEvent * );                        /* ESC key */
76     void keyPressEvent( QKeyEvent* e );
77     int  GetConstructorId();
78     void displaySimulation();
79     
80     int checkEditLine(bool checkLast=true); /*! Checking for indices, return 1 if all ok, esle -1*/
81     
82     SMESHGUI*                     mySMESHGUI ;              /* Current SMESHGUI object */
83     LightApp_SelectionMgr*        mySelectionMgr ;             /* User shape selection */
84     SVTK_Selector*                mySelector;
85     QString                       myIDs;
86     int                           myNbOkElements ;            /* to check when elements are defined */
87
88     QLineEdit*                    myEditCurrentArgument;
89    
90     SMESH::SMESH_Mesh_var         myMesh;
91     SMESH_Actor*                  myActor;
92     SMESH::TPolySimulation*       mySimulation;
93     
94     QButtonGroup* GroupConstructors;
95     QRadioButton* RadioButton1;
96     QRadioButton* RadioButton2;
97     QCheckBox* Preview;
98     QGroupBox* GroupButtons;
99     QPushButton* buttonOk;
100     QPushButton* buttonCancel;
101     QPushButton* buttonApply;
102     QPushButton* buttonHelp;
103     QGroupBox* GroupContent;
104     QLabel* TextLabelIds;
105     QPushButton* SelectElementsButton;
106     QLineEdit* LineEditElements;
107     QListBox* myFacesByNodes;
108     QLabel* myFacesByNodesLabel;
109     QPushButton* AddButton;
110     QPushButton* RemoveButton;
111
112     QString myHelpFileName;
113        
114     public slots:
115
116     void onAdd();
117     void onRemove();
118
119     private slots:
120
121     void ConstructorsClicked(int constructorId);
122     void ClickOnPreview(bool theToggled);
123     void ClickOnOk();
124     void ClickOnCancel();
125     void ClickOnApply();
126     void ClickOnHelp();
127     void SetEditCurrentArgument() ;
128     void SelectionIntoArgument() ;
129     void DeactivateActiveDialog() ;
130     void ActivateThisDialog() ;
131     void onTextChange(const QString&);
132     void onListSelectionChanged();
133     
134 protected:
135     QGridLayout* SMESHGUI_CreatePolyhedralVolumeDlgLayout;
136     QGridLayout* GroupConstructorsLayout;
137     QGridLayout* GroupButtonsLayout;
138     QGridLayout* GroupContentLayout;
139 };
140
141 #endif // DIALOGBOX_CREATEPOLYHEDRAL_H