}
}
+ Button {
+ id: removeButton
+ anchors.top:parent.top
+ anchors.topMargin: 15
+ anchors.right: parent.right
+ text: "Unpair"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ request(btAPIpath + 'remove_device?value=' + btAddr.text, function (o) {
+ console.log(o.responseText)
+ })
+ btDeviceList.remove(findDevice(btAddr.text))
+ }
+ }
+
+ }
+
Button {
id: connectButton
anchors.top:parent.top
anchors.topMargin: 15
- anchors.right: parent.right
+ anchors.right: removeButton.left
anchors.rightMargin: 10
text:(btConnectstatus.text == "True")? "Disconnect":((btPairable.text == "True")? "Connect":"Pair")
}
}
}
- /*Image{
- id: removeDevice
- anchors.top:parent.top
- anchors.topMargin: 15
- anchors.right: parent.right
- anchors.rightMargin: 5
- width: 25
- height: 25
- source: "component/images/trash.png"
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- request(btAPIpath + 'remove_device?value=' + btAddr.text, function (o) {
- console.log(o.responseText)
- })
- btDeviceList.remove(findDevice(btAddr.text))
- }
- }
- }*/
}
}
connectButton.visible = false
passwordValidateButton.visible = true
- System.showKeyboard = visible
-
//passwordInputText.o
periodicRefresh.stop()
//passwordInputText = ""
var passkey = passwordInputText.text.valueOf()
console.log("Validating", passkey)
- System.showKeyboard = false
console.log("Passkey is", passkey)
request(wifiAPIpath + 'security?passkey=' + passkey,
passwordInputText.visible = false
connectButton.visible = true
- keyboard.currentString = ""
-
periodicRefresh.start()
}
}
width: connectButton.width
visible: false
- text: keyboard.currentString
+ text: "password"
+ /*hardcore until virtual keyboard works*/
}
}
}