Class: QgsFeatureListModel¶
-
class
qgis.gui.
QgsFeatureListModel
(sourceModel: QgsAttributeTableFilterModel, parent: QObject = None)¶ Bases:
PyQt5.QtCore.QSortFilterProxyModel
,qgis._gui.QgsFeatureModel
Constructor for QgsFeatureListModel
Enums
Methods
Returns the model index corresponding to a feature ID.
Returns the feature ID corresponding to an
index
from the model.Returns the current state of null value injection
Returns the vector layer cache which is being used to populate the model.
Does nothing except for calling beginInsertRows()
Does nothing except for calling beginRemoveRows()
Does nothing except for calling endInsertRows()
Does nothing except for calling endRemoveRows()
Returns a detailed message about errors while parsing a
QgsExpression
.- param expression
A QgsExpression compatible string.
If true is specified, a NULL value will be injected
Sort this model by its display expression.
Sort this model by its display expression.
Signals
Attributes
-
class
FeatureInfo
¶ Bases:
sip.wrapper
Constructor for FeatureInfo.
QgsFeatureListModel.FeatureInfo(QgsFeatureListModel.FeatureInfo)
-
isEdited
¶
-
isNew
¶
-
-
FeatureInfoRole
= 4096¶
-
FeatureRole
= 4097¶
-
class
Role
¶ Bases:
int
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
columnCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int) → Any¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
displayExpression
(self) → str¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
featureByIndex
(self, index: QModelIndex, feat: QgsFeature) → bool¶
-
fidToIdx
(self, fid: int) → QModelIndex¶ Returns the model index corresponding to a feature ID.
See also
-
fidToIndex
(self, fid: int) → QModelIndex¶
-
fidToIndexList
(self, fid: int) → object¶
-
filterAcceptsColumn
()¶
-
filterAcceptsRow
()¶
-
flags
(self, index: QModelIndex) → Qt.ItemFlags¶
-
idxToFid
(self, index: QModelIndex) → int¶ Returns the feature ID corresponding to an
index
from the model.See also
-
injectNull
(self) → bool¶ Returns the current state of null value injection
- Returns
If a NULL value is added
New in version 2.9.
-
invalidateFilter
()¶
-
isSignalConnected
()¶
-
layerCache
(self) → QgsVectorLayerCache¶ Returns the vector layer cache which is being used to populate the model.
-
lessThan
()¶
-
mapFromMaster
(self, sourceIndex: QModelIndex) → QModelIndex¶
-
mapFromSource
(self, sourceIndex: QModelIndex) → QModelIndex¶
-
mapSelectionFromMaster
(self, selection: QItemSelection) → QItemSelection¶
-
mapSelectionToMaster
(self, selection: QItemSelection) → QItemSelection¶
-
mapToMaster
(self, proxyIndex: QModelIndex) → QModelIndex¶
-
mapToSource
(self, proxyIndex: QModelIndex) → QModelIndex¶
-
masterModel
(self) → QgsAttributeTableModel¶
-
onBeginInsertRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling beginInsertRows()
Deprecated since version use: beginInsertRows() instead
-
onBeginRemoveRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling beginRemoveRows()
Deprecated since version Use: beginRemoveRows() instead
-
onEndInsertRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling endInsertRows()
Deprecated since version use: endInsertRows() instead
-
onEndRemoveRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling endRemoveRows()
Deprecated since version Use: endRemoveRows() instead
-
parent
(self, child: QModelIndex) → QModelIndex¶
-
parserErrorString
(self) → str¶ Returns a detailed message about errors while parsing a
QgsExpression
.- Returns
A message containing information about the parser error.
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setDisplayExpression
(self, expression: str) → bool¶ - Parameters
expression – A QgsExpression compatible string.
- Returns
true if the expression could be set, false if there was a parse error. If it fails, the old expression will still be applied. Call parserErrorString() for a meaningful error message.
-
setInjectNull
(self, injectNull: bool)¶ If true is specified, a NULL value will be injected
- Parameters
injectNull – state of null value injection
New in version 2.9.
-
setSortByDisplayExpression
(self, sortByDisplayExpression: bool)¶ Sort this model by its display expression.
Note
Not compatible with injectNull, if sorting by display expression is enabled, injectNull will automatically turned off.
New in version 3.2.
-
setSourceModel
(self, sourceModel: QgsAttributeTableFilterModel)¶
-
sortByDisplayExpression
(self) → bool¶ Sort this model by its display expression.
New in version 3.2.
-
timerEvent
()¶