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*);
97 void onSelectionDone();
98 void onTypeChanged (int);
99 void onProject (bool);
100 void onSelBtnClicked();
104 QFrame* createButtonFrame (QWidget*);
105 QFrame* createMainFrame (QWidget*);
106 void displayPreview();
108 void activateSelection();
109 QString autoExtension (const QString& theFileName) const;
111 bool loadFromObject (const bool = true);
112 QString getDefaultName() const;
113 GEOM::GEOM_Object_ptr getGeom (SALOMEDSClient_SObject*) const;
117 QPushButton* myOkBtn;
118 QPushButton* mySaveBtn;
119 QPushButton* myCloseBtn;
120 QPushButton* myHelpBtn;
122 QButtonGroup* myTypeGrp;
123 QRadioButton* mySwitch2d;
124 QRadioButton* mySwitch3d;
125 QRadioButton* mySwitchSMESH_Pattern3d;
127 QLineEdit* myMeshEdit;
130 SMESHGUI_PatternWidget* myPicture2d;
132 QCheckBox* myProjectChk;
134 SMESHGUI* mySMESHGUI;
135 SVTK_Selector* mySelector;
136 LightApp_SelectionMgr* mySelectionMgr;
140 SMESH::SMESH_Mesh_var myMesh;
141 SMESH::SMESH_subMesh_var mySubMesh;
142 GEOM::GEOM_Object_var myGeomObj;
144 SMESH::SMESH_Pattern_var myPattern;
147 QString myHelpFileName;