QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
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 38 of file qgsconditionalstyle.h.
QgsConditionalLayerStyles::QgsConditionalLayerStyles | ( | QObject * | parent = nullptr | ) |
Constructor for QgsConditionalLayerStyles, with the specified parent object.
Definition at line 23 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 50 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 88 of file qgsconditionalstyle.cpp.
QgsConditionalStyles QgsConditionalLayerStyles::rowStyles | ( | ) | const |
Returns a list of row styles associated with the layer.
Definition at line 27 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 41 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 32 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 55 of file qgsconditionalstyle.cpp.