Class: QgsFeatureListModel¶
-
class
qgis.gui.
QgsFeatureListModel
(sourceModel: QgsAttributeTableFilterModel, parent: QObject = None)¶ Bases:
PyQt5.QtCore.QSortFilterProxyModel
,QgsFeatureModel
Constructor for QgsFeatureListModel
- Parameters
sourceModel (QgsAttributeTableFilterModel) –
parent –
-
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¶ - Parameters
parent (QModelIndex = QModelIndex()) –
- Return type
int
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int) → Any¶ - Parameters
index (QModelIndex) –
role (int) –
- Return type
Any
-
decodeData
()¶
-
disconnectNotify
()¶
-
displayExpression
(self) → str¶ - Return type
str
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
featureByIndex
(self, index: QModelIndex, feat: QgsFeature) → bool¶ - Parameters
index (QModelIndex) –
feat (QgsFeature) –
- Return type
bool
-
fidToIdx
(self, fid: int) → QModelIndex¶ Returns the model index corresponding to a feature ID.
See also
- Parameters
fid (int) –
- Return type
QModelIndex
-
fidToIndex
(self, fid: int) → QModelIndex¶ - Parameters
fid (int) –
- Return type
QModelIndex
-
fidToIndexList
(self, fid: int) → object¶ - Parameters
fid (int) –
- Return type
object
-
filterAcceptsColumn
()¶
-
filterAcceptsRow
()¶
-
flags
(self, index: QModelIndex) → Qt.ItemFlags¶ - Parameters
index (QModelIndex) –
- Return type
Qt.ItemFlags
-
idxToFid
(self, index: QModelIndex) → int¶ Returns the feature ID corresponding to an
index
from the model.See also
- Parameters
index (QModelIndex) –
- Return type
int
-
injectNull
(self) → bool¶ Returns the current state of null value injection
- Return type
bool
- 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.
- Return type
-
lessThan
()¶
-
mapFromMaster
(self, sourceIndex: QModelIndex) → QModelIndex¶ - Parameters
sourceIndex (QModelIndex) –
- Return type
QModelIndex
-
mapFromSource
(self, sourceIndex: QModelIndex) → QModelIndex¶ - Parameters
sourceIndex (QModelIndex) –
- Return type
QModelIndex
-
mapSelectionFromMaster
(self, selection: QItemSelection) → QItemSelection¶ - Parameters
selection (QItemSelection) –
- Return type
QItemSelection
-
mapSelectionToMaster
(self, selection: QItemSelection) → QItemSelection¶ - Parameters
selection (QItemSelection) –
- Return type
QItemSelection
-
mapToMaster
(self, proxyIndex: QModelIndex) → QModelIndex¶ - Parameters
proxyIndex (QModelIndex) –
- Return type
QModelIndex
-
mapToSource
(self, proxyIndex: QModelIndex) → QModelIndex¶ - Parameters
proxyIndex (QModelIndex) –
- Return type
QModelIndex
-
masterModel
(self) → QgsAttributeTableModel¶ - Return type
-
onBeginInsertRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling beginInsertRows()
Deprecated since version use: beginInsertRows() instead
- Parameters
parent (QModelIndex) –
first (int) –
last (int) –
-
onBeginRemoveRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling beginRemoveRows()
Deprecated since version Use: beginRemoveRows() instead
- Parameters
parent (QModelIndex) –
first (int) –
last (int) –
-
onEndInsertRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling endInsertRows()
Deprecated since version use: endInsertRows() instead
- Parameters
parent (QModelIndex) –
first (int) –
last (int) –
-
onEndRemoveRows
(self, parent: QModelIndex, first: int, last: int)¶ Does nothing except for calling endRemoveRows()
Deprecated since version Use: endRemoveRows() instead
- Parameters
parent (QModelIndex) –
first (int) –
last (int) –
-
parent
(self, child: QModelIndex) → QModelIndex¶ - Parameters
child (QModelIndex) –
- Return type
QModelIndex
-
parserErrorString
(self) → str¶ Returns a detailed message about errors while parsing a
QgsExpression
.- Return type
str
- Returns
A message containing information about the parser error.
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex = QModelIndex()) → int¶ - Parameters
parent (QModelIndex = QModelIndex()) –
- Return type
int
-
sender
()¶
-
senderSignalIndex
()¶
-
setDisplayExpression
(self, expression: str) → bool¶ - Parameters
expression (str) – A
QgsExpression
compatible string.- Return type
bool
- 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 (bool) – 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.
- Parameters
sortByDisplayExpression (bool) –
-
setSourceModel
(self, sourceModel: QgsAttributeTableFilterModel)¶ - Parameters
sourceModel (QgsAttributeTableFilterModel) –
-
sortByDisplayExpression
(self) → bool¶ Sort this model by its display expression.
New in version 3.2.
- Return type
bool
-
timerEvent
()¶