summaryrefslogtreecommitdiff
path: root/examples/bluetooth/pingpong/doc/src/pingpong.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/pingpong/doc/src/pingpong.qdoc')
-rw-r--r--examples/bluetooth/pingpong/doc/src/pingpong.qdoc58
1 files changed, 0 insertions, 58 deletions
diff --git a/examples/bluetooth/pingpong/doc/src/pingpong.qdoc b/examples/bluetooth/pingpong/doc/src/pingpong.qdoc
deleted file mode 100644
index a91b8f2e..00000000
--- a/examples/bluetooth/pingpong/doc/src/pingpong.qdoc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \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
- communicate via sockets.
-
- \image qmlpingpong_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. The server side starts a service named "PingPong server".
-
- \snippet pingpong/pingpong.cpp Starting the server
-
- On the client side, the full service discovery on the nearby Bluetooth devices is done.
-
- \snippet pingpong/pingpong.cpp Searching for the service
-
- When the ping pong service is discovered, the client connects to the server using the socket.
-
- \snippet pingpong/pingpong.cpp Connecting the socket
-
- On the server side, the connected signal is emitted initiating that the client is connected.
- The necessary signals and slots on the server side are connected.
-
- \snippet pingpong/pingpong.cpp Initiating server socket
-
- The game starts after the devices are connected and the screen is adjusted.
-
- \snippet pingpong/pingpong.cpp Start the game
-
- The server updates the ball direction and coordinates. The coordinates of pedals are sent
- to each other every 10ms.
-
- \snippet pingpong/pingpong.cpp Updating coordinates
-
- The coordinates are updated and exchanged via sockets. As presented, the server sends its
- pedal's y coordinate and the ball coordinates whereas, the client sends only its pedal
- y coordinate.
-
- \snippet pingpong/pingpong.cpp Checking the boundaries
-
- In the code above, it was shown how the server checks whether the ball has reached
- the boundaries of the board. In case of a collision with a pedal, a convex surface
- is simulated. The part of the velocity normal to the simulated surface is inverted
- and increased by 10% to speed up the game. In the case of the goal, the server updates
- the results via its socket.
-
- \image intro1.png
-
-*/