QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgssettingstree.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgssettingstree.h
3 --------------------------------------
4 Date : February 2023
5 Copyright : (C) 2023 by Denis Rouzaud
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#include "qgssettingstree.h"
17
19{
20 // this must be defined in cpp code so we are sure only one instance is around
22 return sTreeRoot;
23}
24
26{
27 QgsSettingsTreeNode *te = sTreePlugins->childNode( pluginName );
28 if ( te )
29 return te;
30 else
31 return sTreePlugins->createChildNode( pluginName );
32}
33
34void QgsSettingsTree::unregisterPluginTreeNode( const QString &pluginName )
35{
36 QgsSettingsTreeNode *pluginTreeNode = sTreePlugins->childNode( pluginName );
37 delete pluginTreeNode;
38}
QgsSettingsTreeNode is a tree node for the settings tree to help organizing and introspecting the tre...
QgsSettingsTreeNode * createChildNode(const QString &key)
Creates a normal tree node It will return the existing child node if it exists at the given key.
QgsSettingsTreeNode * childNode(const QString &key) const
Returns the existing child node if it exists at the given key.
static QgsSettingsTreeNode * createRootNode()
Creates a tree root node.
static QgsSettingsTreeNode * sTreePlugins
static QgsSettingsTreeNode * treeRoot()
Returns the tree root node for the settings tree.
static void unregisterPluginTreeNode(const QString &pluginName)
Unregisters the tree node for the given plugin.
static QgsSettingsTreeNode * createPluginTreeNode(const QString &pluginName)
Creates a settings tree node for the given pluginName.