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

Method getColorMap

YUViewLib/src/ui/StatisticsStyleControl_ColorMapEditor.cpp:86–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86ColorMap StatisticsStyleControl_ColorMapEditor::getColorMap() const
87{
88 ColorMap colorMap;
89 const auto table = this->ui.colorMapTable;
90
91 for (int row = 0; row < ui.colorMapTable->rowCount(); row++)
92 {
93 auto item0 = table->item(row, 0);
94 auto item1 = table->item(row, 1);
95
96 if (item0->text() != "Other")
97 {
98 auto val = item0->data(Qt::EditRole).toInt();
99 auto color = functionsGui::toColor(item1->background().color());
100
101 colorMap[val] = color;
102 }
103 }
104
105 return colorMap;
106}
107
108Color StatisticsStyleControl_ColorMapEditor::getOtherColor() const
109{

Callers 1

Calls 3

rowCountMethod · 0.80
textMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected