1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QNDEFNFCTEXTRECORD_H |
5 | #define QNDEFNFCTEXTRECORD_H |
6 | |
7 | #include <QtNfc/qtnfcglobal.h> |
8 | #include <QtNfc/QNdefRecord> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | class Q_NFC_EXPORT QNdefNfcTextRecord : public QNdefRecord |
13 | { |
14 | public: |
15 | #ifndef Q_QDOC |
16 | Q_DECLARE_NDEF_RECORD(QNdefNfcTextRecord, QNdefRecord::NfcRtd, "T", QByteArray(1, char(0))) |
17 | #else |
18 | QNdefNfcTextRecord(); |
19 | QNdefNfcTextRecord(const QNdefRecord& other); |
20 | #endif |
21 | |
22 | QString locale() const; |
23 | void setLocale(const QString &locale); |
24 | |
25 | QString text() const; |
26 | void setText(const QString text); |
27 | |
28 | enum Encoding { |
29 | Utf8, |
30 | Utf16 |
31 | }; |
32 | |
33 | Encoding encoding() const; |
34 | void setEncoding(Encoding encoding); |
35 | }; |
36 | |
37 | QT_END_NAMESPACE |
38 | |
39 | Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(QNdefNfcTextRecord, QNdefRecord::NfcRtd, "T") |
40 | |
41 | #endif // QNDEFNFCTEXTRECORD_H |
42 |