1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_CreatePatternDlg.h
23 // Author : Sergey LITONIN
26 #ifndef SMESHGUI_CreatePatternDlg_H
27 #define SMESHGUI_CreatePatternDlg_H
29 #include "SMESH_SMESHGUI.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(GEOM_Gen)
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
37 #include CORBA_SERVER_HEADER(SMESH_Pattern)
39 class SMESHGUI_PatternWidget;
40 class SALOMEDSClient_SObject;
45 class SMESHGUI_SpinBox;
47 class LightApp_SelectionMgr;
52 class SVTK_ViewWindow;
57 * Class : SMESHGUI_CreatePatternDlg
58 * Description : Dialog to specify filters for VTK viewer
61 class SMESHGUI_EXPORT SMESHGUI_CreatePatternDlg : public QDialog
66 enum { Type_2d, Type_3d };
69 SMESHGUI_CreatePatternDlg( SMESHGUI*,
72 virtual ~SMESHGUI_CreatePatternDlg();
75 QString GetPatternName() const;
76 SMESH::SMESH_Pattern_ptr GetPattern();
77 void SetMesh (SMESH::SMESH_Mesh_ptr);
86 void closeEvent (QCloseEvent* e);
87 void enterEvent (QEvent*);
88 void keyPressEvent(QKeyEvent*);
99 void onSelectionDone();
100 void onTypeChanged (int);
101 void onProject (bool);
102 void onSelBtnClicked();
106 QFrame* createButtonFrame (QWidget*);
107 QFrame* createMainFrame (QWidget*);
108 void displayPreview();
110 void activateSelection();
111 QString autoExtension (const QString& theFileName) const;
113 bool loadFromObject (const bool = true);
114 QString getDefaultName() const;
115 GEOM::GEOM_Object_ptr getGeom (SALOMEDSClient_SObject*) const;
119 QPushButton* myOkBtn;
120 QPushButton* mySaveBtn;
121 QPushButton* myCloseBtn;
122 QPushButton* myHelpBtn;
124 QButtonGroup* myTypeGrp;
125 QRadioButton* mySwitch2d;
126 QRadioButton* mySwitch3d;
127 QRadioButton* mySwitchSMESH_Pattern3d;
129 QLineEdit* myMeshEdit;
132 SMESHGUI_PatternWidget* myPicture2d;
134 QCheckBox* myProjectChk;
136 SMESHGUI* mySMESHGUI;
137 SVTK_Selector* mySelector;
138 LightApp_SelectionMgr* mySelectionMgr;
142 SMESH::SMESH_Mesh_var myMesh;
143 SMESH::SMESH_subMesh_var mySubMesh;
144 GEOM::GEOM_Object_var myGeomObj;
146 SMESH::SMESH_Pattern_var myPattern;
149 QString myHelpFileName;