D12162: Support for touch scrolling in Dolphin

Ambareesh Balaji noreply at phabricator.kde.org
Thu Apr 12 21:21:05 BST 2018


abalaji created this revision.
abalaji added a reviewer: Dolphin.
abalaji added a project: Dolphin.
abalaji requested review of this revision.

REVISION SUMMARY
  This patch adds support for touch scrolling in Dolphin using QScroller. I'm using Qt::MouseEventNotSynthesized to figure out if a mouse event was synthesized (which means it was a touch event and not an actual mouse event). Rubberbands do not trigger during touch scrolling. To prevent accidental item activation during touch scrolling, I check if there was a mouseMoveEvent emitted in between a mousePressEvent and a mouseReleaseEvent, in which case I prevent item activation from happening. To deal with grabbing and dragging using the touchscreen, I've implemented a rudimentary "touch and hold" mechanism, with a QTimer that starts on a mousePress and waits for 1000 milliseconds to see if the mouse moved, and if that wasn't the case, it disables touch scrolling temporarily so that dragging takes over.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D12162

AFFECTED FILES
  src/kitemviews/kitemlistcontainer.cpp
  src/kitemviews/kitemlistcontainer.h
  src/kitemviews/kitemlistcontroller.cpp
  src/kitemviews/kitemlistcontroller.h

To: abalaji, #dolphin
Cc: #dolphin, spoorun, navarromorales, isidorov, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180412/d1467733/attachment.htm>


More information about the kfm-devel mailing list