2
* Copyright (C) 2014 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef UBUNTU_UNOWNEDTOUCHEVENT_H
18
#define UBUNTU_UNOWNEDTOUCHEVENT_H
20
#include <QTouchEvent>
21
#include <QScopedPointer>
22
#include "UbuntuGesturesGlobal.h"
25
A touch event with touch points that do not belong the item receiving it.
27
See TouchRegistry::addCandidateOwnerForTouch and TouchRegistry::addTouchWatcher
29
class UBUNTUGESTURES_EXPORT UnownedTouchEvent : public QEvent
32
UnownedTouchEvent(QTouchEvent *touchEvent);
33
static Type unownedTouchEventType();
35
// TODO: It might be cleaner to store the information directly in UnownedTouchEvent
36
// instead of carrying around a synthesized QTouchEvent. But the latter option
37
// is very convenient.
38
QTouchEvent *touchEvent();
41
static Type m_unownedTouchEventType;
42
QScopedPointer<QTouchEvent> m_touchEvent;
45
#endif // UBUNTU_UNOWNEDTOUCHEVENT_H