From 5e8994a4fa83f4c2795978f8b9ae893cefc69160 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Thu, 2 Jun 2016 13:56:50 +0200 Subject: Make it more obvious what tags the NFC poster example expects. Task-number: QTBUG-53616 Change-Id: Ie3a87abc61100ac8fe0a5b671725f54ae28e1501 Reviewed-by: Martin Smith Reviewed-by: Leena Miettinen --- .../nfc/poster/doc/images/qml-poster-example.png | Bin 5110 -> 7946 bytes examples/nfc/poster/doc/src/poster.qdoc | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'examples/nfc/poster/doc') diff --git a/examples/nfc/poster/doc/images/qml-poster-example.png b/examples/nfc/poster/doc/images/qml-poster-example.png index d3ead72e..8ed2292c 100644 Binary files a/examples/nfc/poster/doc/images/qml-poster-example.png and b/examples/nfc/poster/doc/images/qml-poster-example.png differ diff --git a/examples/nfc/poster/doc/src/poster.qdoc b/examples/nfc/poster/doc/src/poster.qdoc index a569f47a..26320f56 100644 --- a/examples/nfc/poster/doc/src/poster.qdoc +++ b/examples/nfc/poster/doc/src/poster.qdoc @@ -31,7 +31,7 @@ \brief A QML example about reading and displaying NFC Data Exchange Format (NDEF) messages. The QML Poster example displays the contents of specifically formatted NFC Data -Exchange Format (NDEF) messages read from an NFC Tag. The NDEF message should +Exchange Format (NDEF) messages read from an NFC Tag. The NDEF message must contain a URI record, an optional \c image/* MIME record, and one or more localized Text records. @@ -39,5 +39,24 @@ localized Text records. \include examples-run.qdocinc +\section1 Applying NDEF Filters + +The example is designed to display the content of a very specific type of NFC tag. +The tag must contain at least one URI record and one text record. If those two +record types do not exist, nothing will happen. Such filtering is applied via the +\l NearField type's filter property. The property accepts a list of \l NdefFilter objects. + +\snippet poster/poster.qml QML NDEF filtering + +\section1 Processing Found NDEF Messages + +Once an appropriate tag is found, the \l NearField::messageRecords property reflects the content. +It transports the list of found NDEF records. The QML snippet below +demonstrates how these records can be accessed: + +\snippet poster/poster.qml messageRecordsChanged 1 +\snippet poster/poster.qml messageRecordsChanged 2 +\snippet poster/poster.qml messageRecordsChanged 3 + \sa {Qt NFC} */ -- cgit v1.2.3