Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtuiohandler_p.h
Go to the documentation of this file.
1// Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QTUIOHANDLER_P_H
6#define QTUIOHANDLER_P_H
7
8#include <QList>
9#include <QObject>
10#include <QMap>
11#include <QUdpSocket>
12#include <QTransform>
13
14#include <qpa/qwindowsysteminterface.h>
15
17
18class QPointingDevice;
19class QOscMessage;
20class QTuioCursor;
21class QTuioToken;
22
23class QTuioHandler : public QObject
24{
26 Q_MOC_INCLUDE("qoscmessage_p.h")
27
28public:
29 explicit QTuioHandler(const QString &specification);
30 virtual ~QTuioHandler();
31
32private slots:
33 void processPackets();
34 void process2DCurSource(const QOscMessage &message);
35 void process2DCurAlive(const QOscMessage &message);
36 void process2DCurSet(const QOscMessage &message);
37 void process2DCurFseq(const QOscMessage &message);
38 void process2DObjSource(const QOscMessage &message);
39 void process2DObjAlive(const QOscMessage &message);
40 void process2DObjSet(const QOscMessage &message);
41 void process2DObjFseq(const QOscMessage &message);
42
43private:
44 QWindowSystemInterface::TouchPoint cursorToTouchPoint(const QTuioCursor &tc, QWindow *win);
46
47 QPointingDevice *m_device = nullptr;
48 QUdpSocket m_socket;
49 QMap<int, QTuioCursor> m_activeCursors;
50 QList<QTuioCursor> m_deadCursors;
51 QMap<int, QTuioToken> m_activeTokens;
52 QList<QTuioToken> m_deadTokens;
53 QTransform m_transform;
54};
55
57
58#endif // QTUIOHANDLER_P_H
\inmodule QtCore
Definition qobject.h:103
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
QTuioHandler(const QString &specification)
virtual ~QTuioHandler()
\reentrant
Definition qudpsocket.h:21
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
GLuint GLsizei const GLchar * message
const GLfloat * tc
#define Q_OBJECT
#define Q_MOC_INCLUDE(...)
#define slots
QWidget * win
Definition settings.cpp:6