| 388 | } |
| 389 | |
| 390 | void 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 | |
| 408 | void ColorMapper::loadPlaylist(const QStringPairList &attributes) |
| 409 | { |
nothing calls this directly
no test coverage detected