Debian Codegraph @

src/LomiriGestures/unownedtouchevent_p.h

raw symbols SCIP
1 /*
2 * Copyright 2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
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 Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #ifndef UNOWNEDTOUCHEVENT_P_H
18 #define UNOWNEDTOUCHEVENT_P_H
19
20 #include <QtCore/QScopedPointer>
21 #include <QtGui/QTouchEvent>
22
23 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
24 #include <LomiriGestures-Qt6/lomirigesturesglobal.h>
25 #else
26 #include <LomiriGestures/lomirigesturesglobal.h>
27 #endif
28
29 UG_NAMESPACE_BEGIN
30 /*
31 A touch event with touch points that do not belong the item receiving it.
32
33 See TouchRegistry::addCandidateOwnerForTouch and TouchRegistry::addTouchWatcher
34 */
35 class LOMIRIGESTURES_EXPORT UnownedTouchEvent : public QEvent
36 {
37 public:
38 UnownedTouchEvent(QTouchEvent *touchEvent);
39 static Type unownedTouchEventType();
40
41 // TODO: It might be cleaner to store the information directly in UnownedTouchEvent
42 // instead of carrying around a synthesized QTouchEvent. But the latter option
43 // is very convenient.
44 QTouchEvent *touchEvent();
45
46 private:
47 static Type m_unownedTouchEventType;
48 QScopedPointer<QTouchEvent> m_touchEvent;
49 };
50
51 UG_NAMESPACE_END
52
53 #endif // UNOWNEDTOUCHEVENT_P_H