open_iA 2023.02
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Loading...
Searching...
No Matches
Functions
iAAttributes.cpp File Reference
#include "iAAttributes.h"
#include <QTextStream>

Functions

void addAttr (iAAttributes &attributes, QString const &name, iAValueType valueType, QVariant defaultValue, double min, double max)
 
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.
 
QSharedPointer< iAAttributescreateAttributes (QTextStream &in)
 Create a descriptor from a given text stream.
 
QVariantMap extractValues (iAAttributes const &attributes)
 Extract just the 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.
 
QVariantMap joinValues (QVariantMap const &baseValues, QVariantMap const &newValues)
 Merge the values from newValues into baseValues.
 
void setApplyingValues (QVariantMap &out, iAAttributes const &attributes, QVariantMap const &in)
 In a given key/value map out, set values from another map in, for all keys that exist in the given attributes and the in map.
 
void storeAttributes (QTextStream &out, iAAttributes const &attributes)
 Store the given descriptors in the given text stream.
 

Function Documentation

◆ addAttr()

void addAttr ( iAAttributes attributes,
QString const &  name,
iAValueType  valueType,
QVariant  defaultValue,
double  min,
double  max 
)

◆ combineAttributesWithValues()

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)

◆ countAttributes()

int countAttributes ( iAAttributes const &  attributes,
iAAttributeDescriptor::iAAttributeType  type 
)

Count the attribute descriptors of the given type in the given collection.

◆ createAttributes()

QSharedPointer< iAAttributes > createAttributes ( QTextStream &  in)

Create a descriptor from a given text stream.

◆ extractValues()

QVariantMap extractValues ( iAAttributes const &  attributes)

Extract just the values from the given descriptors into a map.

◆ findAttribute()

int findAttribute ( iAAttributes const &  attributes,
QString const &  name 
)

Find a descriptor with the given name and return its index.

◆ joinValues()

QVariantMap joinValues ( QVariantMap const &  baseValues,
QVariantMap const &  newValues 
)

Merge the values from newValues into baseValues.

◆ setApplyingValues()

void setApplyingValues ( QVariantMap &  out,
iAAttributes const &  attributes,
QVariantMap const &  in 
)

In a given key/value map out, set values from another map in, for all keys that exist in the given attributes and the in map.

Parameters
outthe key/value map that is modified
attributeslist of possible attributes - only keys in out which have a corresponding entry in here will be set
inthe map of key/values used as input; any values existing in this map AND in attributes, will be set in out

◆ storeAttributes()

void storeAttributes ( QTextStream &  out,
iAAttributes const &  attributes 
)

Store the given descriptors in the given text stream.