From 5f5e0d031864b082dab7d998ee4baa4393e3d0e2 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 7 Dec 2010 11:30:33 +0000 Subject: [PATCH] 0020938: EDF 1450 GEOM: center of zoom --- src/OCCViewer/OCCViewer_ViewFrame.cxx | 7 +++++++ src/OCCViewer/OCCViewer_ViewFrame.h | 3 +++ src/OCCViewer/OCCViewer_ViewWindow.h | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewFrame.cxx b/src/OCCViewer/OCCViewer_ViewFrame.cxx index e0eedf65f..57d135544 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.cxx +++ b/src/OCCViewer/OCCViewer_ViewFrame.cxx @@ -161,6 +161,13 @@ void OCCViewer_ViewFrame::setInteractionStyle( const int i ) } } +//************************************************************************************** +void OCCViewer_ViewFrame::setZoomingStyle( const int i ) +{ + foreach (OCCViewer_ViewWindow* aView, myViews) { + aView->setZoomingStyle(i); + } +} //************************************************************************************** void OCCViewer_ViewFrame::connectViewSignals(OCCViewer_ViewWindow* theView) diff --git a/src/OCCViewer/OCCViewer_ViewFrame.h b/src/OCCViewer/OCCViewer_ViewFrame.h index 19212da77..16db75607 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.h +++ b/src/OCCViewer/OCCViewer_ViewFrame.h @@ -67,6 +67,9 @@ public: virtual int interactionStyle() const { return getView(MAIN_VIEW)->interactionStyle(); } virtual void setInteractionStyle( const int i ); + virtual int zoomingStyle() const { return getView(MAIN_VIEW)->zoomingStyle(); } + virtual void setZoomingStyle( const int ); + virtual void setViewManager( SUIT_ViewManager* ); virtual bool eventFilter(QObject* watched, QEvent* e) { return SUIT_ViewWindow::eventFilter(watched, e); } diff --git a/src/OCCViewer/OCCViewer_ViewWindow.h b/src/OCCViewer/OCCViewer_ViewWindow.h index 3837db444..6dbbd582b 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.h +++ b/src/OCCViewer/OCCViewer_ViewWindow.h @@ -97,8 +97,8 @@ public: virtual int interactionStyle() const; virtual void setInteractionStyle( const int ); - int zoomingStyle() const; - void setZoomingStyle( const int ); + virtual int zoomingStyle() const; + virtual void setZoomingStyle( const int ); void setTransformEnabled( const OperationType, const bool ); bool transformEnabled( const OperationType ) const; -- 2.39.2