Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QNdefNfcIconRecord Class Reference

The QNdefNfcIconRecord class provides an NFC MIME record to hold an icon. More...

#include <qndefnfcsmartposterrecord.h>

+ Inheritance diagram for QNdefNfcIconRecord:
+ Collaboration diagram for QNdefNfcIconRecord:

Public Member Functions

 Q_DECLARE_MIME_NDEF_RECORD (QNdefNfcIconRecord, QByteArray(0, char(0))) void setData(const QByteArray &data)
 
QByteArray data () const
 Returns the icon data as \l QByteArray.
 
- Public Member Functions inherited from QNdefRecord
 QNdefRecord ()
 Constructs a new empty NDEF record.
 
 ~QNdefRecord ()
 Destroys the NDEF record.
 
 QNdefRecord (const QNdefRecord &other)
 Constructs a new NDEF record that is a copy of other.
 
QNdefRecordoperator= (const QNdefRecord &other)
 Assigns this NDEF record to other.
 
void setTypeNameFormat (TypeNameFormat typeNameFormat)
 Sets the type name format of the NDEF record to typeNameFormat.
 
TypeNameFormat typeNameFormat () const
 Returns the type name format of the NDEF record.
 
void setType (const QByteArray &type)
 Sets the type of the NDEF record to type.
 
QByteArray type () const
 Returns the type of the NDEF record.
 
void setId (const QByteArray &id)
 Sets the id of the NDEF record to id.
 
QByteArray id () const
 Returns the id of the NDEF record.
 
void setPayload (const QByteArray &payload)
 Sets the payload of the NDEF record to payload.
 
QByteArray payload () const
 Returns the payload of the NDEF record.
 
bool isEmpty () const
 Returns true if the NDEF record contains an empty payload; otherwise returns false.
 
template<typename T >
bool isRecordType () const
 Returns true if the NDEF record is of the specified record type; otherwise returns false.
 
bool operator== (const QNdefRecord &other) const
 Returns true if other and this NDEF record are the same.
 
bool operator!= (const QNdefRecord &other) const
 Returns true if this NDEF record does not equal other; otherwise return false.
 
void clear ()
 

Additional Inherited Members

- Public Types inherited from QNdefRecord
enum  TypeNameFormat {
  Empty = 0x00 , NfcRtd = 0x01 , Mime = 0x02 , Uri = 0x03 ,
  ExternalRtd = 0x04 , Unknown = 0x05
}
 This enum describes the type name format of an NDEF record. More...
 
- Protected Member Functions inherited from QNdefRecord
 QNdefRecord (const QNdefRecord &other, TypeNameFormat typeNameFormat, const QByteArray &type)
 
 QNdefRecord (const QNdefRecord &other, TypeNameFormat typeNameFormat)
 
 QNdefRecord (TypeNameFormat typeNameFormat, const QByteArray &type)
 

Detailed Description

The QNdefNfcIconRecord class provides an NFC MIME record to hold an icon.

\inmodule QtNfc

Since
Qt 5.2

This class wraps the image data into an NDEF message. It provides an NDEF record of type \l QNdefRecord::Mime. The \l {QNdefRecord::}{payload}() contains the raw image data.

Definition at line 32 of file qndefnfcsmartposterrecord.h.

Member Function Documentation

◆ data()

QByteArray QNdefNfcIconRecord::data ( ) const

Returns the icon data as \l QByteArray.

Definition at line 744 of file qndefnfcsmartposterrecord.cpp.

References QNdefRecord::payload().

Referenced by QNdefNfcSmartPosterRecord::removeIcon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_DECLARE_MIME_NDEF_RECORD()

QNdefNfcIconRecord::Q_DECLARE_MIME_NDEF_RECORD ( QNdefNfcIconRecord ,
QByteArray(0, char(0))  ) const &

The documentation for this class was generated from the following files: