QgsLayoutDesignerInterface class

A common interface for layout designer dialogs and widgets.

Provides a common interface and stable API for layout designer dialogs and widgets. This interface can be used by plugins and scripts to interact with open layout designer dialogs.

Public types

enum StandardTool { ToolMoveItemContent, ToolMoveItemNodes }
Standard designer tools which are always available for use.

Constructors, destructors, conversion operators

QgsLayoutDesignerInterface(QObject* parent = nullptr)
Constructor for QgsLayoutDesignerInterface.

Public functions

auto actionsToolbar() -> QToolBar* pure virtual
Returns a reference to the designer's "Actions" toolbar.
void activateTool(StandardTool tool) pure virtual
Activates a standard layout designer tool.
void addDockWidget(Qt::DockWidgetArea area, QDockWidget* dock) pure virtual
Adds a dock widget to the layout designer, in the specified dock area.
auto atlasMenu() -> QMenu* pure virtual
Returns a reference to the designer's "Atlas" menu.
auto atlasPreviewEnabled() const -> bool pure virtual
Returns whether the atlas preview mode is enabled in the designer.
auto atlasToolbar() -> QToolBar* pure virtual
Returns a reference to the designer's "Atlas" toolbar.
auto editMenu() -> QMenu* pure virtual
Returns a reference to the designer's "Edit" menu.
auto itemsMenu() -> QMenu* pure virtual
Returns a reference to the designer's "Items" menu.
auto layout() -> QgsLayout* pure virtual
Returns the current layout displayed in the designer.
auto layoutMenu() -> QMenu* pure virtual
Returns a reference to the designer's "Layout" menu.
auto layoutToolbar() -> QToolBar* pure virtual
Returns a reference to the designer's "Layout" toolbar.
auto masterLayout() -> QgsMasterLayoutInterface* pure virtual
Returns the master layout displayed in the designer.
auto messageBar() -> QgsMessageBar* pure virtual
Returns the designer's message bar.
auto navigationToolbar() -> QToolBar* pure virtual
Returns a reference to the designer's "Navigation" toolbar.
void removeDockWidget(QDockWidget* dock) pure virtual
Removes the specified dock widget from layout designer (without deleting it).
auto reportMenu() -> QMenu* pure virtual
Returns a reference to the designer's "Report" menu.
void selectItems(const QList<QgsLayoutItem*>& items) pure virtual
Selects the specified items.
void setAtlasPreviewEnabled(bool enabled) pure virtual
Toggles whether the atlas preview mode should be enabled in the designer.
auto settingsMenu() -> QMenu* pure virtual
Returns a reference to the designer's "Settings" menu.
void showItemOptions(QgsLayoutItem* item, bool bringPanelToFront = true) pure virtual
Shows the configuration widget for the specified layout item.
auto view() -> QgsLayoutView* pure virtual
Returns the layout view utilized by the designer.
auto viewMenu() -> QMenu* pure virtual
Returns a reference to the designer's "View" menu.
auto window() -> QWidget* pure virtual
Returns a pointer to the designer window.

Public slots

void close() pure virtual
Closes the layout designer.
void showRulers(bool visible) pure virtual
Toggles whether or not the rulers should be visible in the designer.

Enum documentation

enum QgsLayoutDesignerInterface::StandardTool

Standard designer tools which are always available for use.

Enumerators
ToolMoveItemContent

Move item content tool.

ToolMoveItemNodes

Move item nodes tool.

Function documentation

QToolBar* QgsLayoutDesignerInterface::actionsToolbar() pure virtual

Returns a reference to the designer's "Actions" toolbar.

void QgsLayoutDesignerInterface::activateTool(StandardTool tool) pure virtual

Activates a standard layout designer tool.

void QgsLayoutDesignerInterface::addDockWidget(Qt::DockWidgetArea area, QDockWidget* dock) pure virtual

Adds a dock widget to the layout designer, in the specified dock area.

QMenu* QgsLayoutDesignerInterface::atlasMenu() pure virtual

Returns a reference to the designer's "Atlas" menu.

Note that this may not exist or may be hidden if the designer is in report mode.

bool QgsLayoutDesignerInterface::atlasPreviewEnabled() const pure virtual

Returns whether the atlas preview mode is enabled in the designer.

QToolBar* QgsLayoutDesignerInterface::atlasToolbar() pure virtual

Returns a reference to the designer's "Atlas" toolbar.

Note that this toolbar may not exist or may be hidden if the designer is in report mode.

QMenu* QgsLayoutDesignerInterface::editMenu() pure virtual

Returns a reference to the designer's "Edit" menu.

QMenu* QgsLayoutDesignerInterface::itemsMenu() pure virtual

Returns a reference to the designer's "Items" menu.

QgsLayout* QgsLayoutDesignerInterface::layout() pure virtual

Returns the current layout displayed in the designer.

QMenu* QgsLayoutDesignerInterface::layoutMenu() pure virtual

Returns a reference to the designer's "Layout" menu.

QToolBar* QgsLayoutDesignerInterface::layoutToolbar() pure virtual

Returns a reference to the designer's "Layout" toolbar.

QgsMasterLayoutInterface* QgsLayoutDesignerInterface::masterLayout() pure virtual

Returns the master layout displayed in the designer.

QToolBar* QgsLayoutDesignerInterface::navigationToolbar() pure virtual

Returns a reference to the designer's "Navigation" toolbar.

void QgsLayoutDesignerInterface::removeDockWidget(QDockWidget* dock) pure virtual

Removes the specified dock widget from layout designer (without deleting it).

QMenu* QgsLayoutDesignerInterface::reportMenu() pure virtual

Returns a reference to the designer's "Report" menu.

Note that this may not exist or may be hidden if the designer is not in report mode.

void QgsLayoutDesignerInterface::setAtlasPreviewEnabled(bool enabled) pure virtual

Toggles whether the atlas preview mode should be enabled in the designer.

QMenu* QgsLayoutDesignerInterface::settingsMenu() pure virtual

Returns a reference to the designer's "Settings" menu.

void QgsLayoutDesignerInterface::showItemOptions(QgsLayoutItem* item, bool bringPanelToFront = true) pure virtual

Shows the configuration widget for the specified layout item.

If bringPanelToFront is true, then the item properties panel will be automatically shown and raised to the top of the interface.

QgsLayoutView* QgsLayoutDesignerInterface::view() pure virtual

Returns the layout view utilized by the designer.

QMenu* QgsLayoutDesignerInterface::viewMenu() pure virtual

Returns a reference to the designer's "View" menu.

QWidget* QgsLayoutDesignerInterface::window() pure virtual

Returns a pointer to the designer window.

void QgsLayoutDesignerInterface::showRulers(bool visible) pure virtual public slot

Toggles whether or not the rulers should be visible in the designer.