Salome HOME
Updated copyright comment
[modules/gui.git] / src / GraphicsView / GraphicsView_Viewer.h
index b5a355823da6e8b41312d20a5e8ecbede0ceda82..4b53ab2d13c7301aed5c8bcbc66d19114328512a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2013  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -52,7 +52,7 @@ public:
   enum TransformType { NoTransform, Reset, FitAll, FitRect, FitSelect,
                        Zoom, PanGlobal, Pan, FitWidth, UserTransform = 100 };
 public:
-  GraphicsView_Viewer( const QString& title );
+  GraphicsView_Viewer( const QString& title, QWidget* widget = NULL );
   ~GraphicsView_Viewer();
 
 public:
@@ -81,6 +81,7 @@ signals:
 
 protected:
   virtual GraphicsView_ViewTransformer* createTransformer( int );
+  virtual GraphicsView_ViewFrame* createViewFrame( SUIT_Desktop* theDesktop, QWidget* theWidget );
 
   virtual void                  onTransformationStarted();
   virtual void                  onTransformationFinished();
@@ -111,13 +112,13 @@ protected slots:
   void                          onTestCropOperatorPerform( QPainterPath thePath );
   */
 
-private:
-  void                          handleKeyPress( QKeyEvent* );
-  void                          handleKeyRelease( QKeyEvent* );
-  void                          handleMouseMove( QGraphicsSceneMouseEvent* );
-  void                          handleMousePress( QGraphicsSceneMouseEvent* );
-  void                          handleMouseRelease( QGraphicsSceneMouseEvent* );
-  void                          handleWheel( QGraphicsSceneWheelEvent* );
+protected:
+  virtual void                  handleKeyPress( QKeyEvent* );
+  virtual void                  handleKeyRelease( QKeyEvent* );
+  virtual void                  handleMouseMove( QGraphicsSceneMouseEvent* );
+  virtual void                  handleMousePress( QGraphicsSceneMouseEvent* );
+  virtual void                  handleMouseRelease( QGraphicsSceneMouseEvent* );
+  virtual void                  handleWheel( QGraphicsSceneWheelEvent* );
 
   // testing ImageViewer
   enum QueueOperation { BringToFront, SendToBack, BringForward, SendBackward };
@@ -126,6 +127,7 @@ private:
 protected:
   GraphicsView_Selector*        mySelector;
   GraphicsView_ViewTransformer* myTransformer;
+  QWidget*                      myWidget;
 
   bool                          myIsInitialized;
 };