SearchBoundingCircle.qml Example File
places/forms/SearchBoundingCircle.qml
import QtQuick 2.5
import QtPositioning 5.5
SearchBoundingCircleForm {
property variant searchRegion
signal changeSearchBoundingCircle(variant coordinate, real radius)
signal closeForm()
goButton.onClicked: {
var coordinate = QtPositioning.coordinate(parseFloat(latitude.text),
parseFloat(longitude.text));
if (coordinate.isValid)
changeSearchBoundingCircle(coordinate,parseFloat(radius.text))
}
clearButton.onClicked: {
latitude.text = ""
longitude.text = ""
radius.text = ""
}
cancelButton.onClicked: closeForm()
Component.onCompleted: {
latitude.text = "" + searchRegion.center.latitude
longitude.text = "" + searchRegion.center.longitude
radius.text = searchRegion.radius ? "" + searchRegion.radius : "0.0"
}
}