Class: QgsConditionalLayerStyles¶
-
class
qgis.core.
QgsConditionalLayerStyles
¶ Bases:
sip.wrapper
The QgsConditionalLayerStyles class holds conditional style information for a layer. This includes field styles and full row styles.
Enums
Methods
Returns the conditional styles set for the field UI properties
Reads field ui properties specific state from Dom node.
Set the conditional styles for the field UI properties.
Set the conditional styles that apply to full rows of data in the attribute table.
Write field ui properties specific state from Dom node.
Signals
Attributes
-
fieldStyles
(self, fieldName: str) → List[QgsConditionalStyle]¶ Returns the conditional styles set for the field UI properties
- Returns
A list of conditional styles that have been set.
-
readXml
(self, node: QDomNode, context: QgsReadWriteContext) → bool¶ Reads field ui properties specific state from Dom node.
-
rowStyles
(self) → List[QgsConditionalStyle]¶
-
setFieldStyles
(self, fieldName: str, styles: Iterable[QgsConditionalStyle])¶ Set the conditional styles for the field UI properties.
- Parameters
fieldName – name of field
styles –
-
setRowStyles
(self, styles: Iterable[QgsConditionalStyle])¶ Set the conditional styles that apply to full rows of data in the attribute table. Each row will check be checked against each rule.
- Parameters
styles – The styles to assign to all the rows
New in version 2.12.
-
writeXml
(self, node: QDomNode, doc: QDomDocument, context: QgsReadWriteContext) → bool¶ Write field ui properties specific state from Dom node.
-