main.qml Example File
custombarcodeinvoker/assets/main.qml
import bb.cascades 1.0
Page {
titleBar: TitleBar {
title: qsTr("Barcode Invoker")
appearance: TitleBarAppearance.Branded
}
Container {
layout: DockLayout {
}
background: Color.Black
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
bottomPadding: 20
layout: DockLayout {
}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
}
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
topPadding: 20
leftPadding: 20
bottomPadding: 20
layout: DockLayout {
}
Button {
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Top
text: qsTr("Scan Barcode")
onClicked: {
_barcodeInvoker.onInvokeButtonClicked()
}
}
Label {
horizontalAlignment: HorizontalAlignment.Left
verticalAlignment: VerticalAlignment.Bottom
text: qsTr("Barcode: %1").arg(_barcodeInvoker.barcode)
textStyle.color: Color.White
}
}
}
}