Salome HOME
new signals show/hide to update views
authorasl <asl@opencascade.com>
Mon, 20 Nov 2017 11:45:15 +0000 (14:45 +0300)
committerasl <asl@opencascade.com>
Mon, 20 Nov 2017 11:45:15 +0000 (14:45 +0300)
src/GraphicsView/GraphicsView_ViewFrame.cxx
src/GraphicsView/GraphicsView_ViewFrame.h

index c5f1dfaad6c4fd7266c6e58b818a1a270bd78eb0..eebb6c8fb87ed43bd9056b44754ff9ba811d96f2 100644 (file)
@@ -426,3 +426,27 @@ void GraphicsView_ViewFrame::contextMenuEvent( QGraphicsSceneContextMenuEvent* e
   emit contextMenuRequested( anEvent );
   delete anEvent;
 }
+
+/*!
+  \brief Handle show event.
+
+  Emits Show() signal.
+
+  \param theEvent show event
+*/
+void GraphicsView_ViewFrame::showEvent( QShowEvent* theEvent )
+{
+  emit Show( theEvent );
+}
+
+/*!
+  \brief Handle hide event.
+
+  Emits Hide() signal.
+
+  \param theEvent hide event
+*/
+void GraphicsView_ViewFrame::hideEvent( QHideEvent* theEvent )
+{
+  emit Hide( theEvent );
+}
index 746f19f70d31d1aa8ee89b9adfeb12f811ccf0b1..5969e2dbd3020d734d35accdd69d7cdb658a4fa2 100644 (file)
@@ -50,7 +50,6 @@ public:
   GraphicsView_ViewFrame( SUIT_Desktop*, GraphicsView_Viewer*, QWidget* w = NULL );
   ~GraphicsView_ViewFrame();
 
-public:
   GraphicsView_Viewer*    getViewer() const { return myViewer; }
   GraphicsView_ViewPort*  getViewPort() const  { return myViewPort; }
 
@@ -63,6 +62,10 @@ public:
   virtual void            expandToolBarActions();
   int                     getToolBarId();
 
+public slots:
+  virtual void showEvent( QShowEvent* );
+  virtual void hideEvent( QHideEvent* );
+
 protected slots:
   void                    onViewPan();
   void                    onViewZoom();
@@ -89,6 +92,9 @@ signals:
 
   void                    sketchingFinished( QPainterPath );
 
+  void Show( QShowEvent* );
+  void Hide( QHideEvent* );
+
 protected:
   virtual void            createActions();
   virtual int             createToolBar();