Class: QgsLayoutComboBox

class qgis.gui.QgsLayoutComboBox(parent: QWidget = None, manager: QgsLayoutManager = None)

Bases: PyQt5.QtWidgets.QComboBox

QgsLayoutComboBox creates a combo box to display a list of items in a layout manager. The layouts can optionally be filtered by type.

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

New in version 3.8:

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

Emitted whenever the currently selected layout changes [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: 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

Emitted whenever the currently selected layout changes [signal]

Parameters

layout (QgsMasterLayoutInterface) –

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], 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: Union[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)