Class: QgsPointCloudAttributeModel¶
- class qgis.core.QgsPointCloudAttributeModel¶
Bases:
PyQt5.QtCore.QAbstractItemModel
A model for display of available attributes from a point cloud.
New in version 3.18.
QgsPointCloudAttributeModel(parent: QObject = None) Constructor for
QgsPointCloudAttributeModel
, with the specifiedparent
object.Methods
Returns
True
if the model allows the empty attribute ("not set") choice.Returns a HTML formatted tooltip string for a
attribute
, containing details like the attribute name and type.Returns the attributes associated with the model.
- param parent:
- param index:
Returns an icon corresponding to an attribute
type
- param row:
Returns the index corresponding to a given attribute
name
.Returns the layer associated with the model.
- param child:
- param parent:
Sets whether an optional empty attribute ("not set") option is present in the model.
Sets the
attributes
to include in the model.Sets the
layer
associated with the model.Attributes
- AttributeIndexRole = 258¶
- AttributeNameRole = 257¶
- AttributeSizeRole = 259¶
- AttributeTypeRole = 260¶
- class FieldRoles¶
Bases:
int
- IsEmptyRole = 261¶
- IsNumericRole = 262¶
- allowEmptyAttributeName(self) bool ¶
Returns
True
if the model allows the empty attribute (“not set”) choice.See also
- Return type:
bool
- attributeToolTip(attribute: QgsPointCloudAttribute) str ¶
Returns a HTML formatted tooltip string for a
attribute
, containing details like the attribute name and type.- Parameters:
attribute (QgsPointCloudAttribute) –
- Return type:
str
- attributes(self) QgsPointCloudAttributeCollection ¶
Returns the attributes associated with the model.
See also
- Return type:
- beginInsertColumns(self, QModelIndex, int, int)¶
- beginInsertRows(self, QModelIndex, int, int)¶
- beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginRemoveColumns(self, QModelIndex, int, int)¶
- beginRemoveRows(self, QModelIndex, int, int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, QModelIndex, QModelIndex)¶
- changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])¶
- childEvent(self, QChildEvent)¶
- columnCount(self, parent: QModelIndex) int ¶
- Parameters:
parent (QModelIndex) –
- Return type:
int
- connectNotify(self, QMetaMethod)¶
- createIndex(self, int, int, object: object = 0) QModelIndex ¶
- customEvent(self, QEvent)¶
- data(self, index: QModelIndex, role: int) Any ¶
- Parameters:
index (QModelIndex) –
role (int) –
- Return type:
Any
- decodeData(self, int, int, QModelIndex, QDataStream) bool ¶
- disconnectNotify(self, QMetaMethod)¶
- encodeData(self, Iterable[QModelIndex], QDataStream)¶
- endInsertColumns(self)¶
- endInsertRows(self)¶
- endMoveColumns(self)¶
- endMoveRows(self)¶
- endRemoveColumns(self)¶
- endRemoveRows(self)¶
- endResetModel(self)¶
- iconForAttributeType(type: QgsPointCloudAttribute.DataType) QIcon ¶
Returns an icon corresponding to an attribute
type
- Parameters:
type (QgsPointCloudAttribute.DataType) –
- Return type:
QIcon
- index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex ¶
- Parameters:
row (int) –
column (int) –
parent (QModelIndex = QModelIndex()) –
- Return type:
QModelIndex
- indexFromName(self, name: str) QModelIndex ¶
Returns the index corresponding to a given attribute
name
.- Parameters:
name (str) –
- Return type:
QModelIndex
- isSignalConnected(self, QMetaMethod) bool ¶
- layer(self) QgsPointCloudLayer ¶
Returns the layer associated with the model.
See also
- Return type:
- parent(self, child: QModelIndex) QModelIndex ¶
- Parameters:
child (QModelIndex) –
- Return type:
QModelIndex
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, PYQT_SIGNAL) int ¶
- resetInternalData(self)¶
- rowCount(self, parent: QModelIndex = QModelIndex()) int ¶
- Parameters:
parent (QModelIndex = QModelIndex()) –
- Return type:
int
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAllowEmptyAttributeName(self, allowEmpty: bool)¶
Sets whether an optional empty attribute (“not set”) option is present in the model.
See also
- Parameters:
allowEmpty (bool) –
- setAttributes(self, attributes: QgsPointCloudAttributeCollection)¶
Sets the
attributes
to include in the model.See also
See also
- Parameters:
attributes (QgsPointCloudAttributeCollection) –
- setLayer(self, layer: QgsPointCloudLayer)¶
Sets the
layer
associated with the model.See also
- Parameters:
layer (QgsPointCloudLayer) –
- timerEvent(self, QTimerEvent)¶