QNdefNfcSmartPosterRecord Class

QNdefNfcSmartPosterRecordクラスは、NFC RTD-SmartPosterを提供します。詳細...

ヘッダー #include <QNdefNfcSmartPosterRecord>
CMake: find_package(Qt6 REQUIRED COMPONENTS Nfc)
target_link_libraries(mytarget PRIVATE Qt6::Nfc)
qmake: QT += nfc
以来:Qt 5.2
継承: QNdefRecord

パブリックな型

enum Action { UnspecifiedAction, DoAction, SaveAction, EditAction }

パブリック関数

QNdefNfcSmartPosterRecord()
QNdefNfcSmartPosterRecord(const QNdefRecord &other)
QNdefNfcSmartPosterRecord(const QNdefNfcSmartPosterRecord &other)
~QNdefNfcSmartPosterRecord()
QNdefNfcSmartPosterRecord::Action action() const
void addIcon(const QNdefNfcIconRecord &icon)
void addIcon(const QByteArray &type, const QByteArray &data)
bool addTitle(const QNdefNfcTextRecord &text)
bool addTitle(const QString &text, const QString &locale, QNdefNfcTextRecord::Encoding encoding)
bool hasAction() const
bool hasIcon(const QByteArray &mimetype = QByteArray()) const
bool hasSize() const
bool hasTitle(const QString &locale = QString()) const
bool hasTypeInfo() const
QByteArray icon(const QByteArray &mimetype = QByteArray()) const
qsizetype iconCount() const
QNdefNfcIconRecord iconRecord(qsizetype index) const
QList<QNdefNfcIconRecord> iconRecords() const
bool removeIcon(const QByteArray &type)
bool removeIcon(const QNdefNfcIconRecord &icon)
bool removeTitle(const QNdefNfcTextRecord &text)
bool removeTitle(const QString &locale)
void setAction(QNdefNfcSmartPosterRecord::Action act)
void setIcons(const QList<QNdefNfcIconRecord> &icons)
void setSize(quint32 size)
void setTitles(const QList<QNdefNfcTextRecord> &titles)
void setTypeInfo(const QString &type)
void setUri(const QNdefNfcUriRecord &url)
void setUri(const QUrl &url)
quint32 size() const
QString title(const QString &locale = QString()) const
qsizetype titleCount() const
QNdefNfcTextRecord titleRecord(qsizetype index) const
QList<QNdefNfcTextRecord> titleRecords() const
QString typeInfo() const
QUrl uri() const
QNdefNfcUriRecord uriRecord() const
QNdefNfcSmartPosterRecord &operator=(const QNdefNfcSmartPosterRecord &other)

詳細説明

RTD-SmartPosterは、スマートポスターをカプセル化します。

メンバ型ドキュメント

enum QNdefNfcSmartPosterRecord::Action

この列挙型は、デバイスがコンテンツに対して取るべきアクションを記述します。

定数説明
QNdefNfcSmartPosterRecord::UnspecifiedAction-1アクションは定義されていません。
QNdefNfcSmartPosterRecord::DoAction0アクションを実行する(SMSを送信する、ブラウザを起動する、電話をかける)。
QNdefNfcSmartPosterRecord::SaveAction1保存する(SMSをINBOXに保存、URIをブックマークに保存、電話番号を連絡先に保存)
QNdefNfcSmartPosterRecord::EditAction2編集用に開く(SMSエディタでSMSを開く、URIエディタでURIを開く、編集用に電話番号を開く)。

メンバー関数ドキュメント

QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord()

新しい空のスマート・ポスターを構築します。

QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord(const QNdefRecord &other)

other のコピーである新しいスマートポスターを構築する。

QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord(const QNdefNfcSmartPosterRecord &other)

other のコピーである新しいスマートポスターを構築する。

[noexcept] QNdefNfcSmartPosterRecord::~QNdefNfcSmartPosterRecord()

スマートポスターを破壊する。

QNdefNfcSmartPosterRecord::Action QNdefNfcSmartPosterRecord::action() const

アクションレコードからアクションを返します。そうでない場合はUnspecifiedAction を返します。

setAction()も参照

void QNdefNfcSmartPosterRecord::addIcon(const QNdefNfcIconRecord &icon)

スマートポスターにアイコンレコードicon を追加します。スマートポスターに同じ種類のアイコンレコードが既に含まれている場合、既存のアイコンレコードが置き換えられます。

void QNdefNfcSmartPosterRecord::addIcon(const QByteArray &type, const QByteArray &data)

タイプtype とデータdata を持つアイコンレコードをスマートポスターに追加します。スマートポスターに同じタイプのアイコンレコードが既に含まれている場合、既存のアイコンレコードが置き換えられます。

bool QNdefNfcSmartPosterRecord::addTitle(const QNdefNfcTextRecord &text)

タイトルレコードtext をスマートポスターに追加しようとする。スマートポスターにタイトルレコードtext と同じロケールのタイトルレコードがまだ含まれていない場合、タイトルレコードが追加され、関数はtrue を返します。そうでない場合はfalse が返されます。

bool QNdefNfcSmartPosterRecord::addTitle(const QString &text, const QString &locale, QNdefNfcTextRecord::Encoding encoding)

タイトルtext 、ロケールlocale 、エンコーディングencoding を持つ新しいタイトルレコードの追加を試みます。スマートポスターにロケールlocale を持つタイトルレコードがまだ含まれていない場合、タイトルレコードが追加され、関数はtrue を返します。そうでない場合は、false が返されます。

bool QNdefNfcSmartPosterRecord::hasAction() const

スマートポスターがアクションレコードを含む場合はtrue を返し、そうでない場合はfalse を返す。

bool QNdefNfcSmartPosterRecord::hasIcon(const QByteArray &mimetype = QByteArray()) const

スマートポスターがmimetype 型を使用するアイコンレコードを含む場合、true を返します。mimetype が空の場合、スマートポスターに少なくとも1つのアイコンレコードが含まれていれば、true が返されます。その他の場合はすべて、false が返されます。

bool QNdefNfcSmartPosterRecord::hasSize() const

スマートポスターがサイズレコードを含む場合はtrue を返し、そうでない場合はfalse を返す。

bool QNdefNfcSmartPosterRecord::hasTitle(const QString &locale = QString()) const

スマートポスターがロケールlocale を使用するタイトルレコードを含む場合、true を返します。locale が空の場合、スマートポスターに少なくとも1つのタイトルレコードが含まれていれば、true が返されます。それ以外の場合、false が返されます。

bool QNdefNfcSmartPosterRecord::hasTypeInfo() const

スマートポスターがタイプレコードを含む場合はtrue を返し、そうでない場合はfalse を返す。

QByteArray QNdefNfcSmartPosterRecord::icon(const QByteArray &mimetype = QByteArray()) const

スマートポスターがMIMEタイプmimetype のアイコンレコードを含む場合、関連するアイコンレコードデータを返します。mimetype が省略されるか空の場合、最初のアイコンのレコード・データが返されます。それ以外の場合は、空の配列が返されます。

qsizetype QNdefNfcSmartPosterRecord::iconCount() const

スマートポスター内に含まれるアイコンレコードの数を返します。

QNdefNfcIconRecord QNdefNfcSmartPosterRecord::iconRecord(qsizetype index) const

スマートポスター内のインデックスindex に対応するアイコンレコードを返します。index は 0 からiconCount() - 1 までの値です。この範囲外の値は空のレコードを返します。

QList<QNdefNfcIconRecord> QNdefNfcSmartPosterRecord::iconRecords() const

スマートポスター内のすべてのアイコンレコードのコピーを返します。

bool QNdefNfcSmartPosterRecord::removeIcon(const QByteArray &type)

スマートポスターから型type を持つアイコンレコードの削除を試みます。レコードを削除し、スマートポスターに一致するレコードがある場合はtrue を返し、そうでない場合はfalse を返します。

bool QNdefNfcSmartPosterRecord::removeIcon(const QNdefNfcIconRecord &icon)

スマートポスターからアイコンレコードicon を削除しようとします。レコードを削除し、スマートポスターに一致するレコードがあればtrue を返し、そうでなければfalse を返します。

bool QNdefNfcSmartPosterRecord::removeTitle(const QNdefNfcTextRecord &text)

スマートポスターからタイトルレコードtext を削除しようとします。レコードを削除し、スマートポスターに一致するレコードがあればtrue を返し、そうでなければfalse を返します。

bool QNdefNfcSmartPosterRecord::removeTitle(const QString &locale)

スマートポスターからlocale のロケールを持つタイトルレコードを削除しようとします。レコードを削除し、スマートポスターに一致するレコードがある場合はtrue を返し、そうでない場合はfalse を返します。

void QNdefNfcSmartPosterRecord::setAction(QNdefNfcSmartPosterRecord::Action act)

にアクションレコードを設定する。act

action()も参照

void QNdefNfcSmartPosterRecord::setIcons(const QList<QNdefNfcIconRecord> &icons)

アイコン記録リストicons をスマートポスターに追加します。既存のレコードは上書きされます。

hasIcon() およびicon()も参照してください

void QNdefNfcSmartPosterRecord::setSize(quint32 size)

レコードを設定するsize 。値には、URIが参照するオブジェクトのバイト単位のサイズが含まれる。

size() およびhasSize()も参照

void QNdefNfcSmartPosterRecord::setTitles(const QList<QNdefNfcTextRecord> &titles)

タイトル記録リストtitles をスマートポスターに追加します。既存のレコードはすべて上書きされます。

void QNdefNfcSmartPosterRecord::setTypeInfo(const QString &type)

型レコードをtype に設定する。type には、uri() で参照されるオブジェクトの型が記述されている。

typeInfo()も参照のこと

void QNdefNfcSmartPosterRecord::setUri(const QNdefNfcUriRecord &url)

にURIレコードを設定する。url

uri()も参照

void QNdefNfcSmartPosterRecord::setUri(const QUrl &url)

URIレコードを構築し、スマートポスター内のコンテンツをurl

quint32 QNdefNfcSmartPosterRecord::size() const

sizeレコードがあればそのサイズを返し、なければ0を返す。

値はオプションで、URIが参照するオブジェクトのサイズをバイト単位で含む。この値は、デバイスがオブジェクトを収容できるかどうかを判断するために使用されるかもしれない。

setSize()も参照

QString QNdefNfcSmartPosterRecord::title(const QString &locale = QString()) const

ロケールlocale に関連付けられたタイトルレコードテキストを返します。locale が空の場合は、利用可能な最初のレコードのタイトルテキストを返します。それ以外の場合は、空の文字列が返されます。

qsizetype QNdefNfcSmartPosterRecord::titleCount() const

スマートポスター内に含まれるタイトルレコードの数を返します。

QNdefNfcTextRecord QNdefNfcSmartPosterRecord::titleRecord(qsizetype index) const

スマートポスター内のインデックスindex に対応するタイトルレコードを返します。index は 0 からtitleCount() - 1 までの値です。この範囲外の値は空のレコードを返します。

QList<QNdefNfcTextRecord> QNdefNfcSmartPosterRecord::titleRecords() const

スマートポスター内のすべてのタイトルレコードのコピーを返します。

QString QNdefNfcSmartPosterRecord::typeInfo() const

uri() を介して到達可能なオブジェクトの型を表す MIME 型を返す。

型がわからない場合、返されるQString は空です。

setTypeInfo() およびhasTypeInfo()も参照

QUrl QNdefNfcSmartPosterRecord::uri() const

設定されている場合、スマート・ポスターのURIレコードのURIを返します。そうでない場合は空の URI を返します。

setUri()も参照してください

QNdefNfcUriRecord QNdefNfcSmartPosterRecord::uriRecord() const

設定されていれば、スマートポスターのURIレコードを返します。そうでなければ空のURIが返されます。

QNdefNfcSmartPosterRecord &QNdefNfcSmartPosterRecord::operator=(const QNdefNfcSmartPosterRecord &other)

other スマートポスターレコードをこのレコードに割り当て、このレコードへの参照を返します。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.