Class: QgsLayoutComboBox¶
- class qgis.gui.QgsLayoutComboBox¶
Bases:
PyQt5.QtWidgets.QComboBox
The
QgsLayoutComboBox
class is a combo box which displays available layouts from aQgsLayoutManager
.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 layoutmanager
. The layouts can optionally be filtered by type.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
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.See also
- 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:
- 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¶
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.
See also
- 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
- 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)¶