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 specified parent object.

Methods

allowEmptyAttributeName

Returns True if the model allows the empty attribute ("not set") choice.

attributeToolTip

Returns a HTML formatted tooltip string for a attribute, containing details like the attribute name and type.

attributes

Returns the attributes associated with the model.

beginInsertColumns

beginInsertRows

beginMoveColumns

beginMoveRows

beginRemoveColumns

beginRemoveRows

beginResetModel

changePersistentIndex

changePersistentIndexList

childEvent

columnCount

param parent:

connectNotify

createIndex

customEvent

data

param index:

decodeData

disconnectNotify

encodeData

endInsertColumns

endInsertRows

endMoveColumns

endMoveRows

endRemoveColumns

endRemoveRows

endResetModel

iconForAttributeType

Returns an icon corresponding to an attribute type

index

param row:

indexFromName

Returns the index corresponding to a given attribute name.

isSignalConnected

layer

Returns the layer associated with the model.

parent

param child:

persistentIndexList

receivers

resetInternalData

rowCount

param parent:

sender

senderSignalIndex

setAllowEmptyAttributeName

Sets whether an optional empty attribute ("not set") option is present in the model.

setAttributes

Sets the attributes to include in the model.

setLayer

Sets the layer associated with the model.

timerEvent

Attributes

AttributeIndexRole

AttributeNameRole

AttributeSizeRole

AttributeTypeRole

IsEmptyRole

IsNumericRole

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.

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

setAttributes()

Return type:

QgsPointCloudAttributeCollection

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

setLayer()

Return type:

QgsPointCloudLayer

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.

Parameters:

allowEmpty (bool) –

setAttributes(self, attributes: QgsPointCloudAttributeCollection)

Sets the attributes to include in the model.

See also

setLayer()

See also

attributes()

Parameters:

attributes (QgsPointCloudAttributeCollection) –

setLayer(self, layer: QgsPointCloudLayer)

Sets the layer associated with the model.

See also

setAttributes()

Parameters:

layer (QgsPointCloudLayer) –

timerEvent(self, QTimerEvent)