QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
The QgsConditionalLayerStyles class holds conditional style information for a layer. More...
#include <qgsconditionalstyle.h>
Signals | |
void | changed () |
Emitted when the conditional styles are changed. More... | |
Public Member Functions | |
QgsConditionalLayerStyles (QObject *parent=nullptr) | |
Constructor for QgsConditionalLayerStyles, with the specified parent object. More... | |
QList< QgsConditionalStyle > | fieldStyles (const QString &fieldName) const |
Returns the conditional styles set for the field with matching fieldName. More... | |
bool | readXml (const QDomNode &node, const QgsReadWriteContext &context) |
Reads the condition styles state from a DOM node. More... | |
QgsConditionalStyles | rowStyles () const |
Returns a list of row styles associated with the layer. More... | |
void | setFieldStyles (const QString &fieldName, const QList< QgsConditionalStyle > &styles) |
Set the conditional styles for a field, with the specified fieldName. More... | |
void | setRowStyles (const QgsConditionalStyles &styles) |
Sets the conditional styles that apply to full rows of data in the attribute table. More... | |
bool | writeXml (QDomNode &node, QDomDocument &doc, const QgsReadWriteContext &context) const |
Writes the condition styles state to a DOM node. More... | |
The QgsConditionalLayerStyles class holds conditional style information for a layer.
This includes field styles and full row styles.
Definition at line 40 of file qgsconditionalstyle.h.
QgsConditionalLayerStyles::QgsConditionalLayerStyles | ( | QObject * | parent = nullptr | ) |
Constructor for QgsConditionalLayerStyles, with the specified parent object.
Definition at line 24 of file qgsconditionalstyle.cpp.
|
signal |
Emitted when the conditional styles are changed.
QList< QgsConditionalStyle > QgsConditionalLayerStyles::fieldStyles | ( | const QString & | fieldName | ) | const |
Returns the conditional styles set for the field with matching fieldName.
Definition at line 51 of file qgsconditionalstyle.cpp.
bool QgsConditionalLayerStyles::readXml | ( | const QDomNode & | node, |
const QgsReadWriteContext & | context | ||
) |
Reads the condition styles state from a DOM node.
Definition at line 89 of file qgsconditionalstyle.cpp.
QgsConditionalStyles QgsConditionalLayerStyles::rowStyles | ( | ) | const |
Returns a list of row styles associated with the layer.
Definition at line 28 of file qgsconditionalstyle.cpp.
void QgsConditionalLayerStyles::setFieldStyles | ( | const QString & | fieldName, |
const QList< QgsConditionalStyle > & | styles | ||
) |
Set the conditional styles for a field, with the specified fieldName.
Definition at line 42 of file qgsconditionalstyle.cpp.
void QgsConditionalLayerStyles::setRowStyles | ( | const QgsConditionalStyles & | styles | ) |
Sets the conditional styles that apply to full rows of data in the attribute table.
Each row will check be checked against each rule.
Definition at line 33 of file qgsconditionalstyle.cpp.
bool QgsConditionalLayerStyles::writeXml | ( | QDomNode & | node, |
QDomDocument & | doc, | ||
const QgsReadWriteContext & | context | ||
) | const |
Writes the condition styles state to a DOM node.
Definition at line 56 of file qgsconditionalstyle.cpp.