Class: QgsConditionalLayerStyles

class qgis.core.QgsConditionalLayerStyles

Bases: PyQt5.QtCore.QObject

The QgsConditionalLayerStyles class holds conditional style information for a layer. This includes field styles and full row styles.

QgsConditionalLayerStyles(parent: QObject = None) Constructor for QgsConditionalLayerStyles, with the specified parent object.

Methods

childEvent

connectNotify

customEvent

disconnectNotify

fieldStyles

Returns the conditional styles set for the field with matching fieldName.

isSignalConnected

readXml

Reads the condition styles state from a DOM node.

receivers

rowStyles

Returns a list of row styles associated with the layer.

sender

senderSignalIndex

setFieldStyles

Set the conditional styles for a field, with the specified fieldName.

setRowStyles

Sets the conditional styles that apply to full rows of data in the attribute table.

timerEvent

writeXml

Writes the condition styles state to a DOM node.

Signals

changed

Emitted when the conditional styles are changed.

changed

Emitted when the conditional styles are changed.

New in version 3.10: [signal]

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
fieldStyles(self, fieldName: str)List[QgsConditionalStyle]

Returns the conditional styles set for the field with matching fieldName.

See also

setFieldStyles()

Parameters

fieldName (str) –

Return type

List[QgsConditionalStyle]

isSignalConnected(self, QMetaMethod)bool
readXml(self, node: QDomNode, context: QgsReadWriteContext)bool

Reads the condition styles state from a DOM node.

See also

writeXml()

Parameters
Return type

bool

receivers(self, PYQT_SIGNAL)int
rowStyles(self)List[QgsConditionalStyle]

Returns a list of row styles associated with the layer.

See also

setRowStyles()

Return type

List[QgsConditionalStyle]

sender(self)QObject
senderSignalIndex(self)int
setFieldStyles(self, fieldName: str, styles: Iterable[QgsConditionalStyle])

Set the conditional styles for a field, with the specified fieldName.

See also

fieldStyles()

Parameters
setRowStyles(self, styles: Iterable[QgsConditionalStyle])

Sets the conditional styles that apply to full rows of data in the attribute table. Each row will check be checked against each rule.

See also

rowStyles()

New in version 2.12.

Parameters

styles (Iterable[QgsConditionalStyle]) –

timerEvent(self, QTimerEvent)
writeXml(self, node: QDomNode, doc: QDomDocument, context: QgsReadWriteContext)bool

Writes the condition styles state to a DOM node.

See also

readXml()

Parameters
Return type

bool