From 37d5aaa4b42f9c837f0d27edb9da2185971d02be Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 11 Jun 2020 09:24:12 +0200 Subject: Change QWindow/QWidget::map(To/From)(Global/Parent) to operate in float Change the functions to operate in float and add the QPoint versions as overload calling them. This is more in-line with the event accessors using float and allows for removing some workarounds using a delta when converting touch points. Leave QPlatformWindow::map(To/From)Global() as is for now and add helpers for float. Change-Id: I2d46b8dbda8adff26539e358074b55073dc80b6f Reviewed-by: Shawn Rutledge Reviewed-by: Volker Hilsheimer --- src/widgets/kernel/qwidget.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/widgets/kernel/qwidget.h') diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 0d2c2913f9..2bfff96252 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -295,11 +295,17 @@ public: // Widget coordinate mapping + QPointF mapToGlobal(const QPointF &) const; QPoint mapToGlobal(const QPoint &) const; + QPointF mapFromGlobal(const QPointF &) const; QPoint mapFromGlobal(const QPoint &) const; + QPointF mapToParent(const QPointF &) const; QPoint mapToParent(const QPoint &) const; + QPointF mapFromParent(const QPointF &) const; QPoint mapFromParent(const QPoint &) const; + QPointF mapTo(const QWidget *, const QPointF &) const; QPoint mapTo(const QWidget *, const QPoint &) const; + QPointF mapFrom(const QWidget *, const QPointF &) const; QPoint mapFrom(const QWidget *, const QPoint &) const; QWidget *window() const; -- cgit v1.2.3