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
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*);
87 void keyPressEvent(QKeyEvent*);
98 void onSelectionDone();
99 void onTypeChanged (int);
100 void onProject (bool);
101 void onSelBtnClicked();
105 QFrame* createButtonFrame (QWidget*);
106 QFrame* createMainFrame (QWidget*);
107 void displayPreview();
109 void activateSelection();
110 QString autoExtension (const QString& theFileName) const;
112 bool loadFromObject (const bool = true);
113 QString getDefaultName() const;
114 GEOM::GEOM_Object_ptr getGeom (SALOMEDSClient_SObject*) const;
118 QPushButton* myOkBtn;
119 QPushButton* mySaveBtn;
120 QPushButton* myCloseBtn;
121 QPushButton* myHelpBtn;
123 QButtonGroup* myTypeGrp;
124 QRadioButton* mySwitch2d;
125 QRadioButton* mySwitch3d;
126 QRadioButton* mySwitchSMESH_Pattern3d;
128 QLineEdit* myMeshEdit;
131 SMESHGUI_PatternWidget* myPicture2d;
133 QCheckBox* myProjectChk;
135 SMESHGUI* mySMESHGUI;
136 SVTK_Selector* mySelector;
137 LightApp_SelectionMgr* mySelectionMgr;
141 SMESH::SMESH_Mesh_var myMesh;
142 SMESH::SMESH_subMesh_var mySubMesh;
143 GEOM::GEOM_Object_var myGeomObj;
145 SMESH::SMESH_Pattern_var myPattern;
148 QString myHelpFileName;