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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SMESHGUI_CreatePatternDlg.h
23 // Author : Sergey LITONIN
27 #ifndef SMESHGUI_CreatePatternDlg_H
28 #define SMESHGUI_CreatePatternDlg_H
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(GEOM_Gen)
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36 #include CORBA_SERVER_HEADER(SMESH_Pattern)
38 class SMESHGUI_PatternWidget;
39 class SALOMEDSClient_SObject;
44 class SMESHGUI_SpinBox;
46 class LightApp_SelectionMgr;
51 class SVTK_ViewWindow;
56 * Class : SMESHGUI_CreatePatternDlg
57 * Description : Dialog to specify filters for VTK viewer
60 class SMESHGUI_CreatePatternDlg : public QDialog
65 enum { Type_2d, Type_3d };
68 SMESHGUI_CreatePatternDlg( SMESHGUI*,
71 virtual ~SMESHGUI_CreatePatternDlg();
74 QString GetPatternName() const;
75 SMESH::SMESH_Pattern_ptr GetPattern();
76 void SetMesh (SMESH::SMESH_Mesh_ptr);
85 void closeEvent (QCloseEvent* e);
86 void enterEvent (QEvent*);
96 void onSelectionDone();
97 void onTypeChanged (int);
98 void onProject (bool);
99 void onSelBtnClicked();
103 QFrame* createButtonFrame (QWidget*);
104 QFrame* createMainFrame (QWidget*);
105 void displayPreview();
107 void activateSelection();
108 QString autoExtension (const QString& theFileName) const;
110 bool loadFromObject (const bool = true);
111 QString getDefaultName() const;
112 GEOM::GEOM_Object_ptr getGeom (SALOMEDSClient_SObject*) const;
116 QPushButton* myOkBtn;
117 QPushButton* mySaveBtn;
118 QPushButton* myCloseBtn;
120 QButtonGroup* myTypeGrp;
121 QRadioButton* mySwitch2d;
122 QRadioButton* mySwitch3d;
123 QRadioButton* mySwitchSMESH_Pattern3d;
125 QLineEdit* myMeshEdit;
128 SMESHGUI_PatternWidget* myPicture2d;
130 QCheckBox* myProjectChk;
132 SMESHGUI* mySMESHGUI;
133 SVTK_Selector* mySelector;
134 LightApp_SelectionMgr* mySelectionMgr;
138 SMESH::SMESH_Mesh_var myMesh;
139 SMESH::SMESH_subMesh_var mySubMesh;
140 GEOM::GEOM_Object_var myGeomObj;
142 SMESH::SMESH_Pattern_var myPattern;