MeVisLab Scripting Reference
MLPropertyContainerWrapper Class Reference
Inheritance diagram for MLPropertyContainerWrapper:
MLBaseGraphItemWrapper MLSkeletonWrapper MLVesselEdgeWrapper MLVesselNodeWrapper

Public Slots

virtual void copyProperties (QObject *wrapper)
 
QVariantMap getProperties ()
 
QVariant getProperty (const QString &name)
 
void setProperty (const QString &name, QVariant value)
 
size_t getPropertyIndex (const QString &name)
 
QVariant getProperty (size_t index)
 
void setProperty (size_t index, QVariant value)
 
size_t createPropertyDouble (const QString &name, double defaultValue)
 
size_t createPropertyUInt8 (const QString &name, long defaultValue)
 
size_t createPropertyInt32 (const QString &name, long defaultValue)
 
size_t createPropertyVector3 (const QString &name, QVariantList pos)
 
void removeProperty (const QString &name)
 

Properties

QVariantMap properties
 

Detailed Description

A class that wraps PropertyContainer objects for use in Scripting.

Properties are a general approach to attach various data to the objects in a graph. Note that these are no Qt properties and must always be accessed with getProperty() or other methods of this class.

Member Function Documentation

◆ copyProperties

virtual void MLPropertyContainerWrapper::copyProperties ( QObject *  wrapper)
virtualslot

Copy all properties from the given object.

◆ createPropertyDouble

size_t MLPropertyContainerWrapper::createPropertyDouble ( const QString &  name,
double  defaultValue 
)
inlineslot

Create a new property with the given name and default value, returns the index of this property.

This doesn't set the property on the given object, this just reserves a slot on the property manager.

◆ createPropertyInt32

size_t MLPropertyContainerWrapper::createPropertyInt32 ( const QString &  name,
long  defaultValue 
)
inlineslot

Same as above for signed 32-bit integer value.

◆ createPropertyUInt8

size_t MLPropertyContainerWrapper::createPropertyUInt8 ( const QString &  name,
long  defaultValue 
)
inlineslot

Same as above for unsigned 8-bit integer value.

◆ createPropertyVector3

size_t MLPropertyContainerWrapper::createPropertyVector3 ( const QString &  name,
QVariantList  pos 
)
inlineslot

Same as above for 3D position (given as [x, y, z]).

◆ getProperties

QVariantMap MLPropertyContainerWrapper::getProperties ( )
slot

Get all properties of this object.

◆ getProperty [1/2]

QVariant MLPropertyContainerWrapper::getProperty ( const QString &  name)
inlineslot

Get the value of the property with the given name.

References getProperty().

Referenced by getProperty().

◆ getProperty [2/2]

QVariant MLPropertyContainerWrapper::getProperty ( size_t  index)
inlineslot

Get the value of the property value with the given index.

◆ getPropertyIndex

size_t MLPropertyContainerWrapper::getPropertyIndex ( const QString &  name)
inlineslot

Returns the index of the property with given name.

The index is constant across objects of the same type, and can be used to speed up the access across many object.

◆ removeProperty

void MLPropertyContainerWrapper::removeProperty ( const QString &  name)
inlineslot

Remove property with name name.

◆ setProperty [1/2]

void MLPropertyContainerWrapper::setProperty ( const QString &  name,
QVariant  value 
)
inlineslot

Set the value of the property with the given name.

References setProperty().

Referenced by setProperty().

◆ setProperty [2/2]

void MLPropertyContainerWrapper::setProperty ( size_t  index,
QVariant  value 
)
inlineslot

Set the value of the property value with the given index.

Property Documentation

◆ properties

QVariantMap MLPropertyContainerWrapper::properties
read

The properties of this object (read-only).