From 95b20a550e54bd9023644222594e5d4ddb9aaa06 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 26 Jan 2016 13:39:06 +0300 Subject: [PATCH] Qt 5 migration: correction of bugs --- src/GLViewer/GLViewer_ViewFrame.cxx | 16 ++++++------ src/OCCViewer/OCCViewer_ViewPort.cxx | 30 --------------------- src/OCCViewer/OCCViewer_ViewPort.h | 4 --- src/Qtx/QtxWebBrowser.cxx | 4 +-- src/Qtx/QtxWorkspace.cxx | 8 ++++++ src/Qtx/QtxWorkspace.h | 6 +++++ src/SVTK/SVTK_ViewWindow.cxx | 36 +++++++++++++------------- src/VTKViewer/VTKViewer_ViewWindow.cxx | 32 +++++++++++------------ 8 files changed, 58 insertions(+), 78 deletions(-) diff --git a/src/GLViewer/GLViewer_ViewFrame.cxx b/src/GLViewer/GLViewer_ViewFrame.cxx index 8fb684394..fc19461e0 100644 --- a/src/GLViewer/GLViewer_ViewFrame.cxx +++ b/src/GLViewer/GLViewer_ViewFrame.cxx @@ -91,55 +91,55 @@ void GLViewer_ViewFrame::createActions() aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_DUMP" ) ), tr( "MNU_DUMP_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_DUMP_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView())); toolMgr()->registerAction( aAction, DumpId ); // FitAll aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITALL" ) ), tr( "MNU_FITALL" ), 0, this); aAction->setStatusTip(tr("DSC_FITALL")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitAll())); toolMgr()->registerAction( aAction, FitAllId ); // FitRect aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITAREA" ) ), tr( "MNU_FITRECT" ), 0, this); aAction->setStatusTip(tr("DSC_FITRECT")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitArea())); toolMgr()->registerAction( aAction, FitRectId ); // FitSelect aAction = new QtxAction(tr("MNU_FITSELECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITSELECT" ) ), tr( "MNU_FITSELECT" ), 0, this); aAction->setStatusTip(tr("DSC_FITSELECT")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitSelect())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitSelect())); toolMgr()->registerAction( aAction, FitSelectId ); // Zoom aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_ZOOM" ) ), tr( "MNU_ZOOM_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_ZOOM_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewZoom())); toolMgr()->registerAction( aAction, ZoomId ); // Panning aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_PAN" ) ), tr( "MNU_PAN_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_PAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewPan())); toolMgr()->registerAction( aAction, PanId ); // Global Panning aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_GLOBALPAN" ) ), tr( "MNU_GLOBALPAN_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewGlobalPan())); toolMgr()->registerAction( aAction, GlobalPanId ); aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_RESET" ) ), tr( "MNU_RESET_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_RESET_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onViewReset())); toolMgr()->registerAction( aAction, ResetId ); } diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index 7575a6a66..ad4de604e 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -468,36 +468,6 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const return 0; } -/*! - Creates the popup. [ virtual protected ] -*/ -/*void OCCViewer_ViewPort::onCreatePopup( QPopupMenu* popup ) -{ - if ( popup ) - { - QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this ); - a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) ); - connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor())); - myPopupActions.append( a ); - a->addTo( popup ); - } -}*/ - -/*! - Destroys the popup. [ virtual protected ] -*/ -/*void OCCViewer_ViewPort::onDestroyPopup( QPopupMenu* popup ) -{ - if ( popup ) - { - for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() ) - a->removeFrom( popup ); - //while (!myPopupActions.isEmpty()) - // delete myPopupActions.takeFirst(); - myPopupActions.clear(); - } -}*/ - /*! Performs synchronization of view parameters with the specified view. Returns \c true if synchronization is done successfully or \c false otherwise. diff --git a/src/OCCViewer/OCCViewer_ViewPort.h b/src/OCCViewer/OCCViewer_ViewPort.h index f1e1412c3..ae7b9e650 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.h +++ b/src/OCCViewer/OCCViewer_ViewPort.h @@ -91,10 +91,6 @@ protected: virtual void zoom( int, int, int, int ) = 0; virtual void fitAll( bool keepScale = false, bool withZ = true, bool upd = true ) = 0; -// POPUP -// void onCreatePopup( QPopupMenu* ); -// void onDestroyPopup( QPopupMenu* ); - public slots: virtual bool synchronize( OCCViewer_ViewPort* ); diff --git a/src/Qtx/QtxWebBrowser.cxx b/src/Qtx/QtxWebBrowser.cxx index 146029464..43c3d9386 100644 --- a/src/Qtx/QtxWebBrowser.cxx +++ b/src/Qtx/QtxWebBrowser.cxx @@ -394,10 +394,10 @@ QtxWebBrowser::QtxWebBrowser( ) : QMainWindow( 0 ) connect( myWebView, SIGNAL( linkClicked( QUrl ) ), SLOT( linkClicked( QUrl ) ) ); connect( myWebView->page(), SIGNAL( linkHovered( QString, QString, QString ) ), SLOT( linkHovered( QString, QString, QString ) ) ); - connect( myWebView->pageAction( QWebPage::DownloadLinkToDisk ), SIGNAL( activated() ), + connect( myWebView->pageAction( QWebPage::DownloadLinkToDisk ), SIGNAL( triggered() ), SLOT( linkAction() ) ); disconnect( myWebView->pageAction( QWebPage::OpenLink ), 0, 0, 0 ); - connect( myWebView->pageAction( QWebPage::OpenLink ), SIGNAL( activated() ), + connect( myWebView->pageAction( QWebPage::OpenLink ), SIGNAL( triggered() ), SLOT( linkAction() ) ); setCentralWidget( frame ); diff --git a/src/Qtx/QtxWorkspace.cxx b/src/Qtx/QtxWorkspace.cxx index 8739e529b..b8ad4fc05 100644 --- a/src/Qtx/QtxWorkspace.cxx +++ b/src/Qtx/QtxWorkspace.cxx @@ -136,3 +136,11 @@ void QtxWorkspace::tileHorizontal() x += actualW; } } + +void QtxWorkspace::onSubWindowActivated( QMdiSubWindow* subWindow ) +{ + QWidget* w = 0; + if ( subWindow ) + w = subWindow->widget(); + emit windowActivated( w ); +} diff --git a/src/Qtx/QtxWorkspace.h b/src/Qtx/QtxWorkspace.h index 58f72ecdd..fe7559498 100644 --- a/src/Qtx/QtxWorkspace.h +++ b/src/Qtx/QtxWorkspace.h @@ -39,9 +39,15 @@ public: QtxWorkspace( QWidget* = 0 ); virtual ~QtxWorkspace(); +signals: + void windowActivated( QWidget* ); + public slots: void tileVertical(); void tileHorizontal(); + +private slots: + void onSubWindowActivated( QMdiSubWindow* ); }; #ifdef WIN32 diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 2d98877d6..03f144750 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -2125,7 +2125,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ), tr( "MNU_DUMP_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_DUMP_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onDumpView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onDumpView())); mgr->registerAction( anAction, DumpId ); // FitAll @@ -2133,7 +2133,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ), tr( "MNU_FITALL" ), 0, this); anAction->setStatusTip(tr("DSC_FITALL")); - connect(anAction, SIGNAL(activated()), this, SLOT(onFitAll())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onFitAll())); mgr->registerAction( anAction, FitAllId ); // FitRect @@ -2141,7 +2141,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ), tr( "MNU_FITRECT" ), 0, this); anAction->setStatusTip(tr("DSC_FITRECT")); - connect(anAction, SIGNAL(activated()), this, SLOT(activateWindowFit())); + connect(anAction, SIGNAL(triggered()), this, SLOT(activateWindowFit())); mgr->registerAction( anAction, FitRectId ); // FitSelection @@ -2149,7 +2149,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITSELECTION" ) ), tr( "MNU_FITSELECTION" ), 0, this); anAction->setStatusTip(tr("DSC_FITSELECTION")); - connect(anAction, SIGNAL(activated()), this, SLOT(onFitSelection())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onFitSelection())); mgr->registerAction( anAction, FitSelectionId ); // Zoom @@ -2157,7 +2157,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ), tr( "MNU_ZOOM_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_ZOOM_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(activateZoom())); + connect(anAction, SIGNAL(triggered()), this, SLOT(activateZoom())); mgr->registerAction( anAction, ZoomId ); // Panning @@ -2165,7 +2165,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ), tr( "MNU_PAN_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_PAN_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(activatePanning())); + connect(anAction, SIGNAL(triggered()), this, SLOT(activatePanning())); mgr->registerAction( anAction, PanId ); // Global Panning @@ -2173,7 +2173,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ), tr( "MNU_GLOBALPAN_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning())); + connect(anAction, SIGNAL(triggered()), this, SLOT(activateGlobalPanning())); mgr->registerAction( anAction, GlobalPanId ); // Change rotation point @@ -2190,7 +2190,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ), tr( "MNU_ROTATE_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_ROTATE_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(activateRotation())); + connect(anAction, SIGNAL(triggered()), this, SLOT(activateRotation())); mgr->registerAction( anAction, RotationId ); // Projections @@ -2198,7 +2198,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ), tr( "MNU_FRONT_VIEW" ), 0, this, false, "Viewers:Front view"); anAction->setStatusTip(tr("DSC_FRONT_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onFrontView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onFrontView())); this->addAction(anAction); mgr->registerAction( anAction, FrontId ); @@ -2206,7 +2206,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ), tr( "MNU_BACK_VIEW" ), 0, this, false, "Viewers:Back view"); anAction->setStatusTip(tr("DSC_BACK_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onBackView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onBackView())); this->addAction(anAction); mgr->registerAction( anAction, BackId ); @@ -2214,7 +2214,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ), tr( "MNU_TOP_VIEW" ), 0, this, false, "Viewers:Top view"); anAction->setStatusTip(tr("DSC_TOP_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onTopView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onTopView())); this->addAction(anAction); mgr->registerAction( anAction, TopId ); @@ -2222,7 +2222,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ), tr( "MNU_BOTTOM_VIEW" ), 0, this, false, "Viewers:Bottom view"); anAction->setStatusTip(tr("DSC_BOTTOM_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onBottomView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onBottomView())); this->addAction(anAction); mgr->registerAction( anAction, BottomId ); @@ -2230,7 +2230,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ), tr( "MNU_LEFT_VIEW" ), 0, this, false, "Viewers:Left view"); anAction->setStatusTip(tr("DSC_LEFT_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onLeftView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onLeftView())); this->addAction(anAction); mgr->registerAction( anAction, LeftId ); @@ -2238,7 +2238,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ), tr( "MNU_RIGHT_VIEW" ), 0, this, false, "Viewers:Right view"); anAction->setStatusTip(tr("DSC_RIGHT_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onRightView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onRightView())); this->addAction(anAction); mgr->registerAction( anAction, RightId ); @@ -2265,7 +2265,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ), tr( "MNU_RESET_VIEW" ), 0, this, false, "Viewers:Reset view"); anAction->setStatusTip(tr("DSC_RESET_VIEW")); - connect(anAction, SIGNAL(activated()), this, SLOT(onResetView())); + connect(anAction, SIGNAL(triggered()), this, SLOT(onResetView())); this->addAction(anAction); mgr->registerAction( anAction, ResetId ); @@ -2374,7 +2374,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) tr( "MNU_SVTK_PRESELECTION_STANDARD" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_PRESELECTION_STANDARD")); anAction->setCheckable(true); - connect(anAction, SIGNAL(activated()), aSignalMapper, SLOT(map())); + connect(anAction, SIGNAL(triggered()), aSignalMapper, SLOT(map())); aSignalMapper->setMapping( anAction, Standard_Preselection ); mgr->registerAction( anAction, StandardPreselectionId ); @@ -2383,7 +2383,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) tr( "MNU_SVTK_PRESELECTION_DYNAMIC" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_PRESELECTION_DYNAMIC")); anAction->setCheckable(true); - connect(anAction, SIGNAL(activated()), aSignalMapper, SLOT(map())); + connect(anAction, SIGNAL(triggered()), aSignalMapper, SLOT(map())); aSignalMapper->setMapping( anAction, Dynamic_Preselection ); mgr->registerAction( anAction, DynamicPreselectionId ); @@ -2392,7 +2392,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) tr( "MNU_SVTK_PRESELECTION_DISABLED" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_PRESELECTION_DISABLED")); anAction->setCheckable(true); - connect(anAction, SIGNAL(activated()), aSignalMapper, SLOT(map())); + connect(anAction, SIGNAL(triggered()), aSignalMapper, SLOT(map())); aSignalMapper->setMapping( anAction, Preselection_Disabled ); mgr->registerAction( anAction, DisablePreselectionId ); diff --git a/src/VTKViewer/VTKViewer_ViewWindow.cxx b/src/VTKViewer/VTKViewer_ViewWindow.cxx index 084d961af..db3a50341 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.cxx +++ b/src/VTKViewer/VTKViewer_ViewWindow.cxx @@ -191,98 +191,98 @@ void VTKViewer_ViewWindow::createActions() aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ), tr( "MNU_DUMP_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_DUMP_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView())); myActionsMap[ DumpId ] = aAction; //! \li FitAll aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ), tr( "MNU_FITALL" ), 0, this); aAction->setStatusTip(tr("DSC_FITALL")); - connect(aAction, SIGNAL(activated()), this, SLOT(onFitAll())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onFitAll())); myActionsMap[ FitAllId ] = aAction; //! \li FitRect aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ), tr( "MNU_FITRECT" ), 0, this); aAction->setStatusTip(tr("DSC_FITRECT")); - connect(aAction, SIGNAL(activated()), this, SLOT(activateWindowFit())); + connect(aAction, SIGNAL(triggered()), this, SLOT(activateWindowFit())); myActionsMap[ FitRectId ] = aAction; //! \li FitSelection aAction = new QtxAction(tr("MNU_FITSELECTION"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITSELECTION" ) ), tr( "MNU_FITSELECTION" ), 0, this); aAction->setStatusTip(tr("DSC_FITSELECTION")); - connect(aAction, SIGNAL(activated()), this, SLOT(onFitSelection())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onFitSelection())); myActionsMap[ FitSelectionId ] = aAction; //! \li Zoom aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ), tr( "MNU_ZOOM_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_ZOOM_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(activateZoom())); + connect(aAction, SIGNAL(triggered()), this, SLOT(activateZoom())); myActionsMap[ ZoomId ] = aAction; //! \li Panning aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ), tr( "MNU_PAN_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_PAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(activatePanning())); + connect(aAction, SIGNAL(triggered()), this, SLOT(activatePanning())); myActionsMap[ PanId ] = aAction; //! \li Global Panning aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ), tr( "MNU_GLOBALPAN_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning())); + connect(aAction, SIGNAL(triggered()), this, SLOT(activateGlobalPanning())); myActionsMap[ GlobalPanId ] = aAction; //! \li Rotation aAction = new QtxAction(tr("MNU_ROTATE_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ), tr( "MNU_ROTATE_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_ROTATE_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(activateRotation())); + connect(aAction, SIGNAL(triggered()), this, SLOT(activateRotation())); myActionsMap[ RotationId ] = aAction; //! \li Projections aAction = new QtxAction(tr("MNU_FRONT_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ), tr( "MNU_FRONT_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_FRONT_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onFrontView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onFrontView())); myActionsMap[ FrontId ] = aAction; //! \li Back view aAction = new QtxAction(tr("MNU_BACK_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ), tr( "MNU_BACK_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_BACK_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onBackView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onBackView())); myActionsMap[ BackId ] = aAction; //! \li Top view aAction = new QtxAction(tr("MNU_TOP_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ), tr( "MNU_TOP_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_TOP_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onTopView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onTopView())); myActionsMap[ TopId ] = aAction; //! \li Bottom view aAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ), tr( "MNU_BOTTOM_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_BOTTOM_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onBottomView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onBottomView())); myActionsMap[ BottomId ] = aAction; //! \li Left view aAction = new QtxAction(tr("MNU_LEFT_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ), tr( "MNU_LEFT_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_LEFT_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onLeftView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onLeftView())); myActionsMap[ LeftId ] = aAction; //! \li Right view aAction = new QtxAction(tr("MNU_RIGHT_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ), tr( "MNU_RIGHT_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_RIGHT_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onRightView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onRightView())); myActionsMap[ RightId ] = aAction; // \li Rotate anticlockwise @@ -303,14 +303,14 @@ void VTKViewer_ViewWindow::createActions() aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ), tr( "MNU_RESET_VIEW" ), 0, this); aAction->setStatusTip(tr("DSC_RESET_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onResetView())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onResetView())); myActionsMap[ ResetId ] = aAction; //! \li Trihedron shown aAction = new QtxAction(tr("MNU_SHOW_TRIHEDRON"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ), tr( "MNU_SHOW_TRIHEDRON" ), 0, this); aAction->setStatusTip(tr("DSC_SHOW_TRIHEDRON")); - connect(aAction, SIGNAL(activated()), this, SLOT(onTrihedronShow())); + connect(aAction, SIGNAL(triggered()), this, SLOT(onTrihedronShow())); myActionsMap[ TrihedronShowId ] = aAction; } -- 2.39.2