QNdefNfcTextRecord Class
The QNdefNfcTextRecord class provides an NFC RTD-Text 更多...
头文件: | #include <QNdefNfcTextRecord> |
qmake: | QT += nfc |
开始支持版本: | Qt 5.2 |
基类: | QNdefRecord |
公有类型
enum | Encoding { Utf8, Utf16 } |
公有函数
QNdefNfcTextRecord() | |
QNdefNfcTextRecord(const QNdefRecord &other) | |
Encoding | encoding() const |
QString | locale() const |
void | setEncoding(Encoding encoding) |
void | setLocale(const QString &locale) |
void | setText(const QString text) |
QString | text() const |
- 13 个公有函数继承自 QNdefRecord
详细描述
The QNdefNfcTextRecord class provides an NFC RTD-Text
RTD-Text encapsulates a user displayable text record.
成员类型
enum QNdefNfcTextRecord::Encoding
This enum describes the text encoding standard used.
Constant | Value | Description |
---|---|---|
QNdefNfcTextRecord::Utf8 | 0 | The text is encoded with UTF-8. |
QNdefNfcTextRecord::Utf16 | 1 | The text is encoding with UTF-16. |
成员函数
QNdefNfcTextRecord::QNdefNfcTextRecord()
Constructs an empty NFC text record of type QNdefRecord::NfcRtd.
QNdefNfcTextRecord::QNdefNfcTextRecord(const QNdefRecord &other)
Constructs a new NFC text record that is a copy of other.
Encoding QNdefNfcTextRecord::encoding() const
Returns the encoding of the contents.
参见 setEncoding().
QString QNdefNfcTextRecord::locale() const
Returns the locale of the text record.
参见 setLocale().
void QNdefNfcTextRecord::setEncoding(Encoding encoding)
Sets the enconding of the contents to encoding.
参见 encoding().
void QNdefNfcTextRecord::setLocale(const QString &locale)
Sets the locale of the text record to locale.
参见 locale().
void QNdefNfcTextRecord::setText(const QString text)
Sets the contents of the text record to text.
参见 text().
QString QNdefNfcTextRecord::text() const
Returns the contents of the text record as a string.
参见 setText().