diff options
Diffstat (limited to 'examples/bluetooth/picturetransfer/doc')
-rw-r--r-- | examples/bluetooth/picturetransfer/doc/images/opp-example-1.png | bin | 0 -> 152761 bytes | |||
-rw-r--r-- | examples/bluetooth/picturetransfer/doc/images/opp-example-2.png | bin | 0 -> 155969 bytes | |||
-rw-r--r-- | examples/bluetooth/picturetransfer/doc/images/opp-example-3.png | bin | 0 -> 169273 bytes | |||
-rw-r--r-- | examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc | 91 |
4 files changed, 91 insertions, 0 deletions
diff --git a/examples/bluetooth/picturetransfer/doc/images/opp-example-1.png b/examples/bluetooth/picturetransfer/doc/images/opp-example-1.png Binary files differnew file mode 100644 index 00000000..0b33bc8a --- /dev/null +++ b/examples/bluetooth/picturetransfer/doc/images/opp-example-1.png diff --git a/examples/bluetooth/picturetransfer/doc/images/opp-example-2.png b/examples/bluetooth/picturetransfer/doc/images/opp-example-2.png Binary files differnew file mode 100644 index 00000000..d3d325d5 --- /dev/null +++ b/examples/bluetooth/picturetransfer/doc/images/opp-example-2.png diff --git a/examples/bluetooth/picturetransfer/doc/images/opp-example-3.png b/examples/bluetooth/picturetransfer/doc/images/opp-example-3.png Binary files differnew file mode 100644 index 00000000..cef9830c --- /dev/null +++ b/examples/bluetooth/picturetransfer/doc/images/opp-example-3.png diff --git a/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc b/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc new file mode 100644 index 00000000..fc2ffa32 --- /dev/null +++ b/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the QtBluetooth module. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\example picturetransfer +\title QML Bluetooth Picture Push Example + +The Bluetooth Picture Push example shows how to use the \l QBluetoothTransferManager +API. The example transfers a local image to a remote device. + +On the first user interface page the application scans for remote Bluetooth devices. The user must select +the appropriate device to continue: + +\image opp-example-1.png + +The next page presents a list of image files on the device. The files must be located under +\l QStandardPaths::PictureLocation}: + +\image opp-example-2.png + +Once the picture was selected the UI shows the progress of the file transfer: + +\image opp-example-3.png + +\section1 Device Discovery + +The device discovery uses the \l BluetoothDiscoveryModel to detect the remote devices. Each discovery is displayed +as an entry in a list. Once a device was selected the device address is stored in the \c root element. More +details about the \c root element will follow further below. + +\snippet picturetransfer/DeviceDiscovery.qml Discovery-1 +\snippet picturetransfer/DeviceDiscovery.qml Discovery-2 + +\section1 File Selection + +The file is selected with the help of \l FolderListModel. Once again the selected file is stored in the \c root +element: + +\snippet picturetransfer/PictureSelector.qml FileSelect-1 +\snippet picturetransfer/PictureSelector.qml FileSelect-2 +\snippet picturetransfer/PictureSelector.qml FileSelect-3 +\snippet picturetransfer/PictureSelector.qml FileSelect-4 + +\section1 The root element + +The already mentioned \c root element collects the necessary pieces of data for the picture transfer. +Once the file name has been set it triggers the file transfer: + + +\snippet picturetransfer/bttransfer.qml Root-1 +\snippet picturetransfer/bttransfer.qml Root-2 +\snippet picturetransfer/bttransfer.qml Root-3 +\snippet picturetransfer/bttransfer.qml Root-3 + +\section1 The File Transfer + +The file transfer is implemented in C++: + +\snippet picturetransfer/filetransfer.cpp Transfer-1 + +and exposed to QML via a context property: + +\snippet picturetransfer/main.cpp Transfer-2 + + + +*/ |