Version: 8.3.0
SMESHGUI_ScaleDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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, or (at your option) any later version.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 // SMESH SMESHGUI : GUI for SMESH component
21 // File : SMESHGUI_ScaleDlg.h
22 // Author : Sergey Kuul, Open CASCADE S.A.S.
23 //
24 #ifndef SMESHGUI_SCALEDLG_H
25 #define SMESHGUI_SCALEDLG_H
26 
27 // SMESH includes
28 #include "SMESH_SMESHGUI.hxx"
29 #include "SMESHGUI_PreviewDlg.h"
30 
31 // IDL includes
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(SMESH_Mesh)
34 
35 class QButtonGroup;
36 class QGroupBox;
37 class QLabel;
38 class QLineEdit;
39 class QPushButton;
40 class QRadioButton;
41 class QCheckBox;
42 class SMESHGUI;
44 class SMESHGUI_SpinBox;
45 class SMESHGUI_FilterDlg;
46 class SMESH_Actor;
47 class SVTK_Selector;
48 class LightApp_SelectionMgr;
50 
51 //=================================================================================
52 // class : SMESHGUI_ScaleDlg
53 // purpose :
54 //=================================================================================
56 {
57  Q_OBJECT
58 
59 public:
62 
63 private:
64  void Init( bool = true );
65  void enterEvent( QEvent* ); /* mouse enter the QWidget */
66  void keyPressEvent( QKeyEvent* );
67  int GetConstructorId();
68  void setNewMeshName();
69 
70  bool isValid();
71  void getScale( SMESH::PointStruct& thePoint,
72  SMESH::double_array_var& theScaleFact);
73 
75  LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
76  QString myElementsId;
77  int myNbOkElements; /* to check when elements are defined */
78 
79  SVTK_Selector* mySelector;
80 
82 
83  bool myBusy;
86 
87  QList<SMESH::SMESH_IDSource_var> myObjects;
88  QList<QString> myObjectsNames;
89  QList<SMESH::SMESH_Mesh_var> myMeshes;
90 
91 
93  QButtonGroup* GroupConstructors;
94  QRadioButton* RadioButton1;
95  QRadioButton* RadioButton2;
97  QPushButton* buttonOk;
98  QPushButton* buttonCancel;
99  QPushButton* buttonApply;
100  QPushButton* buttonHelp;
103  QPushButton* SelectElementsButton;
104  QLineEdit* LineEditElements;
105  QCheckBox* CheckBoxMesh;
106  QLabel* TextLabel1;
107  QPushButton* SelectButton1;
108  QLabel* TextLabel1_1;
110  QLabel* TextLabel1_2;
112  QLabel* TextLabel1_3;
114  QLabel* TextLabel2;
116  QLabel* TextLabel3;
118  QLabel* TextLabel4;
121  QButtonGroup* ActionGroup;
122  QCheckBox* MakeGroupsCheck;
123  QLineEdit* LineEditNewMesh;
124 
125  QString myHelpFileName;
126 
127  QPushButton* myFilterBtn;
129 
130 
131 protected slots:
132  virtual void onDisplaySimulation( bool );
133  virtual void reject();
134  void onFilterAccepted();
135 
136 private slots:
137  void ConstructorsClicked( int );
138  void ClickOnOk();
139  bool ClickOnApply();
140  void ClickOnHelp();
141  void SetEditCurrentArgument();
142  void SelectionIntoArgument();
143  void DeactivateActiveDialog();
144  void ActivateThisDialog();
145  void onTextChange( const QString& );
146  void onSelectMesh( bool );
147  void onActionClicked( int );
148  void onOpenView();
149  void onCloseView();
150  void setFilters();
151 };
152 
153 #endif // SMESHGUI_SCALEDLG_H