MCPcopy Create free account
hub / github.com/alpha-liu-01/SpeedyNote / startButtonMapping

Method startButtonMapping

source/ControllerMappingDialog.cpp:164–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void ControllerMappingDialog::startButtonMapping(const QString &logicalButton) {
165 if (!controller) return;
166
167 // Disable all mapping buttons during mapping
168 for (auto button : mappingButtons) {
169 button->setEnabled(false);
170 }
171
172 // Update the current button being mapped
173 currentMappingButton = logicalButton;
174 mappingButtons[logicalButton]->setText(tr("Press button..."));
175
176 // Start button detection mode
177 controller->startButtonDetection();
178
179 // Start timeout timer
180 mappingTimeoutTimer->start();
181
182 // Show status message
183 QApplication::setOverrideCursor(Qt::WaitCursor);
184}
185
186void ControllerMappingDialog::onRawButtonPressed(int sdlButton, const QString &buttonName) {
187 if (currentMappingButton.isEmpty()) return;

Callers

nothing calls this directly

Calls 4

startButtonDetectionMethod · 0.80
startMethod · 0.80
setEnabledMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected