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 layoutmanager
. The layouts can optionally be filtered by type.The
QgsLayoutComboBox
class is a combo box which displays available layouts from aQgsLayoutManager
.Methods
Returns
True
if the combobox includes the empty layout (“not set”) choice.Returns the layout currently selected in the combo box.
Returns the current filters used for filtering available layouts.
Returns the layout at the specified
index
.Sets whether an optional empty layout (“not set”) option is present in the combobox.
Sets the currently selected
layout
in the combo box.Sets the current
filters
used for filtering available layouts.Sets the layout
manager
containing the layouts to list in the combo box.Signals
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.See also
- 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
- 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
- Return type
- 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
- 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.
See also
- 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
- 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) –
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶