Qt 5.6 | Qt NFC | C++ Classes | QNdefNfcTextRecord

Qt 5.6.2 Reference Documentation

# QNdefNfcTextRecord Class

The QNdefNfcTextRecord class provides an NFC RTD-Text More...

Header: | #include <QNdefNfcTextRecord>
qmake: | QT += nfc
Since: | Qt 5.2
Inherits: | QNdefRecord

- List of all members, including inherited members

## Public Types

enum | Encoding { Utf8, Utf16 }

## Public Functions

| 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 public functions inherited from QNdefRecord

## Detailed Description

The QNdefNfcTextRecord class provides an NFC RTD-Text

RTD-Text encapsulates a user displayable text record.

## Member Type Documentation

### 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.

## Member Function Documentation

### 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.

See also setEncoding().

### QString QNdefNfcTextRecord::locale() const

Returns the locale of the text record.

See also setLocale().

### void QNdefNfcTextRecord::setEncoding(Encoding encoding)

Sets the enconding of the contents to encoding.

See also encoding().

### void QNdefNfcTextRecord::setLocale(const QString &locale)

Sets the locale of the text record to locale.

See also locale().

### void QNdefNfcTextRecord::setText(const QString text)

Sets the contents of the text record to text.

See also text().

### QString QNdefNfcTextRecord::text() const

Returns the contents of the text record as a string.

See also setText().