profile.qml Example File
bbmprofile/assets/profile.qml
import bb.cascades 1.0
NavigationPane {
id: navigationPane
onPopTransitionEnded: page.destroy()
Page {
actions: [
ActionItem {
title: qsTr("Update profile")
onTriggered: {
navigationPane.push(updateProfilePage.createObject())
}
}
]
BbmProfileScrollView {
Container {
layout: DockLayout {
}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background_blurred.png"
}
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
topPadding: 20
leftPadding: 20
rightPadding: 20
Container {
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
ImageView {
preferredHeight: 300
preferredWidth: 300
image: _profile.displayPicture
}
Button {
text: qsTr("Get Avatar")
onClicked: {
_profile.requestDisplayPicture()
}
}
}
Divider {
}
Container {
minHeight: 50
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
ImageView {
verticalAlignment: VerticalAlignment.Center
imageSource: "images/busy.png"
visible: _profile.busy
}
Label {
layoutProperties: StackLayoutProperties {
spaceQuota: 1
}
text: _profile.displayName
textStyle {
color: Color.White
fontWeight: FontWeight.Bold
}
}
}
Field {
title: qsTr("status message")
value: _profile.statusMessage
}
Field {
title: qsTr("personal message")
value: _profile.personalMessage
}
Field {
title: qsTr("pp id")
value: _profile.ppid
}
Field {
title: qsTr("app version")
value: _profile.appVersion
}
Field {
title: qsTr("handle")
value: _profile.handle
}
Field {
title: qsTr("platform version")
value: _profile.platformVersion
}
}
}
}
}
attachedObjects: [
ComponentDefinition {
id: updateProfilePage
source: "UpdateProfile.qml"
}
]
}