From: asl Date: Mon, 20 Nov 2017 11:45:15 +0000 (+0300) Subject: new signals show/hide to update views X-Git-Tag: V8_5_0b1^2~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a96dae0d145ccf6856d4d709f3661f11bc8f6963;p=modules%2Fgui.git new signals show/hide to update views --- diff --git a/src/GraphicsView/GraphicsView_ViewFrame.cxx b/src/GraphicsView/GraphicsView_ViewFrame.cxx index c5f1dfaad..eebb6c8fb 100644 --- a/src/GraphicsView/GraphicsView_ViewFrame.cxx +++ b/src/GraphicsView/GraphicsView_ViewFrame.cxx @@ -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 ); +} diff --git a/src/GraphicsView/GraphicsView_ViewFrame.h b/src/GraphicsView/GraphicsView_ViewFrame.h index 746f19f70..5969e2dbd 100644 --- a/src/GraphicsView/GraphicsView_ViewFrame.h +++ b/src/GraphicsView/GraphicsView_ViewFrame.h @@ -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();