NoteViewer.qml Example File
notebook/assets/NoteViewer.qml
import bb.cascades 1.0
Page {
id: root
titleBar: TitleBar {
title: qsTr ("Note 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 ("title")
value: _noteBook.noteViewer.title
}
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
topMargin: 50
title: qsTr ("description")
value: _noteBook.noteViewer.description
}
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
topMargin: 50
title: qsTr ("due date")
value: _noteBook.noteViewer.dueDateTime
}
ViewerField {
horizontalAlignment: HorizontalAlignment.Fill
topMargin: 50
title: qsTr ("status")
value: _noteBook.noteViewer.status
}
}
}
actions: [
ActionItem {
title: qsTr ("Edit")
imageSource: "asset:///images/action_editnote.png"
onTriggered: {
_noteBook.editNote()
navigationPane.push(noteEditor.createObject())
}
},
DeleteActionItem {
onTriggered: {
_noteBook.deleteNote()
navigationPane.pop()
}
}
]
attachedObjects: [
ComponentDefinition {
id: noteEditor
source: "NoteEditor.qml"
}
]
}