Class: QgsLayoutItemComboBox¶
-
class
qgis.gui.
QgsLayoutItemComboBox
(parent: QWidget = None, layout: QgsLayout = None)¶ Bases:
PyQt5.QtWidgets.QComboBox
QgsLayoutItemComboBox creates a combo box to display a list of items in a
layout
. The items can optionally be filtered by type. Iflayout
is not set, no items will be shown until setCurrentLayout() is calledThe QgsLayoutItemComboBox class is a combo box which displays items of a matching type from a layout.
New in version 3.0: Enums
Methods
Returns the item currently selected in the combo box.
Returns the list of specific items excluded from the combo box.
Returns the item currently shown at the specified
index
within the combo box.Returns the filter for the item types to show in the combo box.
Sets the
layout
containing the items to list in the combo box.Sets a list of specific items to exclude from the combo box.
Sets the currently selected
item
in the combo box.Sets a filter for the item type to show in the combo box.
Signals
Emitted whenever the currently selected item changes [signal]
Attributes
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
currentItem
(self) → QgsLayoutItem¶ Returns the item currently selected in the combo box.
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
exceptedItemList
(self) → List[QgsLayoutItem]¶ Returns the list of specific items excluded from the combo box.
See also
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
item
(self, index: int) → QgsLayoutItem¶ Returns the item currently shown at the specified
index
within the combo box.See also
-
itemChanged
¶ Emitted whenever the currently selected item changes [signal]
-
itemType
(self) → QgsLayoutItemRegistry.ItemType¶ Returns the filter for the item types to show in the combo box.
See also
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setCurrentLayout
(self, layout: QgsLayout)¶ Sets the
layout
containing the items to list in the combo box.
-
setExceptedItemList
(self, exceptList: Iterable[QgsLayoutItem])¶ Sets a list of specific items to exclude from the combo box.
See also
-
setItem
(self, item: QgsLayoutItem)¶ Sets the currently selected
item
in the combo box.
-
setItemType
(self, itemType: QgsLayoutItemRegistry.ItemType)¶ Sets a filter for the item type to show in the combo box.
- Parameters
itemType – type of items to show. Set to QgsLayoutItemRegistry.LayoutItem to show all items.
See also
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-