Skip to content
Permalink
Browse files

Add some layout related actions to app toolbar

  • Loading branch information
nyalldawson committed Dec 15, 2017
1 parent 5601fc9 commit 26315894d1878ad69e928faa8264ee7083db7b25
Showing with 71 additions and 0 deletions.
  1. +12 −0 src/app/qgisapp.cpp
  2. +3 −0 src/app/qgisapp.h
  3. +56 −0 src/ui/qgisapp.ui
@@ -1855,7 +1855,9 @@ void QgisApp::createActions()
connect( mActionNewMapCanvas, &QAction::triggered, this, &QgisApp::newMapCanvas );
connect( mActionNew3DMapCanvas, &QAction::triggered, this, &QgisApp::new3DMapCanvas );
connect( mActionNewPrintComposer, &QAction::triggered, this, &QgisApp::newPrintComposer );
connect( mActionNewPrintLayout, &QAction::triggered, this, &QgisApp::newPrintLayout );
connect( mActionShowComposerManager, &QAction::triggered, this, &QgisApp::showComposerManager );
connect( mActionShowLayoutManager, &QAction::triggered, this, &QgisApp::showLayoutManager );
connect( mActionExit, &QAction::triggered, this, &QgisApp::fileExit );
connect( mActionDxfExport, &QAction::triggered, this, &QgisApp::dxfExport );
connect( mActionDwgImport, &QAction::triggered, this, &QgisApp::dwgImport );
@@ -5995,6 +5997,16 @@ void QgisApp::newPrintComposer()
createNewComposer( title );
}

void QgisApp::newPrintLayout()
{
QString title;
if ( !uniqueLayoutTitle( this, title, true ) )
{
return;
}
createNewLayout( title );
}

void QgisApp::showComposerManager()
{
if ( !mComposerManager )
@@ -1266,6 +1266,9 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void newGeoPackageLayer();
//! Print the current map view frame
void newPrintComposer();
//! Create a new print layout
void newPrintLayout();

void showComposerManager();
//! Add all loaded layers into the overview - overrides qgisappbase method
void addAllToOverview();
@@ -370,6 +370,8 @@
<addaction name="mActionSaveProjectAs"/>
<addaction name="mActionNewPrintComposer"/>
<addaction name="mActionShowComposerManager"/>
<addaction name="mActionNewPrintLayout"/>
<addaction name="mActionShowLayoutManager"/>
</widget>
<widget class="QToolBar" name="mLayerToolBar">
<property name="windowTitle">
@@ -2934,9 +2936,63 @@ Acts on currently active editable layer</string>
<string>Ctrl+Shift+M</string>
</property>
</action>
<action name="mActionShowLayoutManager">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionComposerManager.svg</normaloff>:/images/themes/default/mActionComposerManager.svg</iconset>
</property>
<property name="text">
<string>Layout Manager…</string>
</property>
<property name="toolTip">
<string>Show Layout Manager</string>
</property>
</action>
<action name="mActionNewPrintLayout">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionNewComposer.svg</normaloff>:/images/themes/default/mActionNewComposer.svg</iconset>
</property>
<property name="text">
<string>New &amp;Print Layout</string>
</property>
<property name="toolTip">
<string>New Print Layout</string>
</property>
<property name="shortcut">
<string>Ctrl+P</string>
</property>
</action>
</widget>
<resources>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit 2631589

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