From 88bf5a52d8fac45c8c3757e9f8297a9494797b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Stojnovi=C4=87?= Date: Thu, 12 Sep 2024 11:12:13 +0200 Subject: [PATCH] added Page Properties qAction to layout main menu --- src/app/layout/qgslayoutdesignerdialog.cpp | 11 +++++++++++ src/app/layout/qgslayoutdesignerdialog.h | 1 + src/ui/layout/qgslayoutdesignerbase.ui | 9 ++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/app/layout/qgslayoutdesignerdialog.cpp b/src/app/layout/qgslayoutdesignerdialog.cpp index 04a30b31c51b..381f0d6fc3dd 100644 --- a/src/app/layout/qgslayoutdesignerdialog.cpp +++ b/src/app/layout/qgslayoutdesignerdialog.cpp @@ -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 ); @@ -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 ); diff --git a/src/app/layout/qgslayoutdesignerdialog.h b/src/app/layout/qgslayoutdesignerdialog.h index cefd2c32f7a1..97325944062d 100644 --- a/src/app/layout/qgslayoutdesignerdialog.h +++ b/src/app/layout/qgslayoutdesignerdialog.h @@ -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 ); diff --git a/src/ui/layout/qgslayoutdesignerbase.ui b/src/ui/layout/qgslayoutdesignerbase.ui index f8dbcfb31932..c2e095a1bad4 100644 --- a/src/ui/layout/qgslayoutdesignerbase.ui +++ b/src/ui/layout/qgslayoutdesignerbase.ui @@ -182,7 +182,7 @@ 0 0 2180 - 22 + 32 @@ -204,6 +204,7 @@ + @@ -1585,9 +1586,15 @@ &Keyboard Shortcuts... + + + Page Properties… + + +