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.cpp
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#include "qnearfieldmanager.h"
6
7#if defined(QT_SIMULATOR)
8#include "qnearfieldmanager_simulator_p.h"
9#elif defined(NEARD_NFC)
11#elif defined(ANDROID_NFC)
13#elif defined(IOS_NFC)
15#elif defined(PCSC_NFC)
17#else
19#endif
20
21#include <QtCore/QMetaType>
22#include <QtCore/QMetaMethod>
23
25
143
166
171{
172 delete d_ptr;
173}
174
184{
185 Q_D(const QNearFieldManager);
186
187 return d->isEnabled();
188}
189
200{
201 Q_D(const QNearFieldManager);
202
203 return d->isSupported(accessMethod);
204}
205
224{
226
227 return d->startTargetDetection(accessMethod);
228}
229
249{
251
252 d->stopTargetDetection(errorMessage);
253}
254
271{
273
274 d->setUserInformation(message);
275}
276
278
279#include "moc_qnearfieldmanager_p.cpp"
280
281#include "moc_qnearfieldmanager.cpp"
void targetDetected(QNearFieldTarget *target)
void adapterStateChanged(QNearFieldManager::AdapterState state)
void targetLost(QNearFieldTarget *target)
The QNearFieldManager class provides access to notifications for NFC events.
void setUserInformation(const QString &message)
void targetDetectionStopped()
bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod)
Starts detecting targets and returns true if target detection started successfully; otherwise returns...
void adapterStateChanged(QNearFieldManager::AdapterState state)
void stopTargetDetection(const QString &errorMessage=QString())
Stops detecting targets.
~QNearFieldManager()
Destroys the near field manager.
void targetDetected(QNearFieldTarget *target)
This signal is emitted whenever a target is detected.
QNearFieldManager(QObject *parent=nullptr)
Constructs a new near field manager with parent.
void targetLost(QNearFieldTarget *target)
This signal is emitted whenever a target moves out of proximity.
bool isSupported(QNearFieldTarget::AccessMethod accessMethod=QNearFieldTarget::AnyAccess) const
AccessMethod
This enum describes the access methods a near field target supports.
\inmodule QtCore
Definition qobject.h:103
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLuint GLsizei const GLchar * message
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
Definition qurl.cpp:3517