Class: QgsPointCloudAttributeComboBox¶
- class qgis.gui.QgsPointCloudAttributeComboBox¶
Bases:
PyQt5.QtWidgets.QComboBox
The
QgsPointCloudAttributeComboBox
is a combo box which displays the list of attributes of a given point cloud layer. It might be combined with aQgsMapLayerComboBox
to automatically update attributes according to a chosen layer.Added in version 3.18.
QgsPointCloudAttributeComboBox(parent: QWidget = None)
QgsPointCloudAttributeComboBox
creates a combo box to display the fields of a layer. The layer can be either manually given or dynamically set by connecting the signalQgsMapLayerComboBox
.layerChanged to the slot setLayer.Methods
Returns
True
if the combo box allows the empty field ("not set") choice.Returns the attributes currently shown in the combobox.
Returns the currently selected attribute
Returns the current filters used for filtering available attributes.
Returns the layer currently associated with the combobox.
Sets whether an optional empty attribute ("not set") option is shown in the combo box.
Sets the currently selected attribute by
name
Manually sets the
attributes
to use for the combo box.Sets
filters
to allow filtering available attributes according to the attribute properties.Sets the layer for which fields are listed in the combobox.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- actionEvent(self, QActionEvent)¶
- allowEmptyAttributeName(self) bool ¶
Returns
True
if the combo box allows the empty field (“not set”) choice.See also
- Return type:
bool
- attributeChanged¶
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
- attributes(self) QgsPointCloudAttributeCollection ¶
Returns the attributes currently shown in the combobox.
This will either be attributes from the associated
layer()
or the attributes manually set by a call tosetAttributes()
.- Return type:
- 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)¶
- currentAttribute(self) str ¶
Returns the currently selected attribute
- Return type:
str
- 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) QgsPointCloudAttributeProxyModel.Filters ¶
Returns the current filters used for filtering available attributes.
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)¶
- layer(self) QgsPointCloudLayer ¶
Returns the layer currently associated with the combobox.
See also
- Return type:
- 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 ¶
- setAllowEmptyAttributeName(self, allowEmpty: bool)¶
Sets whether an optional empty attribute (“not set”) option is shown in the combo box.
See also
- Parameters:
allowEmpty (bool)
- setAttribute(self, name: str)¶
Sets the currently selected attribute by
name
- Parameters:
name (str)
- setAttributes(self, attributes: QgsPointCloudAttributeCollection)¶
Manually sets the
attributes
to use for the combo box.This method should only be used when the combo box ISN’T associated with a
layer()
and needs to show the fields from an arbitrary attribute collection instead. CallingsetAttributes()
will automatically clear any existinglayer()
.See also
- Parameters:
attributes (QgsPointCloudAttributeCollection)
- setFilters(self, filters: QgsPointCloudAttributeProxyModel.Filters | QgsPointCloudAttributeProxyModel.Filter)¶
Sets
filters
to allow filtering available attributes according to the attribute properties.See also
- Parameters:
filters (Union[QgsPointCloudAttributeProxyModel.Filters)
- setLayer(self, layer: QgsMapLayer)¶
Sets the layer for which fields are listed in the combobox. If no layer is set or a non-point cloud layer is set then the combobox will be empty.
See also
- Parameters:
layer (QgsMapLayer)
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶