Permalink
Browse files

add shortcuts for zomm in and out

  • Loading branch information...
Ramblurr committed Apr 25, 2011
1 parent 9e041b6 commit 62b605c7f9efb3be36e3cea7148fbefecbd71e8c
Showing with 2 additions and 0 deletions.
  1. +2 −0 MainWindow.cpp
View
@@ -208,12 +208,14 @@ void MainWindow::setupToolbar()
connect( this, SIGNAL( validImageDocument( bool ) ), headersAct, SLOT( setEnabled( bool ) ) );
viewMenu->addAction( headersAct );
QAction* zoomInAct = ui->mToolBar->addAction( QIcon::fromTheme( "zoom-in" ), tr( "Zoom &In" ), this, SLOT( slotActionZoom() ) );
+ zoomInAct->setShortcuts(QKeySequence::ZoomIn);
zoomInAct->setDisabled( true );
zoomInAct->setData( 1 );
viewMenu->addAction( zoomInAct );
connect( this, SIGNAL( validImageDocument( bool ) ), zoomInAct, SLOT( setEnabled( bool ) ) );
QAction* zoomOutAct = ui->mToolBar->addAction( QIcon::fromTheme( "zoom-out" ), tr( "Zoom &Out" ), this, SLOT( slotActionZoom() ) );
zoomOutAct->setDisabled( true );
+ zoomOutAct->setShortcuts(QKeySequence::ZoomOut);
zoomOutAct->setData( -1 );
viewMenu->addAction( zoomOutAct );
connect( this, SIGNAL( validImageDocument( bool ) ), zoomOutAct, SLOT( setEnabled( bool ) ) );

0 comments on commit 62b605c

Please sign in to comment.