Skip to content
Permalink
Browse files

[composer] Add shortcut to atlas settings to atlas toolbar and menu. …

…Designed to make atlas features more discoverable for beginners
  • Loading branch information
nyalldawson committed Jan 1, 2014
1 parent eb241a6 commit 8a11be82d388517d30bf8735811dfb3777c00808
Showing with 26 additions and 1 deletion.
  1. +13 −1 src/app/composer/qgscomposer.cpp
  2. +3 −0 src/app/composer/qgscomposer.h
  3. +10 −0 src/ui/qgscomposerbase.ui
@@ -320,6 +320,8 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
atlasMenu->addAction( mActionExportAtlasAsImage );
atlasMenu->addAction( mActionExportAtlasAsSVG );
atlasMenu->addAction( mActionExportAtlasAsPDF );
atlasMenu->addSeparator();
atlasMenu->addAction( mActionAtlasSettings );

QToolButton* atlasExportToolButton = new QToolButton( mAtlasToolbar );
atlasExportToolButton->setPopupMode( QToolButton::InstantPopup );
@@ -329,7 +331,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
atlasExportToolButton->addAction( mActionExportAtlasAsSVG );
atlasExportToolButton->addAction( mActionExportAtlasAsPDF );
atlasExportToolButton->setDefaultAction( mActionExportAtlasAsImage );
mAtlasToolbar->addWidget( atlasExportToolButton );
mAtlasToolbar->insertWidget( mActionAtlasSettings, atlasExportToolButton );

QMenu *settingsMenu = menuBar()->addMenu( tr( "Settings" ) );
settingsMenu->addAction( mActionOptions );
@@ -1059,6 +1061,16 @@ void QgsComposer::toggleRulers( bool checked )
myQSettings.setValue( "/Composer/showRulers", checked );
}

void QgsComposer::on_mActionAtlasSettings_triggered()
{
if ( !mAtlasDock->isVisible() )
{
mAtlasDock->show();
}

mAtlasDock->raise();
}

void QgsComposer::on_mActionExportAtlasAsPDF_triggered()
{
exportCompositionAsPDF( QgsComposer::Atlas );
@@ -349,6 +349,9 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! Print atlas as PDF
void on_mActionExportAtlasAsPDF_triggered();

//! Atlas settings
void on_mActionAtlasSettings_triggered();

//! Save window state
void saveWindowState();

@@ -145,6 +145,7 @@
<addaction name="mActionAtlasNext"/>
<addaction name="mActionAtlasLast"/>
<addaction name="mActionPrintAtlas"/>
<addaction name="mActionAtlasSettings"/>
</widget>
<action name="mActionPrint">
<property name="checkable">
@@ -927,6 +928,15 @@
<string>Export Atlas As PDF...</string>
</property>
</action>
<action name="mActionAtlasSettings">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionSetProjection.svg</normaloff>:/images/themes/default/mActionSetProjection.svg</iconset>
</property>
<property name="text">
<string>Atlas Settings</string>
</property>
</action>
</widget>
<resources>
<include location="../../images/images.qrc"/>

0 comments on commit 8a11be8

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