MCPcopy Create free account
hub / github.com/IENT/YUView / savePlaylist

Method savePlaylist

YUViewLib/src/statistics/ColorMapper.cpp:390–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void ColorMapper::savePlaylist(YUViewDomElement &root) const
391{
392 root.setAttribute("colorMapperType", MappingTypeMapper.getName(this->mappingType));
393 if (this->mappingType == MappingType::Gradient)
394 {
395 root.setAttribute("colorMapperGradientStart", this->gradientColorStart.toHex());
396 root.setAttribute("colorMapperGradientEnd", this->gradientColorEnd.toHex());
397 }
398 if (this->mappingType == MappingType::Gradient || this->mappingType == MappingType::Predefined)
399 root.setAttribute("colorMapperRange", rangeToString(this->valueRange));
400 if (this->mappingType == MappingType::Predefined)
401 root.setAttribute("colorMapperPredefinedType",
402 PredefinedTypeMapper.getName(this->predefinedType));
403 if (this->mappingType == MappingType::Map)
404 for (auto &[key, value] : this->colorMap)
405 root.setAttribute("colorMapperMapValue" + std::to_string(key), value.toHex());
406}
407
408void ColorMapper::loadPlaylist(const QStringPairList &attributes)
409{

Callers

nothing calls this directly

Calls 5

rangeToStringFunction · 0.85
setAttributeMethod · 0.80
toHexMethod · 0.80
to_stringFunction · 0.50
getNameMethod · 0.45

Tested by

no test coverage detected