Class: QgsLayoutDesignerInterface¶
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.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: actionsToolbar(), activateTool(), addDockWidget(), atlasMenu(), atlasPreviewEnabled(), atlasToolbar(), close(), editMenu(), itemsMenu(), lastExportResults(), layout(), layoutMenu(), layoutToolbar(), masterLayout(), messageBar(), navigationToolbar(), removeDockWidget(), reportMenu(), selectItems(), setAtlasFeature(), setAtlasPreviewEnabled(), settingsMenu(), showItemOptions(), showRulers(), view(), viewMenu(), window()
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsLayoutDesignerInterface[source]¶
Bases:
QObject- __init__(parent: QObject | None = None)
Constructor for QgsLayoutDesignerInterface.
- Parameters:
parent (Optional[QObject] = None)
- class ExportResults[source]¶
Bases:
objectEncapsulates the results of an export operation performed in the designer.
Added in version 3.20.
- labelingResults: Dict[str, QgsLabelingResults]¶
- result: QgsLayoutExporter.ExportResult¶
- class StandardTool¶
Bases:
int
- ToolMoveItemContent = 0¶
- ToolMoveItemNodes = 1¶
- abstract actionsToolbar(self) QToolBar | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QToolBar]
- abstract activateTool(self, tool: QgsLayoutDesignerInterface.StandardTool)[source]¶
Activates a standard layout designer
tool.Added in version 3.6.
- Parameters:
- abstract addDockWidget(self, area: Qt.DockWidgetArea, dock: QDockWidget | None)[source]¶
Adds a
dockwidget to the layout designer, in the specified dockarea.Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
Added in version 3.4.
- Parameters:
area (Qt.DockWidgetArea)
dock (Optional[QDockWidget])
- abstract atlasMenu(self) QMenu | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QMenu]
- abstract atlasPreviewEnabled(self) bool[source]¶
Returns whether the atlas preview mode is enabled in the designer.
See also
Added in version 3.4.
- Return type:
bool
- abstract atlasToolbar(self) QToolBar | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QToolBar]
- abstract editMenu(self) QMenu | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QMenu]
- abstract itemsMenu(self) QMenu | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QMenu]
- abstract lastExportResults(self) QgsLayoutDesignerInterface.ExportResults | None[source]¶
Returns the results of the last export operation performed in the designer.
May be
Noneif no export has been performed in the designer.Added in version 3.20.
- Return type:
Optional[QgsLayoutDesignerInterface.ExportResults]
- abstract layout(self) QgsLayout | None[source]¶
Returns the current layout displayed in the designer.
See also
- Return type:
Optional[QgsLayout]
- signal layoutExported[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- abstract layoutMenu(self) QMenu | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QMenu]
- abstract layoutToolbar(self) QToolBar | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QToolBar]
- signal mapPreviewRefreshed[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- abstract masterLayout(self) QgsMasterLayoutInterface | None[source]¶
Returns the master layout displayed in the designer.
See also
- Return type:
Optional[QgsMasterLayoutInterface]
- abstract messageBar(self) QgsMessageBar | None[source]¶
Returns the designer’s message bar.
- Return type:
Optional[QgsMessageBar]
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
Added in version 3.4.
- Return type:
Optional[QToolBar]
- abstract removeDockWidget(self, dock: QDockWidget | None)[source]¶
Removes the specified
dockwidget from layout designer (without deleting it).Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
Added in version 3.4.
- Parameters:
dock (Optional[QDockWidget])
- abstract reportMenu(self) QMenu | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QMenu]
- abstract selectItems(self, items: Iterable[QgsLayoutItem])[source]¶
Selects the specified
items.- Parameters:
items (Iterable[QgsLayoutItem])
- abstract setAtlasFeature(self, feature: QgsFeature)[source]¶
Sets the specified feature as the current atlas feature
Warning
it is the caller’s responsibility to ensure that
featureis a feature from the layout’s current atlas coverage layer.Added in version 3.14.
- Parameters:
feature (QgsFeature)
- abstract setAtlasPreviewEnabled(self, enabled: bool)[source]¶
Toggles whether the atlas preview mode should be
enabledin the designer.See also
Added in version 3.4.
- Parameters:
enabled (bool)
- abstract settingsMenu(self) QMenu | None[source]¶
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
Added in version 3.4.
- Return type:
Optional[QMenu]
- abstract showItemOptions(self, item: QgsLayoutItem | None, bringPanelToFront: bool = True)[source]¶
Shows the configuration widget for the specified layout
item.If
bringPanelToFrontisTrue, then the item properties panel will be automatically shown and raised to the top of the interface.Added in version 3.4.
- Parameters:
item (Optional[QgsLayoutItem])
bringPanelToFront (bool = True)
- abstract showRulers(self, visible: bool)[source]¶
Toggles whether or not the rulers should be
visiblein the designer.Added in version 3.4.
- Parameters:
visible (bool)
- abstract view(self) QgsLayoutView | None[source]¶
Returns the layout view utilized by the designer.
See also
- Return type:
Optional[QgsLayoutView]