QNdefMessage#
The QNdefMessage class provides an NFC NDEF message. More…
Synopsis#
Functions#
def
append(l)def
append(arg__1)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
__add__(l)def
__iadd__(l)def
__lshift__(l)def
__eq__(other)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)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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.QNdefMessagerecord –
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()#
- Return type:
- PySide6.QtNfc.QNdefMessage.first(n)
- Parameters:
n –
qsizetype- 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 –
qsizetypearg__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 –
qsizetypelen –
qsizetype
- Return type:
- PySide6.QtNfc.QNdefMessage.move(from, to)#
- Parameters:
from –
qsizetypeto –
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 –
qsizetypen –
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)#
- Parameters:
pos –
qsizetype- Return type:
- PySide6.QtNfc.QNdefMessage.sliced(pos, n)
- Parameters:
pos –
qsizetypen –
qsizetype
- Return type:
- PySide6.QtNfc.QNdefMessage.squeeze()#
- PySide6.QtNfc.QNdefMessage.swap(other)#
- Parameters:
other –
- PySide6.QtNfc.QNdefMessage.swapItemsAt(i, j)#
- Parameters:
i –
qsizetypej –
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: