Services.qml Example File
bluetoothgatt/assets/Services.qml
import bb.cascades 1.0
Page {
objectName: "ServicePage"
titleBar: TitleBar {
title: qsTr("Services (%1)").arg(_bluetoothGatt.activeDevice)
}
attachedObjects: [
ComponentDefinition {
id: characteristicsPage
source: "Characteristics.qml"
}
]
Container {
ListView {
dataModel: _bluetoothGatt.servicesModel
onTriggered: {
if (indexPath.length > 0) {
_bluetoothGatt.viewCharacteristics(indexPath[0]);
navigationPane.push(characteristicsPage.createObject())
}
}
listItemComponents: [
ListItemComponent {
type: "item"
Container {
topPadding: 10
leftPadding: 10
rightPadding: 10
Label {
text: ListItemData.uuid
}
Label {
text: ListItemData.name
}
Divider {
}
}
}
]
}
}
}