]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h
Salome HOME
Merge from BR_DEBUG_3_2_0b1
[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 #include "SMESH_SMESHGUI.hxx"
33
34 // QT Includes
35 #include <qdialog.h>
36
37 class QGridLayout; 
38 class QButtonGroup;
39 class QGroupBox;
40 class QListBox;
41 class QLabel;
42 class QLineEdit;
43 class QPushButton;
44 class QRadioButton;
45 class QCheckBox;
46 class SMESHGUI;
47 class SMESH_Actor;
48 class SVTK_Selector;
49 class SVTK_ViewWindow;
50 class LightApp_SelectionMgr;
51
52 namespace SMESH{
53   struct TPolySimulation;
54 }
55
56 // IDL Headers
57 #include <SALOMEconfig.h>
58 #include CORBA_SERVER_HEADER(SMESH_Mesh)
59
60 //=================================================================================
61 // class    : SMESHGUI_CreatePolyhedralVolumeDlg
62 // purpose  :
63 //=================================================================================
64 class SMESHGUI_EXPORT SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog
65
66     Q_OBJECT
67
68 public:
69     SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI*, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
70     ~SMESHGUI_CreatePolyhedralVolumeDlg();
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     int  GetConstructorId();
79     void displaySimulation();
80     
81     int checkEditLine(bool checkLast=true); /*! Checking for indices, return 1 if all ok, esle -1*/
82     
83     SMESHGUI*                     mySMESHGUI ;              /* Current SMESHGUI object */
84     LightApp_SelectionMgr*        mySelectionMgr ;             /* User shape selection */
85     SVTK_Selector*                mySelector;
86     QString                       myIDs;
87     int                           myNbOkElements ;            /* to check when elements are defined */
88
89     QLineEdit*                    myEditCurrentArgument;
90    
91     SMESH::SMESH_Mesh_var         myMesh;
92     SMESH_Actor*                  myActor;
93     SMESH::TPolySimulation*       mySimulation;
94     
95     QButtonGroup* GroupConstructors;
96     QRadioButton* RadioButton1;
97     QRadioButton* RadioButton2;
98     QCheckBox* Preview;
99     QGroupBox* GroupButtons;
100     QPushButton* buttonOk;
101     QPushButton* buttonCancel;
102     QPushButton* buttonApply;
103     QPushButton* buttonHelp;
104     QGroupBox* GroupContent;
105     QLabel* TextLabelIds;
106     QPushButton* SelectElementsButton;
107     QLineEdit* LineEditElements;
108     QListBox* myFacesByNodes;
109     QLabel* myFacesByNodesLabel;
110     QPushButton* AddButton;
111     QPushButton* RemoveButton;
112
113     QString myHelpFileName;
114        
115     public slots:
116
117     void onAdd();
118     void onRemove();
119
120     private slots:
121
122     void ConstructorsClicked(int constructorId);
123     void ClickOnPreview(bool theToggled);
124     void ClickOnOk();
125     void ClickOnCancel();
126     void ClickOnApply();
127     void ClickOnHelp();
128     void SetEditCurrentArgument() ;
129     void SelectionIntoArgument() ;
130     void DeactivateActiveDialog() ;
131     void ActivateThisDialog() ;
132     void onTextChange(const QString&);
133     void onListSelectionChanged();
134     
135 protected:
136     QGridLayout* SMESHGUI_CreatePolyhedralVolumeDlgLayout;
137     QGridLayout* GroupConstructorsLayout;
138     QGridLayout* GroupButtonsLayout;
139     QGridLayout* GroupContentLayout;
140 };
141
142 #endif // DIALOGBOX_CREATEPOLYHEDRAL_H