| 427 | } |
| 428 | |
| 429 | void InputEditorView::wheelEvent(QWheelEvent *event) |
| 430 | { |
| 431 | if (event->buttons() != Qt::RightButton) |
| 432 | return QTableView::wheelEvent(event); |
| 433 | |
| 434 | if (event->angleDelta().y() < 0) { |
| 435 | /* Push a single frame advance event */ |
| 436 | if (context->hotkey_pressed_queue.empty() || context->hotkey_pressed_queue.back() != HOTKEY_FRAMEADVANCE) { |
| 437 | context->hotkey_pressed_queue.push(HOTKEY_FRAMEADVANCE); |
| 438 | context->hotkey_released_queue.push(HOTKEY_FRAMEADVANCE); |
| 439 | } |
| 440 | } |
| 441 | else if (event->angleDelta().y() > 0) { |
| 442 | /* Only rewind when paused, which should prevent rewinding during the end |
| 443 | * of another rewind */ |
| 444 | if (context->framecount > 0 && !context->config.sc.running) |
| 445 | inputEditorModel->seekToFrame(context->framecount - 1); |
| 446 | } |
| 447 | |
| 448 | event->accept(); |
| 449 | } |
| 450 | |
| 451 | void InputEditorView::showMarkerToolTip(const QModelIndex &index) |
| 452 | { |
nothing calls this directly
no test coverage detected