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

Function parseColorMap

YUViewLib/src/statistics/CustomColorMapStorage.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43{
44
45ColorMap parseColorMap(const QString &mapString)
46{
47 ColorMap colorMap;
48 for (auto entry : mapString.split("|"))
49 {
50 auto indexAndColor = entry.split(",");
51 if (indexAndColor.size() == 2)
52 {
53 auto index = indexAndColor.at(0).toInt();
54 auto color = Color(indexAndColor.at(1).toStdString());
55 colorMap[index] = color;
56 }
57 }
58 return colorMap;
59}
60
61QString toString(const ColorMap &colorMap)
62{

Callers 1

loadFromSettingsFunction · 0.85

Calls 3

ColorClass · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected