Class: QgsLayoutComboBox

class qgis.gui.QgsLayoutComboBox

Bases: PyQt5.QtWidgets.QComboBox

The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager.

New in version 3.8.

QgsLayoutComboBox(parent: QWidget = None, manager: QgsLayoutManager = None) QgsLayoutComboBox creates a combo box to display a list of items in a layout manager. The layouts can optionally be filtered by type.

Methods

actionEvent

allowEmptyLayout

Returns True if the combobox includes the empty layout ("not set") choice.

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

currentLayout

Returns the layout currently selected in the combo box.

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

filters

Returns the current filters used for filtering available layouts.

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

initStyleOption

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

layout

Returns the layout at the specified index.

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

sender

senderSignalIndex

setAllowEmptyLayout

Sets whether an optional empty layout ("not set") option is present in the combobox.

setCurrentLayout

Sets the currently selected layout in the combo box.

setFilters

Sets the current filters used for filtering available layouts.

setLayoutManager

Sets the layout manager containing the layouts to list in the combo box.

sharedPainter

showEvent

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

Signals

layoutChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

actionEvent(self, QActionEvent)
allowEmptyLayout(self) bool

Returns True if the combobox includes the empty layout (“not set”) choice.

Return type:

bool

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
currentLayout(self) QgsMasterLayoutInterface

Returns the layout currently selected in the combo box.

Return type:

QgsMasterLayoutInterface

customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
filters(self) QgsLayoutManagerProxyModel.Filters

Returns the current filters used for filtering available layouts.

See also

setFilters()

Return type:

QgsLayoutManagerProxyModel.Filters

focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionComboBox)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
layout(self, index: int) QgsMasterLayoutInterface

Returns the layout at the specified index.

Parameters:

index (int) –

Return type:

QgsMasterLayoutInterface

layoutChanged

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.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setAllowEmptyLayout(self, allowEmpty: bool)

Sets whether an optional empty layout (“not set”) option is present in the combobox.

Parameters:

allowEmpty (bool) –

setCurrentLayout(self, layout: QgsMasterLayoutInterface)

Sets the currently selected layout in the combo box.

Parameters:

layout (QgsMasterLayoutInterface) –

setFilters(self, filters: QgsLayoutManagerProxyModel.Filters | QgsLayoutManagerProxyModel.Filter)

Sets the current filters used for filtering available layouts.

See also

filters()

Parameters:

filters (Union[QgsLayoutManagerProxyModel.Filters) –

setLayoutManager(self, manager: QgsLayoutManager)

Sets the layout manager containing the layouts to list in the combo box.

Parameters:

manager (QgsLayoutManager) –

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)