Salome HOME
Updated copyright comment
[modules/gui.git] / src / GraphicsView / GraphicsView_ViewPort.h
index 1d66b0ac260c14ef4dca5d0667fef204c2a50818..60a16683ab9d35d2a63a51f4caf747112cc8703d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-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
@@ -25,6 +25,7 @@
 #include "GraphicsView_Defs.h"
 
 #include <QGraphicsView>
+#include <QPainterPath>
 
 class QGridLayout;
 class QRubberBand;
@@ -55,7 +56,9 @@ public:
     DraggingByMiddleButton = 0x0010,
     ImmediateContextMenu   = 0x0020,
     ImmediateSelection     = 0x0040,
-    Sketching              = 0x0080
+    Sketching              = 0x0080,
+
+    GlobalWheelScaling     = 0x0100
   };
   Q_DECLARE_FLAGS( InteractionFlags, InteractionFlag )
 
@@ -77,7 +80,7 @@ public:
 
 public:
   GraphicsView_ViewPort( QWidget* theParent );
-  virtual ~GraphicsView_ViewPort();
+  ~GraphicsView_ViewPort();
 
 public:
   GraphicsView_Scene*              getScene() { return myScene; }
@@ -94,7 +97,7 @@ public:
   QImage                           dumpView( bool theWholeScene = false,
                                              QSizeF theSize = QSizeF() );
 
-  bool                             dumpViewToPSFormat(const QString& fileName);
+  bool                             dumpViewToFormat(const QString& fileName, const QString& format);
 
 public:
   // scene
@@ -164,6 +167,9 @@ public:
   int                              zoomCoeff() const { return myZoomCoeff; }
   void                             setZoomCoeff( const int& theZoomCoeff );
 
+  bool                             isUnlimitedPanning() const { return myUnlimitedPanning; }
+  void                             setUnlimitedPanning( const bool& theValue );
+
   // block status
   BlockStatus                      currentBlock();
 
@@ -303,6 +309,10 @@ private:
   bool                             myIsTransforming;
   QTransform                       myCurrentTransform;
 
+  bool                             myUnlimitedPanning;
+  Qt::ScrollBarPolicy              myHBarPolicy;
+  Qt::ScrollBarPolicy              myVBarPolicy;
+
   // highlighting
   GraphicsView_Object*             myHighlightedObject;
   double                           myHighlightX;