MCPcopy Create free account
hub / github.com/clementgallet/libTAS / wheelEvent

Method wheelEvent

src/program/ui/InputEditorView.cpp:429–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429void 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
451void InputEditorView::showMarkerToolTip(const QModelIndex &index)
452{

Callers

nothing calls this directly

Calls 4

backMethod · 0.80
seekToFrameMethod · 0.80
emptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected