@@ -37,6 +37,10 @@ class MirSurfaceItem : public QQuickItem
3737 Q_PROPERTY(bool live READ live NOTIFY liveChanged)
3838 Q_PROPERTY(OrientationAngle orientationAngle READ orientationAngle WRITE setOrientationAngle
3939 NOTIFY orientationAngleChanged DESIGNABLE false)
40+ Q_PROPERTY(int touchPressCount READ touchPressCount WRITE setTouchPressCount
41+ NOTIFY touchPressCountChanged DESIGNABLE false)
42+ Q_PROPERTY(int touchReleaseCount READ touchReleaseCount WRITE setTouchReleaseCount
43+ NOTIFY touchReleaseCountChanged DESIGNABLE false)
4044
4145public:
4246 enum Type {
@@ -85,11 +89,19 @@ public:
8589 Q_INVOKABLE void setState(State newState);
8690 Q_INVOKABLE void release();
8791
92+ int touchPressCount() const { return m_touchPressCount; }
93+ void setTouchPressCount(int count) { m_touchPressCount = count; Q_EMIT touchPressCountChanged(count); }
94+
95+ int touchReleaseCount() const { return m_touchReleaseCount; }
96+ void setTouchReleaseCount(int count) { m_touchReleaseCount = count; Q_EMIT touchReleaseCountChanged(count); }
97+
8898Q_SIGNALS:
8999 void typeChanged(Type);
90100 void stateChanged(State);
91101 void liveChanged(bool live);
92102 void orientationAngleChanged(OrientationAngle angle);
103+ void touchPressCountChanged(int count);
104+ void touchReleaseCountChanged(int count);
93105
94106 // internal mock use
95107 void deregister();
@@ -102,6 +114,8 @@ protected:
102114 const QString &qmlFilePath = QString(),
103115 QQuickItem *parent = 0);
104116
117+ void touchEvent(QTouchEvent * event) override;
118+
105119private Q_SLOTS:
106120 void onComponentStatusChanged(QQmlComponent::Status status);
107121
@@ -120,6 +134,9 @@ private:
120134 QQuickItem *m_qmlItem;
121135 QUrl m_screenshotUrl;
122136
137+ int m_touchPressCount;
138+ int m_touchReleaseCount;
139+
123140 friend class SurfaceManager;
124141};
125142