MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / updateKey

Method updateKey

gui/qt/keypad/keypadwidget.cpp:359–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359void KeypadWidget::updateKey(Key *key, bool wasSelected) {
360 bool selected = key->isSelected();
361 if (selected != wasSelected) {
362 update(mTransform.mapRect(key->keyGeometry()));
363 emu_keypad_event(key->keycode().row(), key->keycode().col(), selected);
364 if (selected) {
365 QString out = QStringLiteral("[") + key->getLabel() + QStringLiteral("]");
366 emit keyPressed(out.simplified().replace(" ",""));
367 }
368 }
369}
370
371void KeypadWidget::mouseUpdate(const QPointF &pos) {
372 const QPainterPath area{pos * mInverseTransform};

Callers

nothing calls this directly

Calls 6

emu_keypad_eventFunction · 0.85
rowMethod · 0.80
keycodeMethod · 0.80
colMethod · 0.80
getLabelMethod · 0.80
isSelectedMethod · 0.45

Tested by

no test coverage detected