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=06606c3ee7474bc3e7c82d8eee38ea07b93ad282;hpb=034a705024b224972c148e1e3834c5ee38df184b;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 06606c3ee..6e11d24dc --- a/src/OCCViewer/OCCViewer_ViewSketcher.h +++ b/src/OCCViewer/OCCViewer_ViewSketcher.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 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