1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
\r
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
\r
4 // This library is free software; you can redistribute it and/or
\r
5 // modify it under the terms of the GNU Lesser General Public
\r
6 // License as published by the Free Software Foundation; either
\r
7 // version 2.1 of the License.
\r
9 // This library is distributed in the hope that it will be useful,
\r
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
12 // Lesser General Public License for more details.
\r
14 // You should have received a copy of the GNU Lesser General Public
\r
15 // License along with this library; if not, write to the Free Software
\r
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
\r
22 // File : SMESHGUI_CreatePatternDlg.h
\r
23 // Author : Sergey LITONIN
\r
27 #ifndef SMESHGUI_CreatePatternDlg_H
\r
28 #define SMESHGUI_CreatePatternDlg_H
\r
30 #include <qdialog.h>
\r
33 #include <SALOMEconfig.h>
\r
34 #include CORBA_SERVER_HEADER(GEOM_Gen)
\r
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
\r
36 #include CORBA_SERVER_HEADER(SMESH_Pattern)
\r
38 class SMESHGUI_PatternWidget;
\r
42 class SMESHGUI_SpinBox;
\r
44 class SALOME_Selection;
\r
51 Class : SMESHGUI_CreatePatternDlg
\r
52 Description : Dialog to specify filters for VTK viewer
\r
55 class SMESHGUI_CreatePatternDlg : public QDialog
\r
61 enum { Type_2d, Type_3d };
\r
64 SMESHGUI_CreatePatternDlg( QWidget*,
\r
68 virtual ~SMESHGUI_CreatePatternDlg();
\r
70 void Init( SALOME_Selection*, const int );
\r
71 QString GetPatternName() const;
\r
72 SMESH::SMESH_Pattern_ptr GetPattern();
\r
73 void SetMesh( SMESH::SMESH_Mesh_ptr );
\r
82 void closeEvent( QCloseEvent* e ) ;
\r
83 void enterEvent ( QEvent * ) ;
\r
91 void onDeactivate();
\r
93 void onSelectionDone();
\r
94 void onTypeChanged( int );
\r
95 void onProject( bool );
\r
96 void onSelBtnClicked();
\r
100 QFrame* createButtonFrame( QWidget* );
\r
101 QFrame* createMainFrame ( QWidget* );
\r
102 void displayPreview();
\r
103 void erasePreview();
\r
104 void activateSelection();
\r
105 QString autoExtension( const QString& theFileName ) const;
\r
107 bool loadFromObject( const bool = true );
\r
108 QString getDefaultName() const;
\r
109 GEOM::GEOM_Object_ptr getGeom( SALOMEDS::SObject_ptr );
\r
113 QPushButton* myOkBtn;
\r
114 QPushButton* mySaveBtn;
\r
115 QPushButton* myCloseBtn;
\r
117 QButtonGroup* myTypeGrp;
\r
118 QRadioButton* mySwitch2d;
\r
119 QRadioButton* mySwitch3d;
\r
120 QRadioButton* mySwitchSMESH_Pattern3d;
\r
122 QLineEdit* myMeshEdit;
\r
125 SMESHGUI_PatternWidget* myPicture2d;
\r
127 QCheckBox* myProjectChk;
\r
129 SALOME_Selection* mySelection;
\r
133 SMESH::SMESH_Mesh_var myMesh;
\r
134 SMESH::SMESH_subMesh_var mySubMesh;
\r
135 GEOM::GEOM_Object_var myGeomObj;
\r
137 SMESH::SMESH_Pattern_var myPattern;
\r