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
qnearfieldmanager.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QNEARFIELDMANAGER_H
5#define QNEARFIELDMANAGER_H
6
7#include <QtCore/QObject>
8#include <QtNfc/qtnfcglobal.h>
9#include <QtNfc/QNearFieldTarget>
10#include <QtNfc/QNdefRecord>
11#include <QtNfc/QNdefFilter>
12
14
16class Q_NFC_EXPORT QNearFieldManager : public QObject
17{
19
20 Q_DECLARE_PRIVATE(QNearFieldManager)
21
22public:
23 enum class AdapterState {
24 Offline = 1,
25 TurningOn = 2,
26 Online = 3,
27 TurningOff = 4
28 };
29 Q_ENUM(AdapterState)
30
31 explicit QNearFieldManager(QObject *parent = nullptr);
32 explicit QNearFieldManager(QNearFieldManagerPrivate *backend, QObject *parent = nullptr);
34
35 bool isEnabled() const;
36 bool isSupported(QNearFieldTarget::AccessMethod accessMethod
38
39 bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod);
40 void stopTargetDetection(const QString &errorMessage = QString());
41
42 void setUserInformation(const QString &message);
43
49
50private:
52};
53
55
56#endif // QNEARFIELDMANAGER_H
The QNearFieldManager class provides access to notifications for NFC events.
void targetDetectionStopped()
void adapterStateChanged(QNearFieldManager::AdapterState state)
void targetDetected(QNearFieldTarget *target)
This signal is emitted whenever a target is detected.
void targetLost(QNearFieldTarget *target)
This signal is emitted whenever a target moves out of proximity.
The QNearFieldTarget class provides an interface for communicating with a target device.
AccessMethod
This enum describes the access methods a near field target supports.
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
else opt state
[0]
Combined button and popup list for selecting options.
GLenum target
GLuint GLsizei const GLchar * message
#define Q_ENUM(x)
#define Q_OBJECT
#define Q_SIGNALS
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
Definition qurl.cpp:3517