Skip to content
Permalink
Browse files

[FEATURE][composer] Full screen mode for composer

This change adds a full screen mode for the composer. Full screen
mode can be enabled via a shortcut key (F11) or via a menu action.
  • Loading branch information
nyalldawson committed Oct 20, 2014
1 parent 7b537f6 commit 220bc844812e6aef0f64d492ac318823123c558d
Showing with 30 additions and 0 deletions.
  1. +13 −0 src/app/composer/qgscomposer.cpp
  2. +3 −0 src/app/composer/qgscomposer.h
  3. +14 −0 src/ui/qgscomposerbase.ui
13 src/app/composer/qgscomposer.cpp 100644 → 100755
@@ -342,6 +342,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
mToolbarMenu = new QMenu( tr( "&Toolbars" ), this );
mToolbarMenu->setObjectName( "mToolbarMenu" );
viewMenu->addSeparator();
viewMenu->addAction( mActionToggleFullScreen );
viewMenu->addMenu( mPanelMenu );
viewMenu->addMenu( mToolbarMenu );
// toolBar already exists, add other widgets as they are created
@@ -1233,6 +1234,18 @@ void QgsComposer::on_mActionAtlasSettings_triggered()
mAtlasDock->raise();
}

void QgsComposer::on_mActionToggleFullScreen_triggered()
{
if ( mActionToggleFullScreen->isChecked() )
{
showFullScreen();
}
else
{
showNormal();
}
}

void QgsComposer::disablePreviewMode()
{
if ( !mView )
@@ -359,6 +359,9 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! Atlas settings
void on_mActionAtlasSettings_triggered();

//! Toggle full screen mode
void on_mActionToggleFullScreen_triggered();

//! Save window state
void saveWindowState();

@@ -1023,6 +1023,20 @@
<string>Ctrl+Shift+B</string>
</property>
</action>
<action name="mActionToggleFullScreen">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Toggle Full Scr&amp;een</string>
</property>
<property name="toolTip">
<string>Toggle full screen mode</string>
</property>
<property name="shortcut">
<string>F11</string>
</property>
</action>
</widget>
<resources>
<include location="../../python/plugins/fTools/resources.qrc"/>

0 comments on commit 220bc84

Please sign in to comment.
You can’t perform that action at this time.