diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-05-08 09:51:40 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-05-08 09:51:40 +0200 |
commit | 94445dd4b9a6754a63736a05b9bccaaffc0a4038 (patch) | |
tree | fedeb79f2a583da4935fcd8fc5f70298812c056d /examples/bluetooth | |
parent | 74449f1b0b2952dcbad9525c167b36fbf908696f (diff) | |
parent | ef7de5da3d4d2346ec7110413c8fb12db8c94013 (diff) |
Merge branch 'stable' into dev
Conflicts:
.qmake.conf
src/bluetooth/qbluetoothlocaldevice_bluez.cpp
src/bluetooth/qbluetoothserver_p.h
src/bluetooth/qbluetoothsocket_qnx.cpp
Change-Id: I08792f10155f9b4e6af30066b70e24b48985ddd6
Diffstat (limited to 'examples/bluetooth')
7 files changed, 52 insertions, 24 deletions
diff --git a/examples/bluetooth/btchat/doc/src/btchat.qdoc b/examples/bluetooth/btchat/doc/src/btchat.qdoc index 77f73fd1..a78b9ede 100644 --- a/examples/bluetooth/btchat/doc/src/btchat.qdoc +++ b/examples/bluetooth/btchat/doc/src/btchat.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** 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 Qt local connectivty modules. @@ -28,8 +28,9 @@ /*! \example btchat \title Bluetooth Chat Example + \brief An example showing communication through Bluetooth. - The Bluetooth Chat example shows how to use the Qt Connectivity Bluetooth API to communicate + The Bluetooth Chat example shows how to use the \l{Qt Bluetooth} API to communicate with another application on a remote device using Bluetooth. \image btchat-example.png @@ -38,6 +39,8 @@ application always acts as both a server and a client eliminating the need to determine who should connect to whom. + \include examples-run.qdocinc + \section1 Chat Server The chat server is implemented by the ChatServer class. The ChatServer class is declared as: diff --git a/examples/bluetooth/btchat/remoteselector.cpp b/examples/bluetooth/btchat/remoteselector.cpp index e6fd728f..79dc0564 100644 --- a/examples/bluetooth/btchat/remoteselector.cpp +++ b/examples/bluetooth/btchat/remoteselector.cpp @@ -75,7 +75,7 @@ void RemoteSelector::startDiscovery(const QBluetoothUuid &uuid) ui->remoteDevices->clear(); m_discoveryAgent->setUuidFilter(uuid); - m_discoveryAgent->start(); + m_discoveryAgent->start(QBluetoothServiceDiscoveryAgent::FullDiscovery); } diff --git a/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc b/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc index aeeffffb..53832725 100644 --- a/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc +++ b/examples/bluetooth/btfiletransfer/doc/src/btfiletransfer.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** 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 Qt local connectivty modules. @@ -28,6 +28,7 @@ /*! \example btfiletransfer \title Bluetooth File Transfer Example + \brief An example showing the use of Bluetooth Object Push Profile (OPP). The Bluetooth File Transfer example is an application to transfer files via a bluetooth connection. This example does not work on Android due to @@ -35,4 +36,8 @@ \image btfiletransfer-example.png + \include examples-run.qdocinc + + \sa {Qt Bluetooth} + */ diff --git a/examples/bluetooth/btscanner/doc/src/btscanner.qdoc b/examples/bluetooth/btscanner/doc/src/btscanner.qdoc index e67b761a..e4d28ee2 100644 --- a/examples/bluetooth/btscanner/doc/src/btscanner.qdoc +++ b/examples/bluetooth/btscanner/doc/src/btscanner.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** 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 Qt local connectivty modules. @@ -28,9 +28,14 @@ /*! \example btscanner \title Bluetooth Scanner Example + \brief An example showing how to locate Bluetooth devices. - An example of how to locate Bluetooth devices. + An example showing how to locate Bluetooth devices. \image btscanner-example.png + \include examples-run.qdocinc + + \sa {Qt Bluetooth} + */ diff --git a/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc b/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc index 7a166121..3b0218d4 100644 --- a/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc +++ b/examples/bluetooth/picturetransfer/doc/src/picturetransfer.qdoc @@ -28,18 +28,20 @@ a/**************************************************************************** /*! \example picturetransfer \title QML Bluetooth Picture Push Example +\brief An example showing the use Bluetooth Object Push Profile (OPP). -The Bluetooth Picture Push example shows how to use the \l QBluetoothTransferManager -API. The example transfers a local image to a remote device. Unfortunately this example cannot be used on -Android as Qt does not support the Object Push Profile on this platform. +The Bluetooth Picture Push example shows how to use the \l +QBluetoothTransferManager API. The example transfers a local image to a remote +device. Unfortunately this example cannot be used on Android as Qt does not +support the Object Push Profile (OPP) on this platform. -On the first user interface page the application scans for remote Bluetooth devices. The user must select -the appropriate device to continue: +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::PicturesLocation}: +The next page presents a list of image files on the device. The files must be +located under \l QStandardPaths::PicturesLocation}: \image opp-example-2.png @@ -47,29 +49,35 @@ Once the picture was selected the UI shows the progress of the file transfer: \image opp-example-3.png +\include examples-run.qdocinc + +\sa {Qt Bluetooth} + \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. +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: +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 +\section1 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: +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 @@ -77,7 +85,7 @@ Once the file name has been set it triggers the file transfer: \snippet picturetransfer/bttransfer.qml Root-3 \snippet picturetransfer/bttransfer.qml Root-3 -\section1 The File Transfer +\section1 File Transfer The file transfer is implemented in C++: diff --git a/examples/bluetooth/pingpong/doc/src/pingpong.qdoc b/examples/bluetooth/pingpong/doc/src/pingpong.qdoc index df7fcc34..0e82a71a 100644 --- a/examples/bluetooth/pingpong/doc/src/pingpong.qdoc +++ b/examples/bluetooth/pingpong/doc/src/pingpong.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** 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 Qt Toolkit. @@ -28,6 +28,7 @@ /*! \example pingpong \title Bluetooth QML Ping Pong example + \brief A QML example showing Bluetooth communication. The Bluetooth QML Ping Pong example presents the socket communication between two Bluetooth devices. The basic concept is the ping pong game where two players @@ -35,6 +36,8 @@ \image intro.png + \include examples-run.qdocinc + At the beginning, the user selects the role. One device acts as a server and the second one as a client. After selecting the role, adjustments to the screen size are done (two devices might have different screen sizes). The server side starts a service named @@ -77,4 +80,3 @@ \image intro1.png */ - diff --git a/examples/bluetooth/scanner/doc/src/scanner.qdoc b/examples/bluetooth/scanner/doc/src/scanner.qdoc index 62b9680c..f4e292a8 100644 --- a/examples/bluetooth/scanner/doc/src/scanner.qdoc +++ b/examples/bluetooth/scanner/doc/src/scanner.qdoc @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Copyright (C) 2013 Aaron McCarthy <mccarthy.aaron@gmail.com> ** Contact: http://www.qt-project.org/legal ** @@ -28,6 +29,7 @@ /*! \example scanner \title QML Bluetooth Scanner Example +\brief A QML example about locating Bluetooth devices. This is an example on how to locate Bluetooth devices in QML. @@ -50,4 +52,7 @@ from local cache information and may not always be complete and accurate. The pr perform a minimal discovery are time constraints. A full service discovery can take up to two minutes. Note that not every platform supports a minimal discovery. In such cases the API performs a full discovery. +\include examples-run.qdocinc + +\sa {Qt Bluetooth} */ |