QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
QgsSettingsTreeNamedListNode is 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 | deleteItem (const QString &item, const QStringList &parentsNamedItems=QStringList()) SIP_THROW(QgsSettingsException) |
Deletes a named item from the named list node. More... | |
QStringList | items (const QStringList &parentsNamedItems=QStringList()) const SIP_THROW(QgsSettingsException) |
Returns the list of items. More... | |
QStringList | items (Qgis::SettingsOrigin origin, const QStringList &parentsNamedItems=QStringList()) const SIP_THROW(QgsSettingsException) |
Returns the list of items. More... | |
QString | selectedItem (const QStringList &parentsNamedItems=QStringList()) SIP_THROW(QgsSettingsException) |
Returns the selected named item from the named list node. More... | |
const QgsSettingsEntryString * | selectedItemSetting () const |
Returns the setting used to store the selected item. More... | |
void | setSelectedItem (const QString &item, const QStringList &parentsNamedItems=QStringList()) SIP_THROW(QgsSettingsException) |
Sets the selected named item from the named list node. More... | |
Public Member Functions inherited from QgsSettingsTreeNode | |
virtual | ~QgsSettingsTreeNode () |
QgsSettingsTreeNode * | childNode (const QString &key) |
Returns the existing child node if it exists at the given key. More... | |
QList< QgsSettingsTreeNode * > | childrenNodes () const |
Returns the children nodes. More... | |
QList< const QgsSettingsEntryBase * > | childrenSettings () const |
Returns the children settings. More... | |
const QgsSettingsEntryBase * | childSetting (const QString &key) |
Returns the existing child settings if it exists at the given key. More... | |
QString | completeKey () const |
Returns the complete key of the node (including its parents) More... | |
QgsSettingsTreeNode * | createChildNode (const QString &key) SIP_THROW(QgsSettingsException) |
Creates a normal tree node It will return the existing child node if it exists at the given key. More... | |
QgsSettingsTreeNamedListNode * | createNamedListNode (const QString &key, const Qgis::SettingsTreeNodeOptions &options=Qgis::SettingsTreeNodeOptions()) SIP_THROW(QgsSettingsException) |
Creates a named list tree node. More... | |
QString | key () const |
Returns the key of the node (without its parents) More... | |
int | namedNodesCount () const |
Returns the number of named nodes in the complete key. More... | |
QgsSettingsTreeNode * | parent () const |
Returns the parent of the node or nullptr if it does not exists. More... | |
void | registerChildSetting (const QgsSettingsEntryBase *setting, const QString &key) SIP_THROW(QgsSettingsException) |
Registers a child setting. More... | |
Qgis::SettingsTreeNodeType | type () const |
Returns the type of node. More... | |
void | unregisterChildNode (QgsSettingsTreeNode *node) |
Unregisters the child tree node. More... | |
void | unregisterChildSetting (const QgsSettingsEntryBase *setting, bool deleteSettingValues=false, const QStringList &parentsNamedItems=QStringList()) |
Unregisters the child setting. More... | |
Protected Member Functions | |
void | initNamedList (const Qgis::SettingsTreeNodeOptions &options) |
Init the nodes with the specific options. More... | |
Protected Member Functions inherited from QgsSettingsTreeNode | |
void | registerChildNode (QgsSettingsTreeNode *node) |
Registers a child nodes. More... | |
Friends | |
class | QgsSettingsTreeNode |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsSettingsTreeNode | |
static QgsSettingsTreeNode * | createRootNode () |
Creates a tree root node. More... | |
Protected Attributes inherited from QgsSettingsTreeNode | |
Qgis::SettingsTreeNodeType | mType = Qgis::SettingsTreeNodeType::Root |
QgsSettingsTreeNamedListNode is 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 191 of file qgssettingstreenode.h.
|
virtual |
Definition at line 153 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 196 of file qgssettingstreenode.cpp.
|
protected |
Init the nodes with the specific options.
Definition at line 139 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 159 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 164 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 186 of file qgssettingstreenode.cpp.
|
inline |
Returns the setting used to store the selected item.
Definition at line 236 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 176 of file qgssettingstreenode.cpp.
|
friend |
Definition at line 243 of file qgssettingstreenode.h.