]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_ScaleDlg.h
Salome HOME
Fix OwnHypothesis()
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ScaleDlg.h
1 // Copyright (C) 2007-2013  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.
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;
43 class SMESHGUI_IdValidator;
44 class SMESHGUI_SpinBox;
45 class SMESHGUI_FilterDlg;
46 class SMESH_Actor;
47 class SVTK_Selector;
48 class LightApp_SelectionMgr;
49 class SMESH_LogicalFilter;
50
51 //=================================================================================
52 // class    : SMESHGUI_ScaleDlg
53 // purpose  :
54 //=================================================================================
55 class SMESHGUI_EXPORT SMESHGUI_ScaleDlg : public SMESHGUI_PreviewDlg
56
57   Q_OBJECT
58
59 public:
60   SMESHGUI_ScaleDlg( SMESHGUI* );
61   ~SMESHGUI_ScaleDlg();
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
74   SMESHGUI_IdValidator*  myIdValidator;
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
81   QWidget*               myEditCurrentArgument;
82
83   bool                   myBusy;
84   SMESH::SMESH_Mesh_var  myMesh;
85   SMESH_Actor*           myActor;
86   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
87
88   SMESH::SMESH_IDSource_var mySelectedObject;
89
90   QGroupBox*             ConstructorsBox;
91   QButtonGroup*          GroupConstructors;
92   QRadioButton*          RadioButton1;
93   QRadioButton*          RadioButton2;
94   QGroupBox*             GroupButtons;
95   QPushButton*           buttonOk;
96   QPushButton*           buttonCancel;
97   QPushButton*           buttonApply;
98   QPushButton*           buttonHelp;
99   QGroupBox*             GroupArguments;
100   QLabel*                TextLabelElements;
101   QPushButton*           SelectElementsButton;
102   QLineEdit*             LineEditElements;
103   QCheckBox*             CheckBoxMesh;
104   QLabel*                TextLabel1;
105   QPushButton*           SelectButton1;
106   QLabel*                TextLabel1_1;
107   SMESHGUI_SpinBox*      SpinBox1_1;
108   QLabel*                TextLabel1_2;
109   SMESHGUI_SpinBox*      SpinBox1_2;
110   QLabel*                TextLabel1_3;
111   SMESHGUI_SpinBox*      SpinBox1_3;
112   QLabel*                TextLabel2;
113   SMESHGUI_SpinBox*      SpinBox_FX;
114   QLabel*                TextLabel3;
115   SMESHGUI_SpinBox*      SpinBox_FY;
116   QLabel*                TextLabel4;
117   SMESHGUI_SpinBox*      SpinBox_FZ;
118   QGroupBox*             ActionBox;
119   QButtonGroup*          ActionGroup;
120   QCheckBox*             MakeGroupsCheck;
121   QLineEdit*             LineEditNewMesh;
122
123   QString                myHelpFileName;
124
125   QPushButton*           myFilterBtn;
126   SMESHGUI_FilterDlg*    myFilterDlg;
127
128
129 protected slots:
130   virtual void           onDisplaySimulation( bool );
131   virtual void           reject();
132    
133 private slots:
134   void                   ConstructorsClicked( int );
135   void                   ClickOnOk();
136   bool                   ClickOnApply();
137   void                   ClickOnHelp();
138   void                   SetEditCurrentArgument();
139   void                   SelectionIntoArgument();
140   void                   DeactivateActiveDialog();
141   void                   ActivateThisDialog();
142   void                   onTextChange( const QString& );
143   void                   onSelectMesh( bool );
144   void                   onActionClicked( int );
145   void                   setFilters();
146 };
147
148 #endif // SMESHGUI_SCALEDLG_H