| 357 | } |
| 358 | |
| 359 | void 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 | |
| 371 | void KeypadWidget::mouseUpdate(const QPointF &pos) { |
| 372 | const QPainterPath area{pos * mInverseTransform}; |
nothing calls this directly
no test coverage detected