Class: QgsRuleBasedRendererModel

class qgis.gui.QgsRuleBasedRendererModel(renderer: QgsRuleBasedRenderer, parent: QObject)

Bases: PyQt5.QtCore.QAbstractItemModel

Constructor for QgsRuleBasedRendererModel, for the specified renderer.

Tree model for the rules:

(invalid) == root node +— top level rule +— top level rule

Enums

Methods

beginInsertColumns

beginInsertRows

beginMoveColumns

beginMoveRows

beginRemoveColumns

beginRemoveRows

beginResetModel

changePersistentIndex

changePersistentIndexList

childEvent

clearFeatureCounts

columnCount

connectNotify

createIndex

customEvent

data

decodeData

disconnectNotify

dropMimeData

encodeData

endInsertColumns

endInsertRows

endMoveColumns

endMoveRows

endRemoveColumns

endRemoveRows

endResetModel

finishedAddingRules

flags

headerData

index

insertRule

isSignalConnected

mimeData

mimeTypes

parent

persistentIndexList

receivers

removeRows

removeRule

resetInternalData

rowCount

ruleForIndex

sender

senderSignalIndex

setData

setSymbol

Sets the symbol for the rule at the specified index.

supportedDropActions

timerEvent

updateRule

updateRule(self, index: QModelIndex)

willAddRules

Signals

Attributes

beginInsertColumns()
beginInsertRows()
beginMoveColumns()
beginMoveRows()
beginRemoveColumns()
beginRemoveRows()
beginResetModel()
changePersistentIndex()
changePersistentIndexList()
childEvent()
clearFeatureCounts(self)
columnCount(self, QModelIndex = QModelIndex()) → int
connectNotify()
createIndex()
customEvent()
data(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any
decodeData()
disconnectNotify()
dropMimeData(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) → bool
encodeData()
endInsertColumns()
endInsertRows()
endMoveColumns()
endMoveRows()
endRemoveColumns()
endRemoveRows()
endResetModel()
finishedAddingRules(self)
flags(self, index: QModelIndex) → Qt.ItemFlags
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) → Any
index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) → QModelIndex
insertRule(self, parent: QModelIndex, before: int, newrule: QgsRuleBasedRenderer.Rule)
isSignalConnected()
mimeData(self, indexes: Iterable[QModelIndex]) → QMimeData
mimeTypes(self) → List[str]
parent(self, index: QModelIndex) → QModelIndex
persistentIndexList()
receivers()
removeRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) → bool
removeRule(self, index: QModelIndex)
resetInternalData()
rowCount(self, parent: QModelIndex = QModelIndex()) → int
ruleForIndex(self, index: QModelIndex) → QgsRuleBasedRenderer.Rule
sender()
senderSignalIndex()
setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) → bool
setSymbol(self, index: QModelIndex, symbol: QgsSymbol)

Sets the symbol for the rule at the specified index. Ownership of the symbols is transferred to the renderer.

New in version 3.10.

supportedDropActions(self) → Qt.DropActions
timerEvent()
updateRule(self, parent: QModelIndex, row: int)

updateRule(self, index: QModelIndex)

willAddRules(self, parent: QModelIndex, count: int)