diff --git a/app/plaYUVerApp.cpp b/app/plaYUVerApp.cpp index de1b6c1..3865f0d 100644 --- a/app/plaYUVerApp.cpp +++ b/app/plaYUVerApp.cpp @@ -596,6 +596,7 @@ Void plaYUVerApp::updateMenus() m_arrayActions[ZOOM_OUT_ACT]->setEnabled( hasSubWindow ); m_arrayActions[ZOOM_NORMAL_ACT]->setEnabled( hasSubWindow ); m_arrayActions[ZOOM_FIT_ACT]->setEnabled( hasSubWindow ); + m_arrayActions[ZOOM_FIT_ALL_ACT]->setEnabled( hasSubWindow ); m_pcZoomFactorSBox->setEnabled( hasSubWindow ); m_arrayActions[NAVIGATION_TOOL_ACT]->setEnabled( hasSubWindow ); @@ -749,6 +750,11 @@ Void plaYUVerApp::createActions() m_arrayActions[ZOOM_FIT_ACT]->setStatusTip( tr( "Zoom in or out to fit on the window." ) ); connect( m_arrayActions[ZOOM_FIT_ACT], SIGNAL( triggered() ), this, SLOT( zoomToFit() ) ); + m_arrayActions[ZOOM_FIT_ALL_ACT] = new QAction( tr( "Zoom to Fit All" ), this ); + //m_arrayActions[ZOOM_FIT_ALL_ACT]->setIcon( QIcon::fromTheme( "zoom-fit-best", QIcon( ":/images/fittowindow.png" ) ) ); + m_arrayActions[ZOOM_FIT_ALL_ACT]->setStatusTip( tr( "Apply zoom to fit to all windows" ) ); + connect( m_arrayActions[ZOOM_FIT_ALL_ACT], SIGNAL( triggered() ), this, SLOT( zoomToFitAll() ) ); + // ------------ Tools ------------ actionGroupTools = new QActionGroup( this ); actionGroupTools->setExclusive( true ); @@ -851,6 +857,7 @@ Void plaYUVerApp::createMenus() m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_OUT_ACT] ); m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_NORMAL_ACT] ); m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_FIT_ACT] ); + m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_FIT_ALL_ACT] ); m_arrayMenu[VIEW_MENU]->addSeparator(); diff --git a/app/plaYUVerApp.h b/app/plaYUVerApp.h index 5da5a66..b02fa76 100644 --- a/app/plaYUVerApp.h +++ b/app/plaYUVerApp.h @@ -87,6 +87,7 @@ private Q_SLOTS: void setZoomFromSBox( double ratio ); void normalSize(); void zoomToFit(); + void zoomToFitAll(); void setTool( int idxTool ); @@ -141,12 +142,8 @@ private: QString m_cLastOpenPath; - Void zoomToFitAll(); - Void updateMenus(); - - Void createActions(); Void createMenus(); Void createToolBars(); @@ -252,8 +249,9 @@ private: EXIT_ACT, ZOOM_IN_ACT, ZOOM_OUT_ACT, - ZOOM_FIT_ACT, ZOOM_NORMAL_ACT, + ZOOM_FIT_ACT, + ZOOM_FIT_ALL_ACT, NAVIGATION_TOOL_ACT, SELECTION_TOOL_ACT, TILE_WINDOWS_ACT,