diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-03-17 13:53:40 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-03-23 06:22:37 +0000 |
commit | aa628198fa60b9b9009eee33b798237f7d50a1ef (patch) | |
tree | 217bcd19b58421b480e64d70d19dfc3c437d2a7a /tests/manual/examples/btscanner/device.ui | |
parent | 0854151515142b516d9aed0ac185af3bc4dc8355 (diff) |
BtScanner example: move to manual tests
The example mostly shows the usage of
QBluetooth{Device,Service}DiscoveryAgent classes, which is also
illustrated by other examples. Move it, because it's not fully
functional on mobile platforms (because it's widget based).
Do not remove it completely, because it might still be useful
for doing Classic device scan.
Also implement some improvements while on it:
* fix CMakeLists.txt by using qt_standard_project_setup() and PRIVATE
linking
* fix memory leak in DeviceDiscoveryDialog
* rework the code to use Qt parent-child model instead of manually
deleting objects where possible
* fix includes
* fix forward declarations
Task-number: QTBUG-111972
Change-Id: Ie4bc9e25ccdda6d5f5de2f57528df349c71cdc12
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 6168203d7c0e8e4df1908a62338b8abdd57855eb)
Diffstat (limited to 'tests/manual/examples/btscanner/device.ui')
-rw-r--r-- | tests/manual/examples/btscanner/device.ui | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/tests/manual/examples/btscanner/device.ui b/tests/manual/examples/btscanner/device.ui new file mode 100644 index 00000000..fd86a358 --- /dev/null +++ b/tests/manual/examples/btscanner/device.ui @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>DeviceDiscovery</class> + <widget class="QDialog" name="DeviceDiscovery"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>411</height> + </rect> + </property> + <property name="windowTitle"> + <string>Bluetooth Scanner</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QListWidget" name="list"/> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Local Device</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QCheckBox" name="power"> + <property name="text"> + <string>Bluetooth Powered On</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="discoverable"> + <property name="text"> + <string>Discoverable</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QPushButton" name="scan"> + <property name="text"> + <string>Scan</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="stopScan"> + <property name="text"> + <string>Stop scan</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="clear"> + <property name="text"> + <string>Clear</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="quit"> + <property name="text"> + <string>Quit</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>quit</sender> + <signal>clicked()</signal> + <receiver>DeviceDiscovery</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>323</x> + <y>275</y> + </hint> + <hint type="destinationlabel"> + <x>396</x> + <y>268</y> + </hint> + </hints> + </connection> + <connection> + <sender>clear</sender> + <signal>clicked()</signal> + <receiver>list</receiver> + <slot>clear()</slot> + <hints> + <hint type="sourcelabel"> + <x>188</x> + <y>276</y> + </hint> + <hint type="destinationlabel"> + <x>209</x> + <y>172</y> + </hint> + </hints> + </connection> + </connections> +</ui> |