00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // GEOM GEOMGUI : GUI for Geometry component 00024 // File : TransformationGUI_ScaleDlg.h 00025 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S. 00026 // 00027 #ifndef TRANSFORMATIONGUI_SCALEDLG_H 00028 #define TRANSFORMATIONGUI_SCALEDLG_H 00029 00030 #include "GEOMBase_Skeleton.h" 00031 #include "GEOM_GenericObjPtr.h" 00032 00033 class QCheckBox; 00034 class QGroupBox; 00035 class QLabel; 00036 class QLineEdit; 00037 class QPushButton; 00038 class SalomeApp_DoubleSpinBox; 00039 00040 //================================================================================= 00041 // class : TransformationGUI_ScaleDlg 00042 // purpose : 00043 //================================================================================= 00044 class TransformationGUI_ScaleDlg : public GEOMBase_Skeleton 00045 { 00046 Q_OBJECT 00047 00048 public: 00049 TransformationGUI_ScaleDlg( GeometryGUI*, QWidget* = 0, 00050 bool = false, Qt::WindowFlags = 0 ); 00051 ~TransformationGUI_ScaleDlg(); 00052 00053 protected: 00054 // redefined from GEOMBase_Helper 00055 virtual GEOM::GEOM_IOperations_ptr createOperation(); 00056 virtual bool isValid( QString& ); 00057 virtual bool execute( ObjectList& ); 00058 virtual void addSubshapesToStudy(); 00059 virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); 00060 00061 private: 00062 void Init(); 00063 void enterEvent( QEvent* ); 00064 00065 private: 00066 QList<GEOM::GeomObjPtr> myObjects; 00067 GEOM::GeomObjPtr myPoint; /* Central Point */ 00068 00069 // to initialize the first selection field with a selected object on the dialog creation 00070 bool myInitial; 00071 00072 QGroupBox* GroupBox1; 00073 QLabel* TextLabel1; 00074 QLabel* TextLabel2; 00075 QPushButton* PushButton1; 00076 QPushButton* PushButton2; 00077 QLineEdit* LineEdit1; 00078 QLineEdit* LineEdit2; 00079 QLabel* TextLabel3; 00080 QLabel* TextLabel4; 00081 QLabel* TextLabel5; 00082 SalomeApp_DoubleSpinBox* SpinBox_FX; 00083 SalomeApp_DoubleSpinBox* SpinBox_FY; 00084 SalomeApp_DoubleSpinBox* SpinBox_FZ; 00085 QCheckBox* CheckBoxCopy; 00086 00087 private slots: 00088 void ClickOnOk(); 00089 bool ClickOnApply(); 00090 void ActivateThisDialog(); 00091 void SelectionIntoArgument(); 00092 void SetEditCurrentArgument(); 00093 void ConstructorsClicked( int ); 00094 void ValueChangedInSpinBox(); 00095 void CreateCopyModeChanged(); 00096 void SetDoubleSpinBoxStep( double ); 00097 }; 00098 00099 #endif // TRANSFORMATIONGUI_SCALEDLG_H