class documentation
class Config_Collection:
Constructor: Config_Collection(gui, prefix, types, first_without_suffix)
Config_Collection class.
Method | __init__ |
Initializes a config collection: A list of groups (dictionaries). |
Method | add |
Appends a group to the collection. |
Method | del |
Deletes a group from the collection. |
Method | get |
Gets every group in the collection. |
Method | get |
Gets the number of groups in the collection. |
Method | get |
Gets a group from the collection. |
Method | set |
Sets a value for some key in a group of the collection. |
Instance Variable | first |
Undocumented |
Instance Variable | gui |
Undocumented |
Instance Variable | prefix |
Undocumented |
Instance Variable | types |
Undocumented |
Method | _get |
Gets the suffix for a given group index. |
Initializes a config collection: A list of groups (dictionaries).
Example for the SOMETHING collection, consisting of two groups _0 and _1, each with two keys FOO and BAR: SOMETHING_count = 2 SOMETHING_FOO_0 = "1st value in 1st group" SOMETHING_BAR_0 = "2nd value in 1st group" SOMETHING_FOO_1 = "1st value in 2nd group" SOMETHING_BAR_1 = "2nd value in 2nd group"
Parameters | |
gui:GUI | GUI |
prefix:str | Prefix |
types:dict | Key:Type (Dictionary) |
firstbool | Enable to omit the suffix "_0" for the first group |
Sets a value for some key in a group of the collection.
Parameters | |
groupint | Group index |
key:str | Key |
value | Value |