X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCCViewer%2FOCCViewer_ViewSketcher.h;h=7e67b25d3ff8b44e6c229e68c645d3d117888e72;hb=b6e35aa42d3c67a529d7f9339718dfaed6891323;hp=06606c3ee7474bc3e7c82d8eee38ea07b93ad282;hpb=6878ef4d7381638ec39d1ca9d03afc21a69401aa;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..7e67b25d3 --- 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-2024 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