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
qdevicediscovery_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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 QDEVICEDISCOVERY_H
5#define QDEVICEDISCOVERY_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
18#include <QObject>
19#include <QSocketNotifier>
20#include <QStringList>
21#include <private/qglobal_p.h>
22
23#define QT_EVDEV_DEVICE_PATH "/dev/input/"
24#define QT_EVDEV_DEVICE_PREFIX "event"
25#define QT_EVDEV_DEVICE QT_EVDEV_DEVICE_PATH QT_EVDEV_DEVICE_PREFIX
26
27#define QT_DRM_DEVICE_PATH "/dev/dri/"
28#define QT_DRM_DEVICE_PREFIX "card"
29#define QT_DRM_DEVICE QT_DRM_DEVICE_PATH QT_DRM_DEVICE_PREFIX
30
32
34{
36
37public:
52 Q_DECLARE_FLAGS(QDeviceTypes, QDeviceType)
53
54 static QDeviceDiscovery *create(QDeviceTypes type, QObject *parent = nullptr);
55
57
59 void deviceDetected(const QString &deviceNode);
60 void deviceRemoved(const QString &deviceNode);
61
62protected:
64 Q_DISABLE_COPY_MOVE(QDeviceDiscovery)
65
66 QDeviceTypes m_types;
67};
68
70
72
73#endif // QDEVICEDISCOVERY_H
QDeviceDiscovery(QDeviceTypes types, QObject *parent)
virtual QStringList scanConnectedDevices()=0
void deviceDetected(const QString &deviceNode)
void deviceRemoved(const QString &deviceNode)
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
GLsizei GLenum GLenum * types
GLenum type
#define Q_ENUM(x)
#define Q_OBJECT
#define signals
view create()