Doc: add landing page for Qt Bluetooth module

Move information from other topics to the landing page.

Change-Id: I550dd1e4467e0ec8d60218f25d36e3fa12554488
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@nokia.com>
Reviewed-by: Alex <ablasche@gmail.com>
This commit is contained in:
Leena Miettinen 2012-08-30 12:17:57 +02:00 committed by Qt by Nokia
parent 6801d35523
commit e62753f695
6 changed files with 113 additions and 114 deletions

View File

@ -30,9 +30,9 @@
/*!
\page bluetooth-cpp.html
\module QtBluetooth
\title Qt Bluetooth C++ API
\brief An API enabling basic Bluetooth operations like scanning for Devices
\brief An API enabling basic Bluetooth operations like scanning for devices
and connecting them.
\ingroup qtconnectivity
@ -41,54 +41,11 @@ and connecting them.
The Qt Bluetooth C++ API enables an application to scan for devices and connect and
interact with them in a more flexible way than the \l{Qt Bluetooth QML API}.
\tableofcontents
\section1 Getting Started
To include the Bluetooth classes, use the
include directive for the appropriate class. For example:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp include
The Qt Bluetooth C++ API is a Qt Add-On API and for thus wrapped in a namespace. To
make use of the namespace use:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp namespace
To link against the module, add this line to your \l qmake \c
.pro file:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.pro contacts project modification
\section1 Classes
\list
\annotatedlist connectivity-bluetooth
\endlist
\section1 Examples
The following sample applications show examples of API usage:
\table 80%
\header
\li Example
\li Description
\row
\li \l{btchat}{Bluetooth Chat}
\li A chat server and client using bluetooth.
\row
\li \l{bttennis}{Bluetooth Tennis}
\li The classic game of \l {http://en.wikipedia.org/wiki/Pong}{Pong}. Supports multiplayer
over Bluetooth and touch-to-play functionality on devices that support NFC.
\row
\li \l{btfiletransfer}{Bluetooth File Transfer}
\li Transfer files between Bluetooth devices.
\row
\li \l{btscanner}{Bluetooth Scanner}
\li Scan for Bluetooth devices.
\endtable
*/

View File

@ -0,0 +1,95 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** GNU Free Documentation License
** 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.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms
** and conditions contained in a signed written agreement between you
** and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qtbluetooth-index.html
\title Qt Bluetooth
\brief Qt Bluetooth enables connectivity between Bluetooth enabled devices.
Bluetooth is a short-range (less than 100 meters) wireless technology. It
has a reasonably high data transfer rate of 2.1 Mbit/s, which makes it ideal
for transfering data between devices.
Bluetooth connectivity is based on basic device management, such as scanning
for devices, gathering information about them, and exchaning data between
them.
\section1 Getting Started
To use the C++ library in your application, add the following configuration
option to your \c .pro file:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.pro contacts project modification
To use the classes of the module in your application you need the following
import statement in your \c .qml file:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.qml import
\section1 References
\table
\header
\li {1,4} Reference
\li {1,4} Guides
\li {4,1} Examples
\header
\li QML API examples
\li C++ API examples
\row
\li \l{Qt Bluetooth QML API}
\li \l{Qt Bluetooth Overview}
\li \l{btscanner}{QML Bluetooth Scanner}
A QML implementation of the Bluetooth device scanner.
\li \l{btscanner}{Bluetooth Scanner}
Scan for Bluetooth devices.
\row
\li \l{Qt Bluetooth C++ API}
\li \l{btchat}{Qt Bluetooth Tutorial}
A chat server and client using bluetooth.
\li \l{bttennis}{QML Bluetooth Tennis}
The tennis game using a QML interface to the Qt Bluetooth QML API.
It must connect to an instance of the C++ tennis game to play.
\li \l{bttennis}{Bluetooth Tennis}
The classic game of \l{http://en.wikipedia.org/wiki/Pong}{Pong}.
Supports multiplayer over Bluetooth and touch-to-play
functionality on devices that support NFC.
\row
\li
\li
\li
\li \l{btfiletransfer}{Bluetooth File Transfer}
Transfer files between Bluetooth devices.
\endtable
*/

View File

@ -27,39 +27,28 @@
/*!
\ingroup technology-apis
\title Qt Bluetooth Module
\page index-qtbluetooth-module.html
\title Qt Bluetooth Overview
\page qtbluetooth-overview.html
\brief The Qt Bluetooth API enables connectivity with other Bluetooth enabled devices.
\tableofcontents
\section1 Overview
Bluetooth is a short-range (less than 100 meters) wireless
technology. It has a reasonably high data transfer rate of 2.1 Mbit/s, which
makes it ideal for transfering data between devices.
Bluetooth connectivity is based on basic device management like scanning for
devices and gathering information about them. On top of that, there are a
number of profiles which enable a certain specified interaction type on
the Bluetooth connection.
With the Qt Bluetooth API typical use cases are:
\list
\li Retrieve information about the local Bluetooth device.
\li Scan for other Bluetooth devices in range and retrieve information about them.
\li Push files to remote devices using the Obex Object Push Profile (OPP).
\li Push files to remote devices using the OBEX Object Push Profile (OPP).
\li Connect to remote devices through a RFCOMM channel using the Serial Port Profile (SPP).
\li Create a RFCOMM server that allows incoming connections using SPP.
\endlist
The following sections describe how to use the Qt Bluetooth C++ API classes
for the above use cases.
The following documentation leads you through what
you can do, getting started, some simple examples and tutorials.
\section1 Retrieving Local Device Information
\section1 Getting Started
As shown in the above list, the Qt Bluetooth API has three main purposes. The first one is to
The Qt Bluetooth API has three main purposes. The first one is to
obtain local and remote device information. The first steps in retrieving device information is
to check if Bluetooth is available on the device and read the local device address and name. The
QBluetoothLocalDevice is the one to provide all of this information. Additionally you can use it
@ -67,6 +56,8 @@ the Bluetooth connection.
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp turningon
\section1 Scanning for Bluetooth Devices
Similar to the QBluetoothLocalDevice, the API offers QBluetoothDeviceInfo which provides
that information for remote devices. While you can just create QBluetoothDeviceInfo objects on
your own and fill them with data, the easier way is to use the QBluetoothDeviceDiscoveryAgent to
@ -74,6 +65,8 @@ the Bluetooth connection.
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp discovery
\section1 Pushing Files to Remote Devices
Once the desired device is found, there are two main use cases provided by Qt Bluetooth. The
simpler is to send files via the Obex Object Push Profile (OPP). As the name describes, this
profile can only push files from one device to another but not pull files or browse the remote
@ -84,6 +77,8 @@ the Bluetooth connection.
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp sendfile
\section1 Exchanging Data Between Devices
The more flexible approach to do communication between two Bluetooth enabled devices, is to
create a virtual serial port connection and freely exchange data over that connection. This can
be done by the Serial Port Profile (SPP). The Serial Port Profile emulates a serial connection
@ -106,25 +101,4 @@ the Bluetooth connection.
QBluetoothSocket classes. A good example to start with SPP is the \l{btchat}{Bluetooth Chat}
example.
To get started with adding the Qt Bluetooth API to your project, see the
\l{Qt Bluetooth Examples}{Examples} or check out the \l{Qt Bluetooth QML API}{QML} and
\l{Qt Bluetooth C++ API}{C++} API's with their "Getting started" sections.
\section2 QML API
There are a number of QML Types available in the Qt Bluetooth API.
\list
\li \l {Qt Bluetooth QML API}{Qt Bluetooth QML API}
\endlist
\section2 C++ API
The Qt Bluetooth C++ API requires gives a bit more flexibility on how
to interact with remote devices.
\list
\li \l {Qt Bluetooth C++ API} {Qt Bluetooth C++ API}.
\endlist
*/

View File

@ -31,7 +31,7 @@
\page bluetooth-qml.html
\title Qt Bluetooth QML API
\brief A QML API enabling basic Bluetooth operations like scanning for Devices
\brief A QML API enabling basic Bluetooth operations like scanning for devices
and connecting them.
\ingroup qtconnectivity
@ -44,38 +44,11 @@ plugins with the flexibility you need.
\tableofcontents
\section1 Getting Started
To import the Bluetooth types, use the following:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.qml import
After importing the Qt Bluetooth QML API you can use its types. This example shows how
to connect to a remote RFCOMM (SPP) server using BluetoothSocket:
\snippet ../doc/src/snippets/doc_src_qtbluetooth.qml service
\section1 QML Types
\list
\annotatedlist bluetooth-qml
\endlist
\section2 Examples
\table 80%
\header
\li Example
\li Description
\row
\li \l{bttennis}{QML Bluetooth Tennis}
\li The tennis game using a QML interface to the Qt Bluetooth QML API. It must connect to an
instance of the C++ \l{bttennis}{Bluetooth Tennis} game to play.
\row
\li \l{btscanner}{QML Bluetooth Scanner}
\li A QML implementation of the Bluetooth device scanner.
\endtable
*/

View File

@ -58,7 +58,7 @@ QTBLUETOOTH_BEGIN_NAMESPACE
\li and call start().
\endlist
\snippet ../doc/src/snippets/devicediscovery.cpp Device discovery
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp discovery
To retrieve results asynchronously, connect to the deviceDiscovered() signal. To get a list of
all discovered devices, call discoveredDevices() after the finished() signal.

View File

@ -60,7 +60,7 @@ QTBLUETOOTH_BEGIN_NAMESPACE
\li and call start().
\endlist
\snippet ../doc/src/snippets/servicediscovery.cpp Service discovery
\snippet ../doc/src/snippets/doc_src_qtbluetooth.cpp discovery
By default a minimal service discovery is performed. In this mode, the QBluetotohServiceInfo
objects returned are guaranteed to contain only device and service UUID information. Depending