X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEntityGUI%2FEntityGUI_SketcherDlg.h;h=d8bed62f36dee239070fb5b5d72e18eec5a71991;hb=35a548b486b525c4215cee7819265cecce69b99a;hp=fd36ce6a9dc38f954250fc80ea7417ed1bb0db06;hpb=bc4ee77be9914d9816cbce26496a8d8a6685fa99;p=modules%2Fgeom.git diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index fd36ce6a9..d8bed62f3 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -49,6 +49,7 @@ class EntityGUI_Point; class EntityGUI_Dir1; class EntityGUI_Dir2; class EntityGUI_Skeleton; +class DlgRef_4Spin; class GeometryGUI; #ifndef COORD_MIN @@ -68,14 +69,13 @@ class EntityGUI_SketcherDlg : public QDialog, GEOMBase_Helper public: EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0, - const double = 2. ); + const double = -1 ); ~EntityGUI_SketcherDlg(); bool eventFilter (QObject* object, QEvent* event); - bool acceptMouseEvent() const { return ( getPnt1ConstructorId() == 1 - || getPnt1ConstructorId() == 0 ); } //accept mouse event only on absolute and relative selection mode - void OnPointSelected( Qt::KeyboardModifiers, const gp_Pnt& ); // called by EntityGUI::OnMousePress() + bool acceptMouseEvent() const; // called by EntityGUI::OnMousePress() + void OnPointSelected( Qt::KeyboardModifiers, const gp_Pnt&, bool isStart = true ); protected: void initSpinBox( SalomeApp_DoubleSpinBox*, @@ -86,7 +86,8 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); - + virtual void addSubshapesToStudy(); + void closeEvent( QCloseEvent* ); void keyPressEvent( QKeyEvent* ); @@ -118,6 +119,9 @@ private: TopoDS_Shape& ); int getPnt1ConstructorId() const; int getPnt2ConstructorId() const; + void OnFirstPoint(); + void OnNextPoint(); + private: int myConstructorId; @@ -139,12 +143,14 @@ private: QStringList myUndoParameters; Standard_Real myX, myY, myDX, myDY; + Standard_Real myX1, myY1, myX2, myY2; Standard_Real myXc, myYc, myDXc, myDYc; Standard_Real myLength, myAngle, myRadius; Standard_Real myLastX1, myLastY1; Standard_Real myLastX2, myLastY2; QString myXStr, myYStr, myDXStr, myDYStr; + QString myX1Str, myY1Str, myX2Str, myY2Str; QString myXcStr, myYcStr, myDXcStr, myDYcStr; QString myLengthStr, myAngleStr, myRadiusStr; QString myLastX1Str, myLastY1Str; @@ -164,12 +170,16 @@ private: EntityGUI_2Spin* Group2Spin; EntityGUI_3Spin1Check* Group3Spin; EntityGUI_4Spin1Check* Group4Spin; + DlgRef_4Spin* GroupRect; QLabel* myErrLabel; QGroupBox* GroupBox1; QComboBox* ComboBox1; QPushButton* planeButton; + QPushButton* selButton; + + QLineEdit* WPlaneLineEdit; GeometryGUI* myGeometryGUI; @@ -178,6 +188,9 @@ private: double myLineWidth; QList myLCSList; + GEOM::GEOM_Object_var myGlobalCS; + GEOM::GEOM_Object_var myWPlane; + QList< GEOM::GEOM_Object_var > myWPlaneList; int myCheckFlag; @@ -207,6 +220,7 @@ private slots: void DeactivateActiveDialog(); void ActivateThisDialog(); void TypeClicked( int ); + void RectClicked(); void DestClicked( int ); void PointClicked( int ); void Point2Clicked( int ); @@ -215,8 +229,10 @@ private slots: void CheckBoxClicked( int ); void ValueChangedInSpinBox( double ); void SetDoubleSpinBoxStep( double ); + void AddLocalCS( GEOM::GEOM_Object_var ); void FindLocalCS(); gp_Ax3 GetActiveLocalCS(); + gp_Ax3 WPlaneToLCS( GEOM::GEOM_Object_var ); void ActivateLocalCS(); };