Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Page Properties qAction to layout main menu #58693

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was added automatically by Qt Creator, didn't want to touch it.

</resources>
<connections/>
</ui>
Loading