MCPcopy Create free account
hub / github.com/clementgallet/libTAS / updateInputRow

Method updateInputRow

src/program/ui/InputWindow.cpp:150–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void InputWindow::updateInputRow(int tab, int row)
151{
152 SingleInput si = context->config.km->input_list[tab][row];
153
154 /* Check if a key is mapped to this input */
155 for (auto itermap : context->config.km->input_mapping) {
156 if (itermap.second == si) {
157 QString str;
158 /* Special case for visibility:
159 * if mapped to itself print <self> */
160 if ((si.type == SingleInput::IT_KEYBOARD) && (si.which == itermap.first))
161 str += "<self>";
162 else
163 str += context->config.km->input_description(itermap.first).c_str();
164
165 inputTable[tab]->item(row, 1)->setText(str);
166 return;
167 }
168 }
169
170 inputTable[tab]->item(row, 1)->setText("");
171}
172
173void InputWindow::update()
174{

Callers

nothing calls this directly

Calls 2

input_descriptionMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected