1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SMESHGUI_CreatePatternDlg.h
21 // Author : Sergey LITONIN, Open CASCADE S.A.S.
24 #ifndef SMESHGUI_CREATEPATTERNDLG_H
25 #define SMESHGUI_CREATEPATTERNDLG_H
28 #include "SMESH_SMESHGUI.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36 #include CORBA_SERVER_HEADER(SMESH_Pattern)
38 class SMESHGUI_PatternWidget;
39 class SALOMEDSClient_SObject;
46 class LightApp_SelectionMgr;
50 * Class : SMESHGUI_CreatePatternDlg
51 * Description : Dialog to specify filters for VTK viewer
54 class SMESHGUI_EXPORT SMESHGUI_CreatePatternDlg : public QDialog
59 enum { Type_2d, Type_3d };
62 SMESHGUI_CreatePatternDlg( SMESHGUI*, const int );
63 virtual ~SMESHGUI_CreatePatternDlg();
65 void Init( const int );
66 QString GetPatternName() const;
67 SMESH::SMESH_Pattern_ptr GetPattern();
68 void SetMesh( SMESH::SMESH_Mesh_ptr );
75 void closeEvent( QCloseEvent* );
76 void enterEvent( QEvent* );
77 void keyPressEvent( QKeyEvent* );
87 void onSelectionDone();
88 void onTypeChanged( int );
89 void onProject( bool );
90 void onSelBtnClicked();
93 QWidget* createButtonFrame( QWidget* );
94 QWidget* createMainFrame( QWidget* );
95 void displayPreview();
97 void activateSelection();
98 QString autoExtension( const QString& ) const;
100 bool loadFromObject( const bool = true );
101 QString getDefaultName() const;
102 GEOM::GEOM_Object_ptr getGeom( SALOMEDSClient_SObject* ) const;
105 QButtonGroup* myTypeGrp;
106 QRadioButton* mySwitch2d;
107 QRadioButton* mySwitch3d;
109 QLineEdit* myMeshEdit;
112 SMESHGUI_PatternWidget* myPicture2d;
114 QCheckBox* myProjectChk;
116 SMESHGUI* mySMESHGUI;
117 SVTK_Selector* mySelector;
118 LightApp_SelectionMgr* mySelectionMgr;
121 SMESH::SMESH_Mesh_var myMesh;
122 SMESH::SMESH_subMesh_var mySubMesh;
123 GEOM::GEOM_Object_var myGeomObj;
125 SMESH::SMESH_Pattern_var myPattern;
128 QString myHelpFileName;
131 #endif // SMESHGUI_CREATEPATTERNDLG_H