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
22 // File : SMESHGUI_CreatePatternDlg.h
23 // Author : Sergey LITONIN
27 #ifndef SMESHGUI_CreatePatternDlg_H
28 #define SMESHGUI_CreatePatternDlg_H
30 #include "SMESH_SMESHGUI.hxx"
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(GEOM_Gen)
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38 #include CORBA_SERVER_HEADER(SMESH_Pattern)
40 class SMESHGUI_PatternWidget;
41 class SALOMEDSClient_SObject;
46 class SMESHGUI_SpinBox;
48 class LightApp_SelectionMgr;
53 class SVTK_ViewWindow;
58 * Class : SMESHGUI_CreatePatternDlg
59 * Description : Dialog to specify filters for VTK viewer
62 class SMESHGUI_EXPORT SMESHGUI_CreatePatternDlg : public QDialog
67 enum { Type_2d, Type_3d };
70 SMESHGUI_CreatePatternDlg( SMESHGUI*,
73 virtual ~SMESHGUI_CreatePatternDlg();
76 QString GetPatternName() const;
77 SMESH::SMESH_Pattern_ptr GetPattern();
78 void SetMesh (SMESH::SMESH_Mesh_ptr);
87 void closeEvent (QCloseEvent* e);
88 void enterEvent (QEvent*);
89 void keyPressEvent(QKeyEvent*);
100 void onSelectionDone();
101 void onTypeChanged (int);
102 void onProject (bool);
103 void onSelBtnClicked();
107 QFrame* createButtonFrame (QWidget*);
108 QFrame* createMainFrame (QWidget*);
109 void displayPreview();
111 void activateSelection();
112 QString autoExtension (const QString& theFileName) const;
114 bool loadFromObject (const bool = true);
115 QString getDefaultName() const;
116 GEOM::GEOM_Object_ptr getGeom (SALOMEDSClient_SObject*) const;
120 QPushButton* myOkBtn;
121 QPushButton* mySaveBtn;
122 QPushButton* myCloseBtn;
123 QPushButton* myHelpBtn;
125 QButtonGroup* myTypeGrp;
126 QRadioButton* mySwitch2d;
127 QRadioButton* mySwitch3d;
128 QRadioButton* mySwitchSMESH_Pattern3d;
130 QLineEdit* myMeshEdit;
133 SMESHGUI_PatternWidget* myPicture2d;
135 QCheckBox* myProjectChk;
137 SMESHGUI* mySMESHGUI;
138 SVTK_Selector* mySelector;
139 LightApp_SelectionMgr* mySelectionMgr;
143 SMESH::SMESH_Mesh_var myMesh;
144 SMESH::SMESH_subMesh_var mySubMesh;
145 GEOM::GEOM_Object_var myGeomObj;
147 SMESH::SMESH_Pattern_var myPattern;
150 QString myHelpFileName;