|
QGIS API Documentation 3.99.0-Master (f78f5286a64)
|
A named list tree node for the settings tree to help organizing and introspecting the tree. More...
#include <qgssettingstreenode.h>

Public Member Functions | |
| virtual | ~QgsSettingsTreeNamedListNode () |
| void | deleteAllItems (const QStringList &parentsNamedItems=QStringList()) |
| Deletes all items from the named list node. | |
| void | deleteItem (const QString &item, const QStringList &parentsNamedItems=QStringList()) |
| Deletes a named item from the named list node. | |
| QStringList | items (const QStringList &parentsNamedItems=QStringList()) const |
| Returns the list of items. | |
| QStringList | items (Qgis::SettingsOrigin origin, const QStringList &parentsNamedItems=QStringList()) const |
| Returns the list of items. | |
| QString | selectedItem (const QStringList &parentsNamedItems=QStringList()) |
| Returns the selected named item from the named list node. | |
| const QgsSettingsEntryString * | selectedItemSetting () const |
| Returns the setting used to store the selected item. | |
| void | setSelectedItem (const QString &item, const QStringList &parentsNamedItems=QStringList()) |
| Sets the selected named item from the named list node. | |
Public Member Functions inherited from QgsSettingsTreeNode | |
| virtual | ~QgsSettingsTreeNode () |
| QgsSettingsTreeNode * | childNode (const QString &key) const |
| Returns the existing child node if it exists at the given key. | |
| QList< QgsSettingsTreeNode * > | childrenNodes () const |
| Returns the children nodes. | |
| QList< const QgsSettingsEntryBase * > | childrenSettings () const |
| Returns the children settings. | |
| const QgsSettingsEntryBase * | childSetting (const QString &key) const |
| Returns the existing child settings if it exists at the given key. | |
| QString | completeKey () const |
| Returns the complete key of the node (including its parents) | |
| QgsSettingsTreeNode * | createChildNode (const QString &key) |
| Creates a normal tree node It will return the existing child node if it exists at the given key. | |
| QgsSettingsTreeNamedListNode * | createNamedListNode (const QString &key, const Qgis::SettingsTreeNodeOptions &options=Qgis::SettingsTreeNodeOptions()) |
| Creates a named list tree node. | |
| QString | key () const |
| Returns the key of the node (without its parents) | |
| int | namedNodesCount () const |
| Returns the number of named nodes in the complete key. | |
| QgsSettingsTreeNode * | parent () const |
| Returns the parent of the node or nullptr if it does not exists. | |
| void | registerChildSetting (const QgsSettingsEntryBase *setting, const QString &key) |
| Registers a child setting. | |
| Qgis::SettingsTreeNodeType | type () const |
| Returns the type of node. | |
| void | unregisterChildNode (QgsSettingsTreeNode *node) |
| Unregisters the child tree node. | |
| void | unregisterChildSetting (const QgsSettingsEntryBase *setting, bool deleteSettingValues=false, const QStringList &parentsNamedItems=QStringList()) |
| Unregisters the child setting. | |
Protected Member Functions | |
| void | initNamedList (const Qgis::SettingsTreeNodeOptions &options) |
| Init the nodes with the specific options. | |
Protected Member Functions inherited from QgsSettingsTreeNode | |
| void | registerChildNode (QgsSettingsTreeNode *node) |
| Registers a child nodes. | |
Friends | |
| class | QgsSettingsTreeNode |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsSettingsTreeNode | |
| static QgsSettingsTreeNode * | createRootNode () |
| Creates a tree root node. | |
Protected Attributes inherited from QgsSettingsTreeNode | |
| Qgis::SettingsTreeNodeType | mType = Qgis::SettingsTreeNodeType::Root |
A named list tree node for the settings tree to help organizing and introspecting the tree.
The named list node is used to store a group of settings under a dynamically named key.
Definition at line 193 of file qgssettingstreenode.h.
|
virtual |
Definition at line 163 of file qgssettingstreenode.cpp.
| void QgsSettingsTreeNamedListNode::deleteAllItems | ( | const QStringList & | parentsNamedItems = QStringList() | ) |
Deletes all items from the named list node.
| parentsNamedItems | the list of named items in the parent named list (if any) |
| QgsSettingsException | if the number of given parent named items doesn't match the complete key definition |
Definition at line 219 of file qgssettingstreenode.cpp.
| void QgsSettingsTreeNamedListNode::deleteItem | ( | const QString & | item, |
| const QStringList & | parentsNamedItems = QStringList() |
||
| ) |
Deletes a named item from the named list node.
| item | the item to delete |
| parentsNamedItems | the list of named items in the parent named list (if any) |
| QgsSettingsException | if the number of given parent named items doesn't match the complete key definition |
Definition at line 208 of file qgssettingstreenode.cpp.
|
protected |
Init the nodes with the specific options.
Definition at line 149 of file qgssettingstreenode.cpp.
| QStringList QgsSettingsTreeNamedListNode::items | ( | const QStringList & | parentsNamedItems = QStringList() | ) | const |
Returns the list of items.
| parentsNamedItems | the list of named items in the parent named list (if any) |
| QgsSettingsException | if the number of given parent named items doesn't match the complete key definition |
Definition at line 169 of file qgssettingstreenode.cpp.
| QStringList QgsSettingsTreeNamedListNode::items | ( | Qgis::SettingsOrigin | origin, |
| const QStringList & | parentsNamedItems = QStringList() |
||
| ) | const |
Returns the list of items.
| origin | can be used to restrict the origin of the setting (local or global) |
| parentsNamedItems | the list of named items in the parent named list (if any) |
| QgsSettingsException | if the number of given parent named items doesn't match the complete key definition |
Definition at line 174 of file qgssettingstreenode.cpp.
| QString QgsSettingsTreeNamedListNode::selectedItem | ( | const QStringList & | parentsNamedItems = QStringList() | ) |
Returns the selected named item from the named list node.
| parentsNamedItems | the list of named items in the parent named list (if any) |
| QgsSettingsException | if the number of given parent named items doesn't match the complete key definition |
Definition at line 198 of file qgssettingstreenode.cpp.
|
inline |
Returns the setting used to store the selected item.
Definition at line 246 of file qgssettingstreenode.h.
| void QgsSettingsTreeNamedListNode::setSelectedItem | ( | const QString & | item, |
| const QStringList & | parentsNamedItems = QStringList() |
||
| ) |
Sets the selected named item from the named list node.
| item | the item to set as selected |
| parentsNamedItems | the list of named items in the parent named list (if any) |
| QgsSettingsException | if the number of given parent named items doesn't match the complete key definition |
Definition at line 188 of file qgssettingstreenode.cpp.
|
friend |
Definition at line 253 of file qgssettingstreenode.h.