X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FBasicGUI%2FBasicGUI_EllipseDlg.h;h=c80bce197165566632eb60c00d0bc4cbd2c68549;hb=b5a527a169307a38a1e88658883cc587cd831a75;hp=512b0c322803826862e2f2ac417367e90749c68b;hpb=c577ca78d7a6e286526662cf54df6de1f4f2f449;p=modules%2Fgeom.git diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.h b/src/BasicGUI/BasicGUI_EllipseDlg.h index 512b0c322..c80bce197 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.h +++ b/src/BasicGUI/BasicGUI_EllipseDlg.h @@ -1,40 +1,34 @@ -// GEOM GEOMGUI : GUI for Geometry component +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003 OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// File : BasicGUI_EllipseDlg.h -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ - -#ifndef BASICGUI_ELLIPSE_H -#define BASICGUI_ELLIPSE_H - -#include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel2Spin.h" +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// GEOM GEOMGUI : GUI for Geometry component +// File : BasicGUI_EllipseDlg.h +// Author : Nicolas REJNERI, Open CASCADE S.A.S. +// +#ifndef BASICGUI_ELLIPSEDLG_H +#define BASICGUI_ELLIPSEDLG_H -#include "BasicGUI.h" +#include -#include "GEOM_ShapeTypeFilter.hxx" -#include +class DlgRef_3Sel2Spin; //================================================================================= // class : BasicGUI_EllipseDlg @@ -42,42 +36,40 @@ //================================================================================= class BasicGUI_EllipseDlg : public GEOMBase_Skeleton { - Q_OBJECT + Q_OBJECT public: - BasicGUI_EllipseDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~BasicGUI_EllipseDlg(); + BasicGUI_EllipseDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 ); + ~BasicGUI_EllipseDlg(); -private : - void Init(); - void enterEvent(QEvent* e); - void MakeEllipseSimulationAndDisplay(); - - BasicGUI* myBasicGUI; - - double step; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filter selection */ - - gp_Pnt myPoint; /* Central point of ellipse */ - bool myOkPoint; /* true when myPoint is defined */ - gp_Dir myDir; /* to set normal axis of ellipse */ - bool myOkDir; /* true when myPoint is defined */ - - Standard_Real myMajorRadius; - Standard_Real myMinorRadius; - - DlgRef_2Sel2Spin* GroupPoints; +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& ); + virtual void addSubshapesToStudy(); + +private: + void Init(); + void enterEvent( QEvent* ); +private: + GEOM::GEOM_Object_var myPoint, myDir, myMajor; + + DlgRef_3Sel2Spin* GroupPoints; + private slots: - void ClickOnOk(); - void ClickOnApply(); - void ActivateThisDialog(); - void LineEditReturnPressed(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); - + void ClickOnOk(); + bool ClickOnApply(); + + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void ValueChangedInSpinBox( double ); + void SetDoubleSpinBoxStep( double ); }; -#endif // BASICGUI_ELLIPSE_H +#endif // BASICGUI_ELLIPSEDLG_H