16 #ifndef QGSLAYERTREEUTILS_H 17 #define QGSLAYERTREEUTILS_H 19 #include <qnamespace.h> 22 #include "qgis_core.h" 45 static bool readOldLegend(
QgsLayerTreeGroup *root,
const QDomElement &legendElem );
47 static bool readOldLegendLayerOrder(
const QDomElement &legendElem,
bool &hasCustomOrder, QStringList &order );
49 static QDomElement writeOldLegend( QDomDocument &doc,
QgsLayerTreeGroup *root,
bool hasCustomOrder,
const QList<QgsMapLayer *> &order );
52 static QString checkStateToXml( Qt::CheckState state );
54 static Qt::CheckState checkStateFromXml(
const QString &txt );
57 static bool layersEditable(
const QList<QgsLayerTreeLayer *> &layerNodes );
59 static bool layersModified(
const QList<QgsLayerTreeLayer *> &layerNodes );
74 static void setLegendFilterByExpression(
QgsLayerTreeLayer &layer,
const QString &expr,
bool enabled =
true );
76 static QString legendFilterByExpression(
const QgsLayerTreeLayer &layer,
bool *enabled =
nullptr );
90 #endif // QGSLAYERTREEUTILS_H Layer tree group node serves as a container for layers and further groups.
Base class for all map layer types.
Assorted functions for dealing with layer trees.
This class is a base class for nodes in a layer tree.
Reads and writes project states.
Layer tree node points to a map layer.