Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qvxmousemanager_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QVXMOUSEMANAGER_P_H
5#define QVXMOUSEMANAGER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
19
20#include <QtInputSupport/private/devicehandlerlist_p.h>
21
22#include <QObject>
23#include <QHash>
24#include <QSocketNotifier>
25#include <QPoint>
26
28
29class QDeviceDiscovery;
30
32{
33public:
34 QVxMouseManager(const QString &key, const QString &specification, QObject *parent = nullptr);
36
37 void handleMouseEvent(int x, int y, Qt::MouseButtons buttons,
38 Qt::MouseButton button, QEvent::Type type);
39
40 void addMouse(const QString &deviceNode = QString());
41 void removeMouse(const QString &deviceNode);
42
43private:
44 void clampPosition();
45 void updateDeviceCount();
46
47 QString m_spec;
48 QtInputSupport::DeviceHandlerList<QVxMouseHandler> m_mice;
49 int m_x;
50 int m_y;
51 int m_xoffset;
52 int m_yoffset;
53};
54
55QT_END_NAMESPACE
56
57#endif // QVXMOUSEMANAGER_P_H
QVxMouseManager(const QString &key, const QString &specification, QObject *parent=nullptr)
void handleMouseEvent(int x, int y, Qt::MouseButtons buttons, Qt::MouseButton button, QEvent::Type type)
void addMouse(const QString &deviceNode=QString())
void removeMouse(const QString &deviceNode)