Class: QgsSettingsTreeNamedListNode¶
- class qgis.core.QgsSettingsTreeNamedListNode¶
Bases:
QgsSettingsTreeNode
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.See also
See also
See also
New in version 3.30:
Methods
Deletes all items from the named list node
Deletes a named item from the named list node
Returns the list of items
Returns the selected named item from the named list node
Returns the setting used to store the selected item
Sets the selected named item from the named list node
- deleteAllItems(self, parentsNamedItems: Iterable[str] = [])¶
Deletes all items from the named list node
- Parameters:
parentsNamedItems (Iterable[str] = []) – the list of named items in the parent named list (if any)
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition
New in version 3.30.1.
- deleteItem(self, item: str, parentsNamedItems: Iterable[str] = [])¶
Deletes a named item from the named list node
- Parameters:
item (str) – the item to delete
parentsNamedItems (Iterable[str] = []) – the list of named items in the parent named list (if any)
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition
- items(self, parentsNamedItems: Iterable[str] = []) List[str] ¶
Returns the list of items
- Parameters:
parentsNamedItems (Iterable[str] = []) – the list of named items in the parent named list (if any)
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition
items(self, origin: Qgis.SettingsOrigin, parentsNamedItems: Iterable[str] = []) -> List[str] Returns the list of items
- Parameters:
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)
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition
- Return type:
List[str]
- selectedItem(self, parentsNamedItems: Iterable[str] = []) str ¶
Returns the selected named item from the named list node
- Parameters:
parentsNamedItems (Iterable[str] = []) – the list of named items in the parent named list (if any)
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition
- Return type:
str
- selectedItemSetting(self) QgsSettingsEntryString ¶
Returns the setting used to store the selected item
- Return type:
- setSelectedItem(self, item: str, parentsNamedItems: Iterable[str] = [])¶
Sets the selected named item from the named list node
- Parameters:
item (str) – the item to set as selected
parentsNamedItems (Iterable[str] = []) – the list of named items in the parent named list (if any)
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition