EventViewer.qml Example File
calendar/assets/EventViewer.qml
import bb.cascades 1.0
Page {
id: root
titleBar: TitleBar {
title: qsTr ("Event Details")
}
Container {
layout: DockLayout {}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Top
leftPadding: 30
topPadding: 100
rightPadding: 30
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
title: qsTr ("subject")
value: _calendar.eventViewer.subject
}
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
topMargin: 50
title: qsTr ("location")
value: _calendar.eventViewer.location
}
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
topMargin: 50
title: qsTr ("start time")
value: _calendar.eventViewer.startTime
}
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
topMargin: 50
title: qsTr ("end time")
value: _calendar.eventViewer.endTime
}
}
}
actions: [
ActionItem {
title: qsTr ("Edit")
imageSource: "asset:///images/action_editevent.png"
onTriggered: {
_calendar.editEvent()
navigationPane.push(eventEditor.createObject())
}
},
DeleteActionItem {
onTriggered: {
_calendar.deleteEvent()
navigationPane.pop()
}
}
]
attachedObjects: [
ComponentDefinition {
id: eventEditor
source: "EventEditor.qml"
}
]
}