Salome HOME
Updated copyright comment
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewSketcher.h
old mode 100755 (executable)
new mode 100644 (file)
index 06606c3..7e67b25
@@ -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