|
open_iA 2024.9
|
#include "iAAttributes.h"#include "iAValueTypeVectorHelpers.h"#include <QTextStream>#include "iASettings.h"#include <QDomElement>#include <QDomNamedNodeMap>Functions | |
| void | addAttr (iAAttributes &attributes, QString const &name, iAValueType valueType, QVariant defaultValue, double min, double max) |
| Add a new attribute specified by the parameters to the given attributes list. | |
| iAAttributes | cloneAttributes (iAAttributes const &attributes) |
| Clone the given list of attributes and return the copy. | |
| iAAttributes | combineAttributesWithValues (iAAttributes const &attributes, QVariantMap const &values) |
| Merge the given values into the descriptors (returns new descriptors with the given values as default values) | |
| int | countAttributes (iAAttributes const &attributes, iAAttributeDescriptor::iAAttributeType type) |
| Count the attribute descriptors of the given type in the given collection. | |
| std::shared_ptr< iAAttributes > | createAttributes (QTextStream &in) |
| Create a descriptor from a given text stream. | |
| QVariantMap | extractValues (iAAttributes const &attributes) |
| Extract just the (default) values from the given descriptors into a map. | |
| int | findAttribute (iAAttributes const &attributes, QString const &name) |
| Find a descriptor with the given name and return its index. | |
| QVariant | getValue (iAAttributes const &attributes, QString const &name) |
| Get the default value of the descriptor with the given name. | |
| QVariantMap | joinValues (QVariantMap const &baseValues, QVariantMap const &newValues) |
| Merge the values from newValues and baseValues into a new map. | |
| void | loadAttributeValues (QDomNamedNodeMap const &xml, iAAttributes &attributes) |
| void | removeAttribute (iAAttributes &attributes, QString const &name) |
| Removes the attribute with the given name. | |
| void | setApplyingValues (QVariantMap &out, iAAttributes const &attributes, QVariantMap const &in) |
| In a given key/value map outMap, set values from another map inMap, for all keys that exist in the given attributes and the inMap. | |
| void | setDefaultValues (iAAttributes &attributes, QVariantMap const &values) |
| Merge the given values into the descriptors (modifying the given ones in place, in contrast to combineAttributesWithValues, which creates a new list) | |
| void | storeAttributes (QTextStream &out, iAAttributes const &attributes) |
| Store the given descriptors in the given text stream. | |
| void | storeAttributeValues (QDomElement &xml, iAAttributes const &attributes) |
| void addAttr | ( | iAAttributes & | attributes, |
| QString const & | name, | ||
| iAValueType | valueType, | ||
| QVariant | defaultValue, | ||
| double | min, | ||
| double | max ) |
Add a new attribute specified by the parameters to the given attributes list.
| iAAttributes cloneAttributes | ( | iAAttributes const & | attributes | ) |
Clone the given list of attributes and return the copy.
| iAAttributes combineAttributesWithValues | ( | iAAttributes const & | attributes, |
| QVariantMap const & | values ) |
Merge the given values into the descriptors (returns new descriptors with the given values as default values)
| int countAttributes | ( | iAAttributes const & | attributes, |
| iAAttributeDescriptor::iAAttributeType | type ) |
Count the attribute descriptors of the given type in the given collection.
| std::shared_ptr< iAAttributes > createAttributes | ( | QTextStream & | in | ) |
Create a descriptor from a given text stream.
| QVariantMap extractValues | ( | iAAttributes const & | attributes | ) |
Extract just the (default) values from the given descriptors into a map.
| int findAttribute | ( | iAAttributes const & | attributes, |
| QString const & | name ) |
Find a descriptor with the given name and return its index.
| QVariant getValue | ( | iAAttributes const & | attributes, |
| QString const & | name ) |
Get the default value of the descriptor with the given name.
| QVariantMap joinValues | ( | QVariantMap const & | baseValues, |
| QVariantMap const & | newValues ) |
Merge the values from newValues and baseValues into a new map.
Creates and returns a map that contains key/value pairs from both given maps; values that exist in both get assigned the value from newValues
| [in] | baseValues | used to initialize the resulting map |
| [in] | newValues | all key/value pairs in this map are added to the result, overwriting ones that might already be present from baseValues |
| void loadAttributeValues | ( | QDomNamedNodeMap const & | xml, |
| iAAttributes & | attributes ) |
| void removeAttribute | ( | iAAttributes & | attributes, |
| QString const & | name ) |
Removes the attribute with the given name.
| void setApplyingValues | ( | QVariantMap & | outMap, |
| iAAttributes const & | attributes, | ||
| QVariantMap const & | inMap ) |
In a given key/value map outMap, set values from another map inMap, for all keys that exist in the given attributes and the inMap.
| [out] | outMap | the key/value map that is modified (note that this map isn't emptied before; so all key/value pairs that were already contained in there, and are not in both attributes and inMap, will remain unchanged. |
| [in] | attributes | list of possible attributes - only keys of outMap which have a corresponding entry in here will be set |
| [in] | inMap | the map of key/values used as input; any values existing in this map AND in attributes, will be set in outMap |
| void setDefaultValues | ( | iAAttributes & | attributes, |
| QVariantMap const & | values ) |
Merge the given values into the descriptors (modifying the given ones in place, in contrast to combineAttributesWithValues, which creates a new list)
| void storeAttributes | ( | QTextStream & | out, |
| iAAttributes const & | attributes ) |
Store the given descriptors in the given text stream.
| void storeAttributeValues | ( | QDomElement & | xml, |
| iAAttributes const & | attributes ) |