summaryrefslogtreecommitdiffstats
path: root/examples/nfc/ndefeditor/nfcmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nfc/ndefeditor/nfcmanager.h')
-rw-r--r--examples/nfc/ndefeditor/nfcmanager.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/nfc/ndefeditor/nfcmanager.h b/examples/nfc/ndefeditor/nfcmanager.h
new file mode 100644
index 00000000..b30f6f36
--- /dev/null
+++ b/examples/nfc/ndefeditor/nfcmanager.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef NFCMANAGER_H
+#define NFCMANAGER_H
+
+#include <QObject>
+
+#include <QQmlEngine>
+
+#include "nfctarget.h"
+
+QT_FORWARD_DECLARE_CLASS(QNearFieldManager);
+
+class NfcManager : public QObject
+{
+ Q_OBJECT
+ QML_ELEMENT
+
+public:
+ explicit NfcManager(QObject *parent = nullptr);
+
+ Q_INVOKABLE void startTargetDetection();
+ Q_INVOKABLE void stopTargetDetection();
+
+Q_SIGNALS:
+ void targetDetected(NfcTarget *target);
+
+private:
+ QNearFieldManager *m_manager;
+};
+
+#endif // NFCMANAGER_H