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
43 class SALOME_Selection;
\r
50 Class : SMESHGUI_CreatePatternDlg
\r
51 Description : Dialog to specify filters for VTK viewer
\r
54 class SMESHGUI_CreatePatternDlg : public QDialog
\r
60 enum { Type_2d, Type_3d };
\r
63 SMESHGUI_CreatePatternDlg( QWidget*,
\r
67 virtual ~SMESHGUI_CreatePatternDlg();
\r
69 void Init( SALOME_Selection*, const int );
\r
70 QString GetPatternName() const;
\r
71 SMESH::SMESH_Pattern_ptr GetPattern();
\r
72 void SetMesh( SMESH::SMESH_Mesh_ptr );
\r
81 void closeEvent( QCloseEvent* e ) ;
\r
82 void enterEvent ( QEvent * ) ;
\r
90 void onDeactivate();
\r
92 void onSelectionDone();
\r
93 void onTypeChanged( int );
\r
94 void onProject( bool );
\r
95 void onSelBtnClicked();
\r
99 QFrame* createButtonFrame( QWidget* );
\r
100 QFrame* createMainFrame ( QWidget* );
\r
101 void displayPreview();
\r
102 void erasePreview();
\r
103 void activateSelection();
\r
104 QString autoExtension( const QString& theFileName ) const;
\r
106 bool loadFromObject( const bool = true );
\r
107 QString getDefaultName() const;
\r
108 GEOM::GEOM_Object_ptr getGeom( SALOMEDS::SObject_ptr );
\r
112 QPushButton* myOkBtn;
\r
113 QPushButton* mySaveBtn;
\r
114 QPushButton* myCloseBtn;
\r
116 QButtonGroup* myTypeGrp;
\r
117 QRadioButton* mySwitch2d;
\r
118 QRadioButton* mySwitch3d;
\r
119 QRadioButton* mySwitchSMESH_Pattern3d;
\r
121 QLineEdit* myMeshEdit;
\r
124 SMESHGUI_PatternWidget* myPicture2d;
\r
126 QCheckBox* myProjectChk;
\r
128 SALOME_Selection* mySelection;
\r
132 SMESH::SMESH_Mesh_var myMesh;
\r
133 SMESH::SMESH_subMesh_var mySubMesh;
\r
134 GEOM::GEOM_Object_var myGeomObj;
\r
136 SMESH::SMESH_Pattern_var myPattern;
\r