aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents_p_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-08-03 15:32:42 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-04 04:44:23 +0000
commit5ef56c550cd01b7e7d1d0ecdb4a60ff9e9eb3e73 (patch)
tree552592ea3126a229fa79266569acbb57e8bb6990 /src/quick/items/qquickevents_p_p.h
parent1cd7f9bd3769f6aab9cd7aba12536b1e3fa532be (diff)
QQuickEvents: de-inline a few more functions
Touching this header results in rebuilding a lot of stuff, and these functions are likely to need further modification. Change-Id: Idc99255fc8e20a190c31b5e3d47dd005f4573434 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents_p_p.h')
-rw-r--r--src/quick/items/qquickevents_p_p.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 0169c8e1e1..47fda2fe01 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -259,18 +259,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickEventPoint : public QObject
public:
QQuickEventPoint(QQuickPointerEvent *parent);
- void reset(Qt::TouchPointState state, QPointF scenePos, quint64 pointId, ulong timestamp)
- {
- m_scenePos = scenePos;
- m_pointId = pointId;
- m_valid = true;
- m_accept = false;
- m_state = state;
- m_timestamp = timestamp;
- if (state == Qt::TouchPointPressed)
- m_pressTimestamp = timestamp;
- // TODO calculate velocity
- }
+ void reset(Qt::TouchPointState state, QPointF scenePos, quint64 pointId, ulong timestamp);
void invalidate() { m_valid = false; }
@@ -281,7 +270,7 @@ public:
bool isValid() const { return m_valid; }
qreal timeHeld() const { return (m_timestamp - m_pressTimestamp) / 1000.0; }
bool isAccepted() const { return m_accept; }
- void setAccepted(bool accepted = true) { m_accept = accepted; }
+ void setAccepted(bool accepted = true);
QQuickItem *grabber() const;
void setGrabber(QQuickItem *grabber);
@@ -307,13 +296,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickEventTouchPoint : public QQuickEventPoint
public:
QQuickEventTouchPoint(QQuickPointerTouchEvent *parent);
- void reset(const QTouchEvent::TouchPoint &tp, ulong timestamp)
- {
- QQuickEventPoint::reset(tp.state(), tp.scenePos(), tp.id(), timestamp);
- m_rotation = tp.rotation();
- m_pressure = tp.pressure();
- m_uniqueId = tp.uniqueId();
- }
+ void reset(const QTouchEvent::TouchPoint &tp, ulong timestamp);
qreal rotation() const { return m_rotation; }
qreal pressure() const { return m_pressure; }
@@ -390,9 +373,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerMouseEvent : public QQuickPointerEvent
{
public:
QQuickPointerMouseEvent(QObject *parent = nullptr)
- : QQuickPointerEvent(parent), m_mousePoint(new QQuickEventPoint(this))
- {
- }
+ : QQuickPointerEvent(parent), m_mousePoint(new QQuickEventPoint(this)) { }
QQuickPointerEvent *reset(QEvent *) override;
bool isPressEvent() const override;
@@ -415,8 +396,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerTouchEvent : public QQuickPointerEvent
{
public:
QQuickPointerTouchEvent(QObject *parent = nullptr)
- : QQuickPointerEvent(parent), m_pointCount(0)
- {}
+ : QQuickPointerEvent(parent), m_pointCount(0) { }
QQuickPointerEvent *reset(QEvent *) override;
bool isPressEvent() const override;