Class: QgsLayoutDesignerInterface¶
- class qgis.gui.QgsLayoutDesignerInterface¶
Bases:
PyQt5.QtCore.QObject
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.
Note
Layout designer dialogs are transitory. They are created only on demand (when a user opens the dialog) and are deleted as soon as the user closes the dialog. There can be multiple designer dialogs open at any one time, and each is a separate instance of the dialog and
QgsLayoutDesignerInterface
. Accordingly, plugins must take care to react to newly created designer dialogs and apply their customizations to all newly created dialogs. This can be done by listening for the QgisInterface.layoutDesignerOpened signal. Plugins must also listen for the QgisInterface.layoutDesignerWillBeClosed signal and gracefully cleanup any customizations before the designer dialog is deleted.New in version 3.0.
QgsLayoutDesignerInterface(parent: QObject = None) Constructor for QgsLayoutDesignerInterface.
Methods
Returns a reference to the designer's "Actions" toolbar.
Activates a standard layout designer
tool
.Adds a
dock
widget to the layout designer, in the specified dockarea
.Returns a reference to the designer's "Atlas" menu.
Returns whether the atlas preview mode is enabled in the designer.
Returns a reference to the designer's "Atlas" toolbar.
Closes the layout designer.
Returns a reference to the designer's "Edit" menu.
Returns a reference to the designer's "Items" menu.
Returns the results of the last export operation performed in the designer.
Returns the current layout displayed in the designer.
Returns a reference to the designer's "Layout" menu.
Returns a reference to the designer's "Layout" toolbar.
Returns the master layout displayed in the designer.
Returns the designer's message bar.
Returns a reference to the designer's "Navigation" toolbar.
Removes the specified
dock
widget from layout designer (without deleting it).Returns a reference to the designer's "Report" menu.
Selects the specified
items
.Sets the specified feature as the current atlas feature
Toggles whether the atlas preview mode should be
enabled
in the designer.Returns a reference to the designer's "Settings" menu.
Shows the configuration widget for the specified layout
item
.Toggles whether or not the rulers should be
visible
in the designer.Returns the layout view utilized by the designer.
Returns a reference to the designer's "View" menu.
Returns a pointer to the designer window.
Signals
Emitted whenever a layout is exported from the layout designer.
Emitted when a
map
item's preview has been refreshed.Attributes
- class ExportResults¶
Bases:
sip.wrapper
Encapsulates the results of an export operation performed in the designer.
New in version 3.20.
- labelingResults¶
- result¶
- class StandardTool¶
Bases:
int
- ToolMoveItemContent = 0¶
- ToolMoveItemNodes = 1¶
- actionsToolbar(self) QToolBar ¶
Returns a reference to the designer’s “Actions” toolbar.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
New in version 3.4.
- Return type
QToolBar
- activateTool(self, tool: QgsLayoutDesignerInterface.StandardTool)¶
Activates a standard layout designer
tool
.New in version 3.6.
- Parameters
- addDockWidget(self, area: Qt.DockWidgetArea, dock: QDockWidget)¶
Adds a
dock
widget to the layout designer, in the specified dockarea
.Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
New in version 3.4.
- Parameters
area (Qt.DockWidgetArea) –
dock (QDockWidget) –
- atlasMenu(self) QMenu ¶
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.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- atlasPreviewEnabled(self) bool ¶
Returns whether the atlas preview mode is enabled in the designer.
See also
New in version 3.4.
- Return type
bool
- atlasToolbar(self) QToolBar ¶
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.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
New in version 3.4.
- Return type
QToolBar
- childEvent(self, QChildEvent)¶
- close(self)¶
Closes the layout designer.
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- editMenu(self) QMenu ¶
Returns a reference to the designer’s “Edit” menu.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- isSignalConnected(self, QMetaMethod) bool ¶
- itemsMenu(self) QMenu ¶
Returns a reference to the designer’s “Items” menu.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- lastExportResults(self) QgsLayoutDesignerInterface.ExportResults ¶
Returns the results of the last export operation performed in the designer.
May be
None
if no export has been performed in the designer.New in version 3.20.
- Return type
- layoutExported¶
Emitted whenever a layout is exported from the layout designer.
The results of the export can be retrieved by calling
lastExportResults()
.New in version 3.20: [signal]
- layoutMenu(self) QMenu ¶
Returns a reference to the designer’s “Layout” menu.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- layoutToolbar(self) QToolBar ¶
Returns a reference to the designer’s “Layout” toolbar.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
New in version 3.4.
- Return type
QToolBar
- mapPreviewRefreshed¶
Emitted when a
map
item’s preview has been refreshed.New in version 3.20: [signal]
- Parameters
map (QgsLayoutItemMap) –
- masterLayout(self) QgsMasterLayoutInterface ¶
Returns the master layout displayed in the designer.
See also
- Return type
- messageBar(self) QgsMessageBar ¶
Returns the designer’s message bar.
- Return type
Returns a reference to the designer’s “Navigation” toolbar.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
New in version 3.4.
- Return type
QToolBar
- receivers(self, PYQT_SIGNAL) int ¶
- removeDockWidget(self, dock: QDockWidget)¶
Removes the specified
dock
widget from layout designer (without deleting it).Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
New in version 3.4.
- Parameters
dock (QDockWidget) –
- reportMenu(self) QMenu ¶
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.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- selectItems(self, items: Iterable[QgsLayoutItem])¶
Selects the specified
items
.- Parameters
items (Iterable[QgsLayoutItem]) –
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAtlasFeature(self, feature: QgsFeature)¶
Sets the specified feature as the current atlas feature
Warning
it is the caller’s responsibility to ensure that
feature
is a feature from the layout’s current atlas coverage layer.New in version 3.14.
- Parameters
feature (QgsFeature) –
- setAtlasPreviewEnabled(self, enabled: bool)¶
Toggles whether the atlas preview mode should be
enabled
in the designer.See also
New in version 3.4.
- Parameters
enabled (bool) –
- settingsMenu(self) QMenu ¶
Returns a reference to the designer’s “Settings” menu.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- showItemOptions(self, item: QgsLayoutItem, bringPanelToFront: bool = True)¶
Shows the configuration widget for the specified layout
item
.If
bringPanelToFront
isTrue
, then the item properties panel will be automatically shown and raised to the top of the interface.New in version 3.4.
- Parameters
item (QgsLayoutItem) –
bringPanelToFront (bool = True) –
- showRulers(self, visible: bool)¶
Toggles whether or not the rulers should be
visible
in the designer.New in version 3.4.
- Parameters
visible (bool) –
- timerEvent(self, QTimerEvent)¶
- view(self) QgsLayoutView ¶
Returns the layout view utilized by the designer.
See also
- Return type
- viewMenu(self) QMenu ¶
Returns a reference to the designer’s “View” menu.
Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
See also
See also
See also
See also
See also
New in version 3.4.
- Return type
QMenu
- window(self) QWidget ¶
Returns a pointer to the designer window.
New in version 3.4.
- Return type
QWidget