vrdMetadataSet¶
-
class
vrdMetadataSet
¶
(Inherits vrdObject
)
This class gives access to the metadata set and metadata entries of an object.
Metadata sets contain a list of key value pairs as vrdMetadataEntry objects.
Summary¶
- Functions:
- createEntry(valueType) → vrdMetadataEntry
- getColor() → QColor
- getEntries() → vrdMetadataEntryList
- getIcon() → QIcon
- getName() → string
- getObjects() → List[vrdSceneObject]
- getUniqueKey(key) → string
- getValue(key) → QVariant
- isAsset() → bool
- isAssigned() → bool
- isEditable() → bool
- isEditedAsset() → bool
- isLocked() → bool
- isObjectSet() → bool
- setColor(color)
- setLocked(value)
- setName(name)
- setValue(key, value)
Functions¶
-
vrdMetadataSet.
createEntry
(valueType)¶ Create a new entry and add this new entry to this set.
Parameters: valueType (vrMetadataTypes.ValueType) – The value type of the new entry. Returns: The created vrdMetadataEntry object. Return type: vrdMetadataEntry
-
vrdMetadataSet.
getColor
()¶ Returns: Color of this set. Return type: QColor
-
vrdMetadataSet.
getEntries
()¶ Gets all vrdMetadataEntry entries of this set.
Returns: A vrdMetadataEntryList which contains all vrdMetadataEntry entries of this set. Return type: vrdMetadataEntryList
-
vrdMetadataSet.
getIcon
()¶ Returns: The icon of this set. The icon will be set internally and can’t be changed. Return type: QIcon
-
vrdMetadataSet.
getName
()¶ Returns: The name of the set. Return type: string
-
vrdMetadataSet.
getObjects
()¶ Returns: All scene objects this set is assigned to. Return type: List[vrdSceneObject]
-
vrdMetadataSet.
getUniqueKey
(key)¶ Gets a unique key within the metadata set.
Parameters: key (string) – The key candidate. Returns: A unique key based on the key candidate. Return type: string
-
vrdMetadataSet.
getValue
(key)¶ Gets a value for an entry with a given key.
Parameters: key (string) – Returns: The value for this key as QVariant. If no entry with the given key exists, an empty QVariant will be returned. Return type: QVariant
-
vrdMetadataSet.
isAsset
()¶ Gets the asset state of this set.
Returns: True, if this set is an imported asset. Return type: bool
-
vrdMetadataSet.
isAssigned
()¶ Returns: True, if the set is assigned to at least one object. Return type: bool
-
vrdMetadataSet.
isEditable
()¶ Gets the edit state of this set.
Returns: True, if the set can be changed. Return type: bool
-
vrdMetadataSet.
isEditedAsset
()¶ Gets the asset state of this set.
Returns: True, if this set is an imported asset and can be edited. Return type: bool
-
vrdMetadataSet.
isLocked
()¶ Gets lock state of the set.
Returns: True, if the set is locked. Return type: bool
-
vrdMetadataSet.
isObjectSet
()¶ Returns: True, if this set is an object set. See vrdMetadata.getObjectSet(). Return type: bool
-
vrdMetadataSet.
setColor
(color)¶ Each metadata set has a color.
Parameters: color (QColor) – New color for this set.
-
vrdMetadataSet.
setLocked
(value)¶ Lock or unlock a metadata set.
Parameters: value (bool) – New lock state.
-
vrdMetadataSet.
setName
(name)¶ Sets the name of the metadata set.
Parameters: name (string) – A name for the set.
-
vrdMetadataSet.
setValue
(key, value)¶ Sets a value for an entry with a given key. If no entry with the given key exists, a new entry with this key and with this value will be created.
Parameters: - key (string) – The key.
- value (QVariant) – The new value for this key.