const Qt::MouseButtons buttons = event->buttons();
- if (!onPress(event->screenPos(), event->pos(), event->modifiers(), buttons)) {
+ if (!onPress(event->pos(), event->modifiers(), buttons)) {
startRubberBand();
return false;
}
if (m_dragActionOrRightClick) {
m_dragActionOrRightClick = false;
} else {
- onPress(m_pressedMouseGlobalPos.toPoint(), tap->position().toPoint(), Qt::NoModifier, Qt::LeftButton);
+ onPress(tap->position().toPoint(), Qt::NoModifier, Qt::LeftButton);
onRelease(transform.map(tap->position()), Qt::NoModifier, Qt::LeftButton, true);
}
m_isTouchEvent = false;
const QPointF pressedMousePos = transform.map(twoTap->pos());
m_pressedIndex = m_view->itemAt(pressedMousePos);
if (m_pressedIndex.has_value()) {
- onPress(twoTap->screenPos().toPoint(), twoTap->pos().toPoint(), Qt::ControlModifier, Qt::LeftButton);
+ onPress(twoTap->pos().toPoint(), Qt::ControlModifier, Qt::LeftButton);
onRelease(transform.map(twoTap->pos()), Qt::ControlModifier, Qt::LeftButton, false);
}
}
}
}
-bool KItemListController::onPress(const QPoint &screenPos, const QPointF &pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons)
+bool KItemListController::onPress(const QPointF &pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons)
{
Q_EMIT mouseButtonPressed(m_pressedIndex.value_or(-1), buttons);
void pinchTriggered(QGestureEvent *event, const QTransform &transform);
void swipeTriggered(QGestureEvent *event, const QTransform &transform);
void twoFingerTapTriggered(QGestureEvent *event, const QTransform &transform);
- bool onPress(const QPoint &screenPos, const QPointF &pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons);
+ bool onPress(const QPointF &pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons);
bool onRelease(const QPointF &pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons, bool touch);
void startRubberBand();