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 );
62 static bool layersEditable(
const QList<QgsLayerTreeLayer *> &layerNodes,
bool ignoreLayersWhichCannotBeToggled =
false );
65 static bool layersModified(
const QList<QgsLayerTreeLayer *> &layerNodes );
74 static void storeOriginalLayersProperties(
QgsLayerTreeGroup *group,
const QDomDocument *doc );
88 static void setLegendFilterByExpression(
QgsLayerTreeLayer &layer,
const QString &expr,
bool enabled =
true );
90 static QString legendFilterByExpression(
const QgsLayerTreeLayer &layer,
bool *enabled =
nullptr );
108 static QSet<QgsMapLayer *> collectMapLayersRecursive(
const QList<QgsLayerTreeNode *> &nodes );