QML UI: Add helper function to get weights

Helper function that retrieved the total weight for a dive to be displayed
on the DiveDetials page.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Joakim Bygdell 2016-01-25 18:44:52 +01:00 committed by Dirk Hohndel
parent 19588ce139
commit e0725966b1
3 changed files with 22 additions and 1 deletions

View file

@ -13,6 +13,7 @@ Item {
id: detailsView
property int labelWidth: MobileComponents.Units.gridUnit * 10
property string cylinder: manager.getCylinder(dive.id)
property string weight: manager.getWeights(dive.id)
width: parent.width
height: mainLayout.implicitHeight + MobileComponents.Units.iconSizes.large
Rectangle {
@ -171,7 +172,6 @@ Item {
MobileComponents.Label {
id: txtWeight
text: weight
Layout.fillWidth: true
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
Layout.alignment: Qt.AlignRight
}