Skip to content

Commit

Permalink
added Page Properties qAction to layout main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
phidrho authored and nyalldawson committed Oct 1, 2024
1 parent 4afbf9e commit 6dc4547
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
mView->resizeSelectedItems( QgsLayoutAligner::ResizeToSquare );
} );

connect( mActionPageProperties, &QAction::triggered, this, &QgsLayoutDesignerDialog::showPageProperties );
connect( mActionAddPages, &QAction::triggered, this, &QgsLayoutDesignerDialog::addPages );

connect( mActionUnlockAll, &QAction::triggered, this, &QgsLayoutDesignerDialog::unlockAllItems );
Expand Down Expand Up @@ -1921,6 +1922,16 @@ void QgsLayoutDesignerDialog::addPages()
}
}

void QgsLayoutDesignerDialog::showPageProperties()
{
QgsLayoutItemPage *page = mLayout->pageCollection()->page( 0 );

if ( page )
{
showItemOptions( page, true );
}
}

void QgsLayoutDesignerDialog::statusMessageReceived( const QString &message )
{
mStatusBar->showMessage( message );
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutdesignerdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, public Ui::QgsLayoutDesignerB
void toggleFullScreen( bool enabled );

void addPages();
void showPageProperties();
void statusMessageReceived( const QString &message );
void dockVisibilityChanged( bool visible );
void undoRedoOccurredForItems( const QSet< QString > &itemUuids );
Expand Down
9 changes: 8 additions & 1 deletion src/ui/layout/qgslayoutdesignerbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<x>0</x>
<y>0</y>
<width>2180</width>
<height>22</height>
<height>32</height>
</rect>
</property>
<widget class="QMenu" name="mLayoutMenu">
Expand All @@ -204,6 +204,7 @@
<addaction name="separator"/>
<addaction name="mActionLayoutProperties"/>
<addaction name="mActionRenameLayout"/>
<addaction name="mActionPageProperties"/>
<addaction name="mActionAddPages"/>
<addaction name="separator"/>
<addaction name="mActionLoadFromTemplate"/>
Expand Down Expand Up @@ -1585,9 +1586,15 @@
<string>&amp;Keyboard Shortcuts...</string>
</property>
</action>
<action name="mActionPageProperties">
<property name="text">
<string>Page Properties…</string>
</property>
</action>
</widget>
<resources>
<include location="../../../images/images.qrc"/>
<include location="../../../images/images.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit 6dc4547

Please sign in to comment.