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

Function loadFromSettings

YUViewLib/src/statistics/CustomColorMapStorage.cpp:71–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::vector<CustomColorMap> loadFromSettings()
72{
73 QSettings settings;
74 std::vector<CustomColorMap> colorMaps;
75
76 auto size = settings.beginReadArray("CustomColorMaps");
77 for (int i = 0; i < size; ++i)
78 {
79 settings.setArrayIndex(i);
80
81 CustomColorMap customColorMap;
82 customColorMap.name = settings.value("name").toString();
83 customColorMap.colorMap = parseColorMap(settings.value("colorMap").toString());
84 customColorMap.other = Color(settings.value("otherColor").toString().toStdString());
85 colorMaps.push_back(customColorMap);
86 }
87 settings.endArray();
88 return colorMaps;
89}
90
91void storeToSettings(const std::vector<CustomColorMap> &colorMaps)
92{

Callers 1

CustomColorMapStorageMethod · 0.85

Calls 3

parseColorMapFunction · 0.85
ColorClass · 0.85
toStringMethod · 0.80

Tested by

no test coverage detected