X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCCViewer%2FOCCViewer_ViewSketcher.h;h=6e11d24dcb2775772fa166a9d80ad589f248537a;hb=refs%2Ftags%2FV9_11_0;hp=4b400c6aa4f5b634abf93efb0d583c02933ba7f6;hpb=91cc8846bfa36302f7ade6cb8aa380f03e90423e;p=modules%2Fgui.git diff --git a/src/OCCViewer/OCCViewer_ViewSketcher.h b/src/OCCViewer/OCCViewer_ViewSketcher.h old mode 100755 new mode 100644 index 4b400c6aa..6e11d24dc --- a/src/OCCViewer/OCCViewer_ViewSketcher.h +++ b/src/OCCViewer/OCCViewer_ViewSketcher.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -33,6 +33,7 @@ class QPolygon; class QtxRectRubberBand; class QtxPolyRubberBand; +class QtxCircleRubberBand; #ifdef WIN32 #pragma warning ( disable:4251 ) @@ -69,6 +70,9 @@ public: virtual bool isDefault() const; virtual bool eventFilter( QObject*, QEvent* ); + virtual void setSketcherMode(int) {} + virtual int sketcherMode() const { return 0; } + private slots: void onDrawViewPort(); @@ -119,9 +123,16 @@ protected: class OCCVIEWER_EXPORT OCCViewer_PolygonSketcher : public OCCViewer_ViewSketcher { public: + enum SketchMode { Poligone, Circle }; + OCCViewer_PolygonSketcher( OCCViewer_ViewWindow*, int ); virtual ~OCCViewer_PolygonSketcher(); + virtual void setSketcherMode(int theMode); + virtual int sketcherMode() const { + return myMode; + } + protected: virtual bool onKey( QKeyEvent* ); virtual void onMouse( QMouseEvent* ); @@ -142,6 +153,9 @@ private: int myDelButton; QtxPolyRubberBand* mypPolyRB; + QtxCircleRubberBand* mypCircleRB; + + SketchMode myMode; }; #ifdef WIN32