En esta página

QNdefNfcSmartPosterRecord Class

La clase QNdefNfcSmartPosterRecord proporciona un RTD-SmartPoster NFC. Más...

Cabecera: #include <QNdefNfcSmartPosterRecord>
CMake: find_package(Qt6 REQUIRED COMPONENTS Nfc)
target_link_libraries(mytarget PRIVATE Qt6::Nfc)
qmake: QT += nfc
Desde: Qt 5.2
Hereda: QNdefRecord

Tipos Públicos

enum Action { UnspecifiedAction, DoAction, SaveAction, EditAction }

Funciones Públicas

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)

Descripción Detallada

RTD-SmartPoster encapsula un Smart Poster.

Documentación de los tipos de miembros

enum QNdefNfcSmartPosterRecord::Action

Este enum describe el curso de acción que un dispositivo debe tomar con el contenido.

ConstanteValorDescripción
QNdefNfcSmartPosterRecord::UnspecifiedAction-1La acción no está definida.
QNdefNfcSmartPosterRecord::DoAction0Realizar la acción (enviar el SMS, iniciar el navegador, realizar la llamada telefónica).
QNdefNfcSmartPosterRecord::SaveAction1Guardar para más tarde (guardar el SMS en INBOX, poner el URI en un marcador, guardar el número de teléfono en contactos).
QNdefNfcSmartPosterRecord::EditAction2Abrir para editar (abrir un SMS en el editor de SMS, abrir el URI en un editor de URI, abrir el número de teléfono para editarlo).

Documentación de las funciones

QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord()

Construye un nuevo cartel inteligente vacío.

QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord(const QNdefRecord &other)

Construye un nuevo cartel inteligente que es una copia de other.

QNdefNfcSmartPosterRecord::QNdefNfcSmartPosterRecord(const QNdefNfcSmartPosterRecord &other)

Construye un nuevo cartel inteligente que es una copia de other.

[noexcept] QNdefNfcSmartPosterRecord::~QNdefNfcSmartPosterRecord()

Destruye el cartel inteligente.

QNdefNfcSmartPosterRecord::Action QNdefNfcSmartPosterRecord::action() const

Devuelve la acción del registro de acciones si está disponible. En caso contrario, devuelve UnspecifiedAction.

Véase también setAction().

void QNdefNfcSmartPosterRecord::addIcon(const QNdefNfcIconRecord &icon)

Añade un registro de icono icon al póster inteligente. Si el póster inteligente ya contiene un registro de iconos del mismo tipo, se sustituye el registro de iconos existente.

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

Añade un registro de icono con el tipo type y los datos data al póster inteligente. Si el póster inteligente ya contiene un registro de icono con el mismo tipo, se sustituye el registro de icono existente.

bool QNdefNfcSmartPosterRecord::addTitle(const QNdefNfcTextRecord &text)

Intenta añadir un registro de título text al póster inteligente. Si el póster inteligente no contiene ya un registro de título con la misma configuración regional que el registro de título text, entonces se añade el registro de título y la función devuelve true. En caso contrario, se devuelve false.

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

Intenta añadir un nuevo registro de título con el título text, la configuración regional locale y la codificación encoding. Si el póster inteligente no contiene ya un registro de título con la configuración regional locale, se añade el registro de título y la función devuelve true. En caso contrario, se devuelve false.

bool QNdefNfcSmartPosterRecord::hasAction() const

Devuelve true si el cartel inteligente contiene un registro de acción, en caso contrario devuelve false.

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

Devuelve true si el póster inteligente contiene un registro de iconos del tipo mimetype. Si mimetype está vacío, se devuelve true si el póster inteligente contiene al menos un registro de icono. En todos los demás casos, se devuelve false.

bool QNdefNfcSmartPosterRecord::hasSize() const

Devuelve true si el cartel inteligente contiene un registro de tamaño, en caso contrario devuelve false.

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

Devuelve true si el póster inteligente contiene un registro de título que utilice la configuración regional locale. Si locale está vacío, se devuelve true si el póster inteligente contiene al menos un registro de título. En los demás casos, se devuelve false.

bool QNdefNfcSmartPosterRecord::hasTypeInfo() const

Devuelve true si el cartel inteligente contiene un registro de tipo, en caso contrario devuelve false.

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

Devuelve los datos del registro del icono asociado si el póster inteligente contiene un registro de icono con tipo MIME mimetype. Si mimetype se omite o está vacío, se devuelven los datos del registro del primer icono. En todos los demás casos, se devuelve una matriz vacía.

qsizetype QNdefNfcSmartPosterRecord::iconCount() const

Devuelve el número de registros de iconos que contiene el póster inteligente.

QNdefNfcIconRecord QNdefNfcSmartPosterRecord::iconRecord(qsizetype index) const

Devuelve el registro de iconos correspondiente al índice index dentro del póster inteligente, donde index es un valor comprendido entre 0 y iconCount() - 1. Los valores fuera de este rango devuelven un registro vacío.

QList<QNdefNfcIconRecord> QNdefNfcSmartPosterRecord::iconRecords() const

Devuelve una copia de todos los registros de iconos dentro del póster inteligente.

bool QNdefNfcSmartPosterRecord::removeIcon(const QByteArray &type)

Intenta eliminar el registro de icono con el tipo type del póster inteligente. Elimina el registro y devuelve true si el póster inteligente contiene un registro coincidente; de lo contrario, devuelve false.

bool QNdefNfcSmartPosterRecord::removeIcon(const QNdefNfcIconRecord &icon)

Intenta eliminar el registro de icono icon del póster inteligente. Elimina el registro y devuelve true si el póster inteligente contiene un registro coincidente; de lo contrario, devuelve false.

bool QNdefNfcSmartPosterRecord::removeTitle(const QNdefNfcTextRecord &text)

Intenta eliminar el registro de título text del cartel inteligente. Elimina el registro y devuelve true si el póster inteligente contiene un registro coincidente; de lo contrario, devuelve false.

bool QNdefNfcSmartPosterRecord::removeTitle(const QString &locale)

Intenta eliminar un registro de título con la configuración regional locale del póster inteligente. Elimina el registro y devuelve true si el póster inteligente contiene un registro coincidente; de lo contrario, devuelve false.

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

Establece el registro de acciones en act

Véase también action().

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

Añade la lista de registros de iconos icons al póster inteligente. Los registros existentes se sobrescriben.

Véase también hasIcon() y icon().

void QNdefNfcSmartPosterRecord::setSize(quint32 size)

Establece el registro size. El valor contiene el tamaño en bytes del objeto al que se refiere el URI.

Véase también size() y hasSize().

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

Añade la lista de registros de títulos titles al póster inteligente. Los registros existentes se sobrescriben.

void QNdefNfcSmartPosterRecord::setTypeInfo(const QString &type)

Establece el registro de tipo en type. type describe el tipo del objeto referenciado por uri().

Véase también typeInfo().

void QNdefNfcSmartPosterRecord::setUri(const QNdefNfcUriRecord &url)

Establece el registro URI en url

Véase también uri().

void QNdefNfcSmartPosterRecord::setUri(const QUrl &url)

Construye un registro URI y establece su contenido dentro del cartel inteligente en url

quint32 QNdefNfcSmartPosterRecord::size() const

Devuelve el tamaño del registro de tamaño si está disponible; en caso contrario devuelve 0.

El valor es opcional y contiene el tamaño en bytes del objeto al que hace referencia el URI. Puede ser utilizado por el dispositivo para determinar si puede alojar el objeto.

Véase también setSize().

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

Devuelve el texto del registro de título asociado a la configuración regional locale si está disponible. Si locale está vacío, se devuelve el texto del título del primer registro disponible. En todos los demás casos se devuelve una cadena vacía.

qsizetype QNdefNfcSmartPosterRecord::titleCount() const

Devuelve el número de registros de títulos que contiene el póster inteligente.

QNdefNfcTextRecord QNdefNfcSmartPosterRecord::titleRecord(qsizetype index) const

Devuelve el registro de título correspondiente al índice index dentro del póster inteligente, donde index es un valor comprendido entre 0 y titleCount() - 1. Los valores fuera de este rango devuelven un registro vacío.

QList<QNdefNfcTextRecord> QNdefNfcSmartPosterRecord::titleRecords() const

Devuelve una copia de todos los registros de títulos dentro del cartel inteligente.

QString QNdefNfcSmartPosterRecord::typeInfo() const

Devuelve el tipo MIME que describe el tipo de los objetos a los que se puede acceder a través de uri().

Si no se conoce el tipo, el QString devuelto está vacío.

Véase también setTypeInfo() y hasTypeInfo().

QUrl QNdefNfcSmartPosterRecord::uri() const

Devuelve el URI del registro URI del cartel inteligente, si se ha establecido. En caso contrario, devuelve un URI vacío.

Véase también setUri().

QNdefNfcUriRecord QNdefNfcSmartPosterRecord::uriRecord() const

Devuelve el registro URI del cartel inteligente si está establecido. En caso contrario, devuelve un URI vacío.

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

Asigna el registro del cartel inteligente other a este registro y devuelve una referencia a este registro.

© 2026 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.