1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_CreatePolyhedralVolumeDlg.h
24 // Author : Michael ZORIN
28 #ifndef DIALOGBOX_CREATEPOLYHEDRAL_H
29 #define DIALOGBOX_CREATEPOLYHEDRAL_H
31 #include "SMESH_SMESHGUI.hxx"
48 class SVTK_ViewWindow;
49 class LightApp_SelectionMgr;
52 struct TPolySimulation;
56 #include <SALOMEconfig.h>
57 #include CORBA_SERVER_HEADER(SMESH_Mesh)
59 //=================================================================================
60 // class : SMESHGUI_CreatePolyhedralVolumeDlg
62 //=================================================================================
63 class SMESHGUI_EXPORT SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog
68 SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI*, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
69 ~SMESHGUI_CreatePolyhedralVolumeDlg();
74 void closeEvent( QCloseEvent* e ) ;
75 void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
76 void hideEvent ( QHideEvent * ); /* ESC key */
77 void keyPressEvent( QKeyEvent* e );
78 int GetConstructorId();
79 void displaySimulation();
81 int checkEditLine(bool checkLast=true); /*! Checking for indices, return 1 if all ok, esle -1*/
83 SMESHGUI* mySMESHGUI ; /* Current SMESHGUI object */
84 LightApp_SelectionMgr* mySelectionMgr ; /* User shape selection */
85 SVTK_Selector* mySelector;
87 int myNbOkElements ; /* to check when elements are defined */
89 QLineEdit* myEditCurrentArgument;
91 SMESH::SMESH_Mesh_var myMesh;
93 SMESH::TPolySimulation* mySimulation;
95 QButtonGroup* GroupConstructors;
96 QRadioButton* RadioButton1;
97 QRadioButton* RadioButton2;
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;
113 QString myHelpFileName;
122 void ConstructorsClicked(int constructorId);
123 void ClickOnPreview(bool theToggled);
125 void ClickOnCancel();
128 void SetEditCurrentArgument() ;
129 void SelectionIntoArgument() ;
130 void DeactivateActiveDialog() ;
131 void ActivateThisDialog() ;
132 void onTextChange(const QString&);
133 void onListSelectionChanged();
136 QGridLayout* SMESHGUI_CreatePolyhedralVolumeDlgLayout;
137 QGridLayout* GroupConstructorsLayout;
138 QGridLayout* GroupButtonsLayout;
139 QGridLayout* GroupContentLayout;
142 #endif // DIALOGBOX_CREATEPOLYHEDRAL_H