|
|
|
@ -276,6 +276,40 @@ T.ProgressBar { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
WheelHandler { |
|
|
|
orientation: Qt.Vertical | Qt.Horizontal |
|
|
|
|
|
|
|
acceptedDevices: PointerDevice.AllDevices |
|
|
|
|
|
|
|
onWheel: (wheel) => { |
|
|
|
wheelToVLC.qmlWheelEvent(wheel) |
|
|
|
wheel.accepted = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
WheelToVLCConverter { |
|
|
|
id: wheelToVLC |
|
|
|
|
|
|
|
function handleVertical(steps: int) { |
|
|
|
if (steps > 0) |
|
|
|
Player.jumpFwd() |
|
|
|
else |
|
|
|
Player.jumpBwd() |
|
|
|
} |
|
|
|
|
|
|
|
function handleHorizontal(steps: int) { |
|
|
|
if (steps > 0) |
|
|
|
Player.jumpBwd() |
|
|
|
else |
|
|
|
Player.jumpFwd() |
|
|
|
} |
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
wheelUpDown.connect(wheelToVLC, wheelToVLC.handleVertical) |
|
|
|
wheelLeftRight.connect(wheelToVLC, wheelToVLC.handleHorizontal) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
background: Item { |
|
|
|
|