1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // SMESH SMESHGUI : GUI for SMESH component
21 // File : SMESHGUI_ScaleDlg.h
22 // Author : Sergey Kuul, Open CASCADE S.A.S.
24 #ifndef SMESHGUI_SCALEDLG_H
25 #define SMESHGUI_SCALEDLG_H
28 #include "SMESH_SMESHGUI.hxx"
29 #include "SMESHGUI_PreviewDlg.h"
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(SMESH_Mesh)
43 class SMESHGUI_IdValidator;
44 class SMESHGUI_SpinBox;
45 class SMESHGUI_FilterDlg;
48 class LightApp_SelectionMgr;
49 class SMESH_LogicalFilter;
51 //=================================================================================
52 // class : SMESHGUI_ScaleDlg
54 //=================================================================================
55 class SMESHGUI_EXPORT SMESHGUI_ScaleDlg : public SMESHGUI_PreviewDlg
60 SMESHGUI_ScaleDlg( SMESHGUI* );
64 void Init( bool = true );
65 void closeEvent( QCloseEvent* );
66 void enterEvent( QEvent* ); /* mouse enter the QWidget */
67 void hideEvent( QHideEvent* ); /* ESC key */
68 void keyPressEvent( QKeyEvent* );
69 int GetConstructorId();
70 void setNewMeshName();
73 void getScale( SMESH::PointStruct& thePoint,
74 SMESH::double_array_var& theScaleFact);
76 SMESHGUI_IdValidator* myIdValidator;
77 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
79 int myNbOkElements; /* to check when elements are defined */
81 SVTK_Selector* mySelector;
83 QWidget* myEditCurrentArgument;
86 SMESH::SMESH_Mesh_var myMesh;
88 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
90 SMESH::SMESH_IDSource_var mySelectedObject;
92 QGroupBox* ConstructorsBox;
93 QButtonGroup* GroupConstructors;
94 QRadioButton* RadioButton1;
95 QRadioButton* RadioButton2;
96 QGroupBox* GroupButtons;
97 QPushButton* buttonOk;
98 QPushButton* buttonCancel;
99 QPushButton* buttonApply;
100 QPushButton* buttonHelp;
101 QGroupBox* GroupArguments;
102 QLabel* TextLabelElements;
103 QPushButton* SelectElementsButton;
104 QLineEdit* LineEditElements;
105 QCheckBox* CheckBoxMesh;
107 QPushButton* SelectButton1;
108 QLabel* TextLabel1_1;
109 SMESHGUI_SpinBox* SpinBox1_1;
110 QLabel* TextLabel1_2;
111 SMESHGUI_SpinBox* SpinBox1_2;
112 QLabel* TextLabel1_3;
113 SMESHGUI_SpinBox* SpinBox1_3;
115 SMESHGUI_SpinBox* SpinBox_FX;
117 SMESHGUI_SpinBox* SpinBox_FY;
119 SMESHGUI_SpinBox* SpinBox_FZ;
120 QGroupBox* ActionBox;
121 QButtonGroup* ActionGroup;
122 QCheckBox* MakeGroupsCheck;
123 QLineEdit* LineEditNewMesh;
125 QString myHelpFileName;
127 QPushButton* myFilterBtn;
128 SMESHGUI_FilterDlg* myFilterDlg;
132 virtual void onDisplaySimulation( bool );
135 void ConstructorsClicked( int );
137 void ClickOnCancel();
140 void SetEditCurrentArgument();
141 void SelectionIntoArgument();
142 void DeactivateActiveDialog();
143 void ActivateThisDialog();
144 void onTextChange( const QString& );
145 void onSelectMesh( bool );
146 void onActionClicked( int );
150 #endif // SMESHGUI_SCALEDLG_H