6#include <QtCore/QStringConverter>
7#include <QtCore/QLocale>
46QString QNdefNfcTextRecord::locale()
const
55 quint8 codeLength = status & 0x3f;
67 quint8 status =
p.isEmpty() ? 0 :
p.at(0);
69 quint8 codeLength = status & 0x3f;
71 quint8 newStatus = (status & 0xd0) | locale.size();
74 p.replace(1, codeLength, locale.toLatin1());
90 bool utf16 = status & 0x80;
91 quint8 codeLength = status & 0x3f;
97 return toUnicode(
QByteArrayView(
p.constData() + 1 + codeLength,
p.size() - 1 - codeLength));
112 bool utf16 = status & 0x80;
113 quint8 codeLength = status & 0x3f;
115 p.truncate(1 + codeLength);
121 p += fromUnicode(
text);
138 bool utf16 = status & 0x80;
153 quint8 status =
p.isEmpty() ? 0 :
p.at(0);
void setLocale(const QString &locale)
Sets the locale of the text record to locale.
QString text() const
Returns the contents of the text record as a string.
void setEncoding(Encoding encoding)
Sets the enconding of the contents to encoding.
Encoding
This enum describes the text encoding standard used.
Encoding encoding() const
Returns the encoding of the contents.
void setText(const QString text)
Sets the contents of the text record to text.
void setPayload(const QByteArray &payload)
Sets the payload of the NDEF record to payload.
QByteArray payload() const
Returns the payload of the NDEF record.
bool isEmpty() const
Returns true if the NDEF record contains an empty payload; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.