add available devices and fix formatting/icons
This commit is contained in:
parent
622604ad08
commit
0bbb032823
6 changed files with 105 additions and 34 deletions
|
|
@ -23,14 +23,28 @@ StyledPopupWindow {
|
|||
radius: 8
|
||||
Layout.fillWidth: true
|
||||
RowLayout {
|
||||
StyledText {
|
||||
text: "Bluetooth"
|
||||
RowLayout {
|
||||
StyledText {
|
||||
text: "Enabled"
|
||||
}
|
||||
|
||||
Switch {
|
||||
checked: Bluetooth.defaultAdapter.enabled
|
||||
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
||||
}
|
||||
}
|
||||
|
||||
Switch {
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
checked: Bluetooth.defaultAdapter.enabled
|
||||
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
||||
StyledText {
|
||||
text: "Scan"
|
||||
}
|
||||
|
||||
Switch {
|
||||
checked: Bluetooth.defaultAdapter.discovering
|
||||
onClicked: Bluetooth.defaultAdapter.discovering = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -76,10 +90,12 @@ StyledPopupWindow {
|
|||
text: "Available Devices"
|
||||
}
|
||||
|
||||
DeviceList {
|
||||
devices: Bluetooth.availableDevices
|
||||
onDeviceActivated: device => {
|
||||
device.pair();
|
||||
ColumnLayout {
|
||||
Repeater {
|
||||
model: Bluetooth.availableDevices
|
||||
delegate: AvailableDevice {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue