QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Signals | Public Member Functions | List of all members
QgsConditionalLayerStyles Class Reference

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

#include <qgsconditionalstyle.h>

Inheritance diagram for QgsConditionalLayerStyles:
Inheritance graph
[legend]

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< QgsConditionalStylefieldStyles (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsConditionalLayerStyles()

QgsConditionalLayerStyles::QgsConditionalLayerStyles ( QObject *  parent = nullptr)

Constructor for QgsConditionalLayerStyles, with the specified parent object.

Definition at line 23 of file qgsconditionalstyle.cpp.

Member Function Documentation

◆ changed

void QgsConditionalLayerStyles::changed ( )
signal

Emitted when the conditional styles are changed.

Since
QGIS 3.10

◆ fieldStyles()

QList< QgsConditionalStyle > QgsConditionalLayerStyles::fieldStyles ( const QString &  fieldName) const

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

See also
setFieldStyles()

Definition at line 50 of file qgsconditionalstyle.cpp.

◆ readXml()

bool QgsConditionalLayerStyles::readXml ( const QDomNode &  node,
const QgsReadWriteContext context 
)

Reads the condition styles state from a DOM node.

See also
writeXml()

Definition at line 88 of file qgsconditionalstyle.cpp.

◆ rowStyles()

QgsConditionalStyles QgsConditionalLayerStyles::rowStyles ( ) const

Returns a list of row styles associated with the layer.

See also
setRowStyles()

Definition at line 27 of file qgsconditionalstyle.cpp.

◆ setFieldStyles()

void QgsConditionalLayerStyles::setFieldStyles ( const QString &  fieldName,
const QList< QgsConditionalStyle > &  styles 
)

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

See also
fieldStyles()

Definition at line 41 of file qgsconditionalstyle.cpp.

◆ setRowStyles()

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.

See also
rowStyles()
Since
QGIS 2.12

Definition at line 32 of file qgsconditionalstyle.cpp.

◆ writeXml()

bool QgsConditionalLayerStyles::writeXml ( QDomNode &  node,
QDomDocument &  doc,
const QgsReadWriteContext context 
) const

Writes the condition styles state to a DOM node.

See also
readXml()

Definition at line 55 of file qgsconditionalstyle.cpp.


The documentation for this class was generated from the following files: