Skip to content

Commit

Permalink
[FEATURE] Add keyboard shortcuts for composer zoom in/out/full, grou…
Browse files Browse the repository at this point in the history
…p… …
  • Loading branch information
nyalldawson authored and mhugent committed Oct 18, 2013
1 parent 48b4680 commit 6950972
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -244,6 +244,9 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
editMenu->addAction( mActionSelectNextAbove );

QMenu *viewMenu = menuBar()->addMenu( tr( "View" ) );
//Ctrl+= should also trigger zoom in
QShortcut* ctrlEquals = new QShortcut( QKeySequence( "Ctrl+=" ), this );
connect( ctrlEquals, SIGNAL( activated() ), mActionZoomIn, SLOT( trigger() ) );
viewMenu->addAction( mActionZoomIn );
viewMenu->addAction( mActionZoomOut );
viewMenu->addAction( mActionZoomAll );
Expand Down
17 changes: 16 additions & 1 deletion src/ui/qgscomposerbase.ui
Expand Up @@ -149,6 +149,9 @@
<property name="toolTip">
<string>Zoom full</string>
</property>
<property name="shortcut">
<string>Ctrl+0</string>
</property>
</action>
<action name="mActionZoomIn">
<property name="icon">
Expand All @@ -161,6 +164,9 @@
<property name="toolTip">
<string>Zoom in</string>
</property>
<property name="shortcut">
<string>Ctrl++</string>
</property>
</action>
<action name="mActionZoomOut">
<property name="icon">
Expand All @@ -173,6 +179,9 @@
<property name="toolTip">
<string>Zoom out</string>
</property>
<property name="shortcut">
<string>Ctrl+-</string>
</property>
</action>
<action name="mActionAddNewMap">
<property name="icon">
Expand Down Expand Up @@ -303,6 +312,9 @@
<property name="toolTip">
<string>Group items</string>
</property>
<property name="shortcut">
<string>Ctrl+G</string>
</property>
</action>
<action name="mActionUngroupItems">
<property name="text">
Expand All @@ -311,6 +323,9 @@
<property name="toolTip">
<string>Ungroup items</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+G</string>
</property>
</action>
<action name="mActionRaiseItems">
<property name="text">
Expand Down Expand Up @@ -454,7 +469,7 @@
</action>
<action name="mActionUndo">
<property name="icon">
<iconset resource="../../images/images.qrc">
<iconset>
<normalon>:/images/themes/default/mActionUndo.png</normalon>
</iconset>
</property>
Expand Down

0 comments on commit 6950972

Please sign in to comment.