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

Method touchEnd

gui/qt/keypad/keypadwidget.cpp:466–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466void KeypadWidget::touchEnd() {
467 for (KeyCode code : mTouched) {
468 if (Key *key = mKeys[code.row()][code.col()]) {
469 bool wasSelected = key->isSelected();
470 key->release();
471 updateKey(key, wasSelected);
472 }
473 }
474 mTouched.clear();
475
476 // release any other keys that may be stuck??
477 for (uint8_t row = 0; row != sRows; ++row) {
478 for (uint8_t col = 0; col != sCols; ++col) {
479 if (Key *key = mKeys[row][col]) {
480 bool selected = key->isSelected();
481 if (selected) {
482 key->release();
483 updateKey(key, selected);
484 }
485 }
486 }
487 }
488}
489
490void KeypadWidget::touchEvent(QTouchEvent *event) {
491 switch (event->type()) {

Callers

nothing calls this directly

Calls 5

rowMethod · 0.80
colMethod · 0.80
releaseMethod · 0.80
isSelectedMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected