Qt
6.x
The Qt SDK
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Symbols
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Loading...
Searching...
No Matches
nfc.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#include <QtNfc/qndefrecord.h>
5
#include <QtNfc/qndefnfctextrecord.h>
6
7
#include <QtCore/QDebug>
8
9
QT_USE_NAMESPACE
10
11
void
snippet_recordConversion
()
12
{
13
QNdefRecord
record
;
14
16
if
(
record
.isRecordType<
QNdefNfcTextRecord
>()) {
17
QNdefNfcTextRecord
textRecord(
record
);
18
19
qDebug
() << textRecord.
text
();
20
}
22
}
23
25
class
ExampleComF
:
public
QNdefRecord
26
{
27
public
:
28
Q_DECLARE_NDEF_RECORD
(
ExampleComF
,
QNdefRecord::ExternalRtd
,
"example.com:f"
,
29
QByteArray
(
sizeof
(
int
),
char
(0)))
30
31
int
foo
() const;
32
void
setFoo
(
int
v
);
33
};
34
35
Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD
(
ExampleComF
,
QNdefRecord
::
ExternalRtd
, "example.com:
f
")
ExampleComF
[Specialized class definition]
Definition
nfc.cpp:26
ExampleComF::setFoo
void setFoo(int v)
ExampleComF::Q_DECLARE_NDEF_RECORD
Q_DECLARE_NDEF_RECORD(ExampleComF, QNdefRecord::ExternalRtd, "example.com:f", QByteArray(sizeof(int), char(0))) int foo() const
QByteArray
\inmodule QtCore
Definition
qbytearray.h:57
QNdefNfcTextRecord
The QNdefNfcTextRecord class provides an NFC RTD-Text.
Definition
qndefnfctextrecord.h:13
QNdefNfcTextRecord::text
QString text() const
Returns the contents of the text record as a string.
Definition
qndefnfctextrecord.cpp:82
QNdefRecord
The QNdefRecord class provides an NFC NDEF record.
Definition
qndefrecord.h:16
QNdefRecord::ExternalRtd
@ ExternalRtd
Definition
qndefrecord.h:23
QT_USE_NAMESPACE
Definition
avfmediaassetwriter.mm:18
snippet_recordConversion
QT_USE_NAMESPACE void snippet_recordConversion()
Definition
nfc.cpp:11
qDebug
#define qDebug
[1]
Definition
qlogging.h:160
Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD
#define Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(className, typeNameFormat_, type_)
Definition
qndefrecord.h:72
v
GLsizei const GLfloat * v
[13]
Definition
qopengles2ext.h:788
f
GLfloat GLfloat f
Definition
qopengles2ext.h:795
record
MyRecord record(int row) const
[0]
Definition
src_corelib_tools_qcontiguouscache.cpp:5
foo
QString foo
[0]
Definition
stringbuilder.cpp:9
qtconnectivity
src
nfc
doc
snippets
nfc.cpp
Generated by
1.9.7