QNdefMessage#
The QNdefMessage
class provides an NFC NDEF message. More…
Synopsis#
Functions#
def
__add__
(l)def
__eq__
(other)def
__iadd__
(l)def
__lshift__
(l)def
append
(arg__1)def
append
(l)def
at
(i)def
back
()def
capacity
()def
clear
()def
constData
()def
constFirst
()def
constLast
()def
count
()def
data
()def
empty
()def
first
()def
first
(n)def
front
()def
insert
(arg__1, arg__2)def
isEmpty
()def
isSharedWith
(other)def
last
()def
last
(n)def
length
()def
mid
(pos[, len=-1])def
move
(from, to)def
operator[]
(i)def
pop_back
()def
pop_front
()def
prepend
(arg__1)def
push_back
(arg__1)def
push_front
(arg__1)def
remove
(i[, n=1])def
removeAll
(arg__1)def
removeAt
(i)def
removeFirst
()def
removeLast
()def
removeOne
(arg__1)def
reserve
(size)def
resize
(size)def
shrink_to_fit
()def
size
()def
sliced
(pos)def
sliced
(pos, n)def
squeeze
()def
swap
(other)def
swapItemsAt
(i, j)def
takeAt
(i)def
toByteArray
()def
toList
()def
toVector
()def
value
(i)
Static functions#
def
fromByteArray
(message)def
fromList
(list)def
fromVector
(vector)
Detailed Description#
A QNdefMessage
is a collection of 0 or more QNdefRecords. QNdefMessage
inherits from QList
< QNdefRecord
> and therefore the standard QList
functions can be used to manipulate the NDEF records in the message.
NDEF messages can be parsed from a byte array conforming to the NFC Data Exchange Format technical specification by using the fromByteArray()
static function. Conversely QNdefMessages can be converted into a byte array with the toByteArray()
function.
- class PySide6.QtNfc.QNdefMessage#
PySide6.QtNfc.QNdefMessage(records)
PySide6.QtNfc.QNdefMessage(message)
PySide6.QtNfc.QNdefMessage(record)
- Parameters
records –
message –
PySide6.QtNfc.QNdefMessage
record –
PySide6.QtNfc.QNdefRecord
Constructs a new empty NDEF message.
Constructs a new NDEF message that contains all of the records in records
.
Constructs a new NDEF message that is a copy of message
.
Constructs a new NDEF message containing a single record record
.
- PySide6.QtNfc.QNdefMessage.append(l)#
- Parameters
l –
- PySide6.QtNfc.QNdefMessage.append(arg__1)
- Parameters
arg__1 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.at(i)#
- Parameters
i –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.back()#
- Return type
- PySide6.QtNfc.QNdefMessage.capacity()#
- Return type
qsizetype
- PySide6.QtNfc.QNdefMessage.clear()#
- PySide6.QtNfc.QNdefMessage.constData()#
- Return type
- PySide6.QtNfc.QNdefMessage.constFirst()#
- Return type
- PySide6.QtNfc.QNdefMessage.constLast()#
- Return type
- PySide6.QtNfc.QNdefMessage.count()#
- Return type
qsizetype
- PySide6.QtNfc.QNdefMessage.data()#
- Return type
- PySide6.QtNfc.QNdefMessage.empty()#
- Return type
bool
- PySide6.QtNfc.QNdefMessage.first(n)#
- Parameters
n –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.first()
- Return type
- static PySide6.QtNfc.QNdefMessage.fromByteArray(message)#
- Parameters
message –
PySide6.QtCore.QByteArray
- Return type
Returns an NDEF message parsed from the contents of message
.
The message
parameter is interpreted as the raw message format defined in the NFC Data Exchange Format technical specification.
If a parse error occurs an empty NDEF message is returned.
- static PySide6.QtNfc.QNdefMessage.fromList(list)#
- Parameters
list –
- Return type
- static PySide6.QtNfc.QNdefMessage.fromVector(vector)#
- Parameters
vector –
- Return type
- PySide6.QtNfc.QNdefMessage.front()#
- Return type
- PySide6.QtNfc.QNdefMessage.insert(arg__1, arg__2)#
- Parameters
arg__1 –
qsizetype
arg__2 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.isEmpty()#
- Return type
bool
- Parameters
other –
- Return type
bool
- PySide6.QtNfc.QNdefMessage.last()#
- Return type
- PySide6.QtNfc.QNdefMessage.last(n)
- Parameters
n –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.length()#
- Return type
qsizetype
- PySide6.QtNfc.QNdefMessage.mid(pos[, len=-1])#
- Parameters
pos –
qsizetype
len –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.move(from, to)#
- Parameters
from –
qsizetype
to –
qsizetype
- PySide6.QtNfc.QNdefMessage.__add__(l)#
- Parameters
l –
- Return type
- PySide6.QtNfc.QNdefMessage.__iadd__(l)#
- Parameters
l –
- Return type
- PySide6.QtNfc.QNdefMessage.__lshift__(l)#
- Parameters
l –
- Return type
- PySide6.QtNfc.QNdefMessage.__eq__(other)#
- Parameters
other –
PySide6.QtNfc.QNdefMessage
- Return type
bool
Returns true
if this NDEF message is equivalent to other
; otherwise returns false
.
An empty message (i.e. isEmpty()
returns true
) is equivalent to a NDEF message containing a single record of type Empty
.
- PySide6.QtNfc.QNdefMessage.operator[](i)
- Parameters
i –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.pop_back()#
- PySide6.QtNfc.QNdefMessage.pop_front()#
- PySide6.QtNfc.QNdefMessage.prepend(arg__1)#
- Parameters
arg__1 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.push_back(arg__1)#
- Parameters
arg__1 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.push_front(arg__1)#
- Parameters
arg__1 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.remove(i[, n=1])#
- Parameters
i –
qsizetype
n –
qsizetype
- PySide6.QtNfc.QNdefMessage.removeAll(arg__1)#
- Parameters
arg__1 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.removeAt(i)#
- Parameters
i –
qsizetype
- PySide6.QtNfc.QNdefMessage.removeFirst()#
- PySide6.QtNfc.QNdefMessage.removeLast()#
- PySide6.QtNfc.QNdefMessage.removeOne(arg__1)#
- Parameters
arg__1 –
PySide6.QtNfc.QNdefRecord
- PySide6.QtNfc.QNdefMessage.reserve(size)#
- Parameters
size –
qsizetype
- PySide6.QtNfc.QNdefMessage.resize(size)#
- Parameters
size –
qsizetype
- PySide6.QtNfc.QNdefMessage.shrink_to_fit()#
- PySide6.QtNfc.QNdefMessage.size()#
- Return type
qsizetype
- PySide6.QtNfc.QNdefMessage.sliced(pos, n)#
- Parameters
pos –
qsizetype
n –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.sliced(pos)
- Parameters
pos –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.squeeze()#
- PySide6.QtNfc.QNdefMessage.swap(other)#
- Parameters
other –
- PySide6.QtNfc.QNdefMessage.swapItemsAt(i, j)#
- Parameters
i –
qsizetype
j –
qsizetype
- PySide6.QtNfc.QNdefMessage.takeAt(i)#
- Parameters
i –
qsizetype
- Return type
- PySide6.QtNfc.QNdefMessage.toByteArray()#
- Return type
Returns the NDEF message as a byte array.
The return value of this function conforms to the format defined in the NFC Data Exchange Format technical specification.
- PySide6.QtNfc.QNdefMessage.toList()#
- Return type
- PySide6.QtNfc.QNdefMessage.toVector()#
- Return type
- PySide6.QtNfc.QNdefMessage.value(i)#
- Parameters
i –
qsizetype
- Return type