QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
Classes | Public Types | Public Slots | Signals | Public Member Functions | List of all members
QgsLayoutDesignerInterface Class Referenceabstract

A common interface for layout designer dialogs and widgets. More...

#include <qgslayoutdesignerinterface.h>

Inheritance diagram for QgsLayoutDesignerInterface:
Inheritance graph
[legend]

Classes

class  ExportResults
 Encapsulates the results of an export operation performed in the designer. More...
 

Public Types

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

Public Slots

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

Signals

void layoutExported ()
 Emitted whenever a layout is exported from the layout designer.
 
void mapPreviewRefreshed (QgsLayoutItemMap *map)
 Emitted when a map item's preview has been refreshed.
 

Public Member Functions

 QgsLayoutDesignerInterface (QObject *parent=nullptr)
 Constructor for QgsLayoutDesignerInterface.
 
virtual QToolBar * actionsToolbar ()=0
 Returns a reference to the designer's "Actions" toolbar.
 
virtual void activateTool (StandardTool tool)=0
 Activates a standard layout designer tool.
 
virtual void addDockWidget (Qt::DockWidgetArea area, QDockWidget *dock)=0
 Adds a dock widget to the layout designer, in the specified dock area.
 
virtual QMenu * atlasMenu ()=0
 Returns a reference to the designer's "Atlas" menu.
 
virtual bool atlasPreviewEnabled () const =0
 Returns whether the atlas preview mode is enabled in the designer.
 
virtual QToolBar * atlasToolbar ()=0
 Returns a reference to the designer's "Atlas" toolbar.
 
virtual QMenu * editMenu ()=0
 Returns a reference to the designer's "Edit" menu.
 
virtual QMenu * itemsMenu ()=0
 Returns a reference to the designer's "Items" menu.
 
virtual QgsLayoutDesignerInterface::ExportResultslastExportResults () const =0
 Returns the results of the last export operation performed in the designer.
 
virtual QgsLayoutlayout ()=0
 Returns the current layout displayed in the designer.
 
virtual QMenu * layoutMenu ()=0
 Returns a reference to the designer's "Layout" menu.
 
virtual QToolBar * layoutToolbar ()=0
 Returns a reference to the designer's "Layout" toolbar.
 
virtual QgsMasterLayoutInterfacemasterLayout ()=0
 Returns the master layout displayed in the designer.
 
virtual QgsMessageBarmessageBar ()=0
 Returns the designer's message bar.
 
virtual QToolBar * navigationToolbar ()=0
 Returns a reference to the designer's "Navigation" toolbar.
 
virtual void removeDockWidget (QDockWidget *dock)=0
 Removes the specified dock widget from layout designer (without deleting it).
 
virtual QMenu * reportMenu ()=0
 Returns a reference to the designer's "Report" menu.
 
virtual void selectItems (const QList< QgsLayoutItem * > &items)=0
 Selects the specified items.
 
virtual void setAtlasFeature (const QgsFeature &feature)=0
 Sets the specified feature as the current atlas feature.
 
virtual void setAtlasPreviewEnabled (bool enabled)=0
 Toggles whether the atlas preview mode should be enabled in the designer.
 
virtual QMenu * settingsMenu ()=0
 Returns a reference to the designer's "Settings" menu.
 
virtual void showItemOptions (QgsLayoutItem *item, bool bringPanelToFront=true)=0
 Shows the configuration widget for the specified layout item.
 
virtual QgsLayoutViewview ()=0
 Returns the layout view utilized by the designer.
 
virtual QMenu * viewMenu ()=0
 Returns a reference to the designer's "View" menu.
 
virtual QWidget * window ()=0
 Returns a pointer to the designer window.
 

Detailed Description

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.

Definition at line 54 of file qgslayoutdesignerinterface.h.

Member Enumeration Documentation

◆ StandardTool

Standard designer tools which are always available for use.

Enumerator
ToolMoveItemContent 

Move item content tool.

ToolMoveItemNodes 

Move item nodes tool.

Definition at line 71 of file qgslayoutdesignerinterface.h.

Constructor & Destructor Documentation

◆ QgsLayoutDesignerInterface()

QgsLayoutDesignerInterface::QgsLayoutDesignerInterface ( QObject *  parent = nullptr)
inline

Constructor for QgsLayoutDesignerInterface.

Definition at line 80 of file qgslayoutdesignerinterface.h.

Member Function Documentation

◆ actionsToolbar()

virtual QToolBar * QgsLayoutDesignerInterface::actionsToolbar ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutToolbar()
navigationToolbar()
atlasToolbar()
Since
QGIS 3.4

◆ activateTool()

virtual void QgsLayoutDesignerInterface::activateTool ( StandardTool  tool)
pure virtual

Activates a standard layout designer tool.

Since
QGIS 3.6

◆ addDockWidget()

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

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
removeDockWidget()
Since
QGIS 3.4

◆ atlasMenu()

virtual 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.

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutMenu()
editMenu()
viewMenu()
itemsMenu()
reportMenu()
settingsMenu()
Since
QGIS 3.4

◆ atlasPreviewEnabled()

virtual bool QgsLayoutDesignerInterface::atlasPreviewEnabled ( ) const
pure virtual

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

See also
setAtlasPreviewEnabled()
Since
QGIS 3.4

◆ atlasToolbar()

virtual 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.

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutToolbar()
navigationToolbar()
actionsToolbar()
Since
QGIS 3.4

◆ close

virtual void QgsLayoutDesignerInterface::close ( )
pure virtualslot

Closes the layout designer.

◆ editMenu()

virtual QMenu * QgsLayoutDesignerInterface::editMenu ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutMenu()
viewMenu()
itemsMenu()
atlasMenu()
reportMenu()
settingsMenu()
Since
QGIS 3.4

◆ itemsMenu()

virtual QMenu * QgsLayoutDesignerInterface::itemsMenu ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutMenu()
editMenu()
viewMenu()
atlasMenu()
reportMenu()
settingsMenu()
Since
QGIS 3.4

◆ lastExportResults()

virtual QgsLayoutDesignerInterface::ExportResults * QgsLayoutDesignerInterface::lastExportResults ( ) const
pure virtual

Returns the results of the last export operation performed in the designer.

May be nullptr if no export has been performed in the designer.

Since
QGIS 3.20

◆ layout()

virtual QgsLayout * QgsLayoutDesignerInterface::layout ( )
pure virtual

Returns the current layout displayed in the designer.

See also
view()

◆ layoutExported

void QgsLayoutDesignerInterface::layoutExported ( )
signal

Emitted whenever a layout is exported from the layout designer.

The results of the export can be retrieved by calling lastExportResults().

Since
QGIS 3.20

◆ layoutMenu()

virtual QMenu * QgsLayoutDesignerInterface::layoutMenu ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
editMenu()
viewMenu()
itemsMenu()
atlasMenu()
reportMenu()
settingsMenu()
Since
QGIS 3.4

◆ layoutToolbar()

virtual QToolBar * QgsLayoutDesignerInterface::layoutToolbar ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
navigationToolbar()
actionsToolbar()
atlasToolbar()
Since
QGIS 3.4

◆ mapPreviewRefreshed

void QgsLayoutDesignerInterface::mapPreviewRefreshed ( QgsLayoutItemMap map)
signal

Emitted when a map item's preview has been refreshed.

Since
QGIS 3.20

◆ masterLayout()

virtual QgsMasterLayoutInterface * QgsLayoutDesignerInterface::masterLayout ( )
pure virtual

Returns the master layout displayed in the designer.

See also
layout()

◆ messageBar()

virtual QgsMessageBar * QgsLayoutDesignerInterface::messageBar ( )
pure virtual

Returns the designer's message bar.

◆ navigationToolbar()

virtual QToolBar * QgsLayoutDesignerInterface::navigationToolbar ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutToolbar()
actionsToolbar()
atlasToolbar()
Since
QGIS 3.4

◆ removeDockWidget()

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

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
addDockWidget()
Since
QGIS 3.4

◆ reportMenu()

virtual 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.

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutMenu()
editMenu()
viewMenu()
itemsMenu()
atlasMenu()
settingsMenu()
Since
QGIS 3.4

◆ selectItems()

virtual void QgsLayoutDesignerInterface::selectItems ( const QList< QgsLayoutItem * > &  items)
pure virtual

Selects the specified items.

◆ setAtlasFeature()

virtual void QgsLayoutDesignerInterface::setAtlasFeature ( const QgsFeature feature)
pure virtual

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.
Since
QGIS 3.14

◆ setAtlasPreviewEnabled()

virtual void QgsLayoutDesignerInterface::setAtlasPreviewEnabled ( bool  enabled)
pure virtual

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

See also
atlasPreviewEnabled()
Since
QGIS 3.4

◆ settingsMenu()

virtual QMenu * QgsLayoutDesignerInterface::settingsMenu ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutMenu()
editMenu()
viewMenu()
itemsMenu()
atlasMenu()
reportMenu()
Since
QGIS 3.4

◆ showItemOptions()

virtual 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.

Since
QGIS 3.4

◆ showRulers

virtual void QgsLayoutDesignerInterface::showRulers ( bool  visible)
pure virtualslot

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

Since
QGIS 3.4

◆ view()

virtual QgsLayoutView * QgsLayoutDesignerInterface::view ( )
pure virtual

Returns the layout view utilized by the designer.

See also
layout()

◆ viewMenu()

virtual QMenu * QgsLayoutDesignerInterface::viewMenu ( )
pure virtual

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

Note
See class documentation for notes regarding handling customization of designer dialogs.
See also
layoutMenu()
editMenu()
itemsMenu()
atlasMenu()
reportMenu()
settingsMenu()
Since
QGIS 3.4

◆ window()

virtual QWidget * QgsLayoutDesignerInterface::window ( )
pure virtual

Returns a pointer to the designer window.

Since
QGIS 3.4

The documentation for this class was generated from the following file: