Changeset View
Changeset View
Standalone View
Standalone View
src/wheelhandler.cpp
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Line(s) | 273 | { | |||
---|---|---|---|---|---|
281 | 281 | | |||
282 | m_target = target; | 282 | m_target = target; | ||
283 | 283 | | |||
284 | GlobalWheelFilter::self()->setItemHandlerAssociation(target, this); | 284 | GlobalWheelFilter::self()->setItemHandlerAssociation(target, this); | ||
285 | 285 | | |||
286 | emit targetChanged(); | 286 | emit targetChanged(); | ||
287 | } | 287 | } | ||
288 | 288 | | |||
289 | void WheelHandler::includeWheelEvent(KirigamiWheelEvent *wheel) | ||||
290 | { | ||||
291 | const QPointF pos = {wheel->x(), wheel->y()}; | ||||
292 | QWheelEvent qwheel(pos, pos, wheel->pixelDelta().toPoint(), wheel->angleDelta().toPoint(), | ||||
293 | Qt::MouseButtons(wheel->buttons()), | ||||
294 | Qt::KeyboardModifiers (wheel->modifiers()), | ||||
295 | Qt::NoScrollPhase, wheel->inverted()); | ||||
296 | GlobalWheelFilter::self()->manageWheel(target(), &qwheel); | ||||
297 | } | ||||
289 | 298 | | |||
290 | #include "moc_wheelhandler.cpp" | 299 | #include "moc_wheelhandler.cpp" |