Salome HOME
Update copyright information
[modules/geom.git] / src / TransformationGUI / TransformationGUI_ScaleDlg.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // GEOM GEOMGUI : GUI for Geometry component
23 // File   : TransformationGUI_ScaleDlg.h
24 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
25 //
26 #ifndef TRANSFORMATIONGUI_SCALEDLG_H
27 #define TRANSFORMATIONGUI_SCALEDLG_H
28
29 #include <GEOMBase_Skeleton.h>
30
31 class QCheckBox;
32 class QGroupBox;
33 class QLabel;
34 class QLineEdit;
35 class QPushButton;
36 class QtxDoubleSpinBox;
37
38 //=================================================================================
39 // class    : TransformationGUI_ScaleDlg
40 // purpose  :
41 //=================================================================================
42 class TransformationGUI_ScaleDlg : public GEOMBase_Skeleton
43
44   Q_OBJECT
45
46 public:
47   TransformationGUI_ScaleDlg( GeometryGUI*, QWidget* = 0,
48                               bool = false, Qt::WindowFlags = 0 );
49   ~TransformationGUI_ScaleDlg();
50
51 protected:
52   // redefined from GEOMBase_Helper
53   virtual GEOM::GEOM_IOperations_ptr createOperation();
54   virtual bool                       isValid( QString& );
55   virtual bool                       execute( ObjectList& );
56   virtual void                       addSubshapesToStudy();
57   virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
58
59 private:
60   void                               Init();
61   void                               enterEvent( QEvent* );
62
63 private:
64   GEOM::ListOfGO                     myObjects;
65   GEOM::GEOM_Object_var              myPoint;   /* Central Point */
66
67   // to initialize the first selection field with a selected object on the dialog creation
68   bool                               myInitial;
69     
70   QGroupBox*                         GroupBox1;
71   QLabel*                            TextLabel1;
72   QLabel*                            TextLabel2;
73   QPushButton*                       PushButton1;
74   QPushButton*                       PushButton2;
75   QLineEdit*                         LineEdit1;
76   QLineEdit*                         LineEdit2;
77   QLabel*                            TextLabel3;
78   QLabel*                            TextLabel4;
79   QLabel*                            TextLabel5;
80   QtxDoubleSpinBox*                  SpinBox_FX;
81   QtxDoubleSpinBox*                  SpinBox_FY;
82   QtxDoubleSpinBox*                  SpinBox_FZ;
83   QCheckBox*                         CheckBoxCopy;
84
85 private slots:
86   void                               ClickOnOk();
87   bool                               ClickOnApply();
88   void                               ActivateThisDialog();
89   void                               LineEditReturnPressed();
90   void                               SelectionIntoArgument();
91   void                               SetEditCurrentArgument();
92   void                               ConstructorsClicked( int );
93   void                               ValueChangedInSpinBox();
94   void                               CreateCopyModeChanged( bool );
95   void                               SetDoubleSpinBoxStep( double );
96 };
97
98 #endif // TRANSFORMATIONGUI_SCALEDLG_H