Skip to content

Commit

Permalink
[FEATURE][composer] Full screen mode for composer
Browse files Browse the repository at this point in the history
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 31, 2014
1 parent 7b537f6 commit 220bc84
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/composer/qgscomposer.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down
3 changes: 3 additions & 0 deletions src/app/composer/qgscomposer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
14 changes: 14 additions & 0 deletions src/ui/qgscomposerbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down

0 comments on commit 220bc84

Please sign in to comment.