2023-11-30 18:28:55 +00:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
2022-05-13 13:12:05 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2020-03-26 16:01:51 +00:00
|
|
|
import QtQuick
|
2023-05-11 02:27:08 +00:00
|
|
|
import WearableStyle
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
ListHeaderItem {
|
|
|
|
id: routeListItem
|
|
|
|
required property string icon
|
|
|
|
required property string shortInfo
|
|
|
|
required property string instruction
|
|
|
|
required property string distance
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
Item {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
height: 28
|
2016-12-17 03:20:45 +00:00
|
|
|
|
|
|
|
Image {
|
2023-11-30 18:28:55 +00:00
|
|
|
id: naviIcon
|
2016-12-17 03:20:45 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2023-11-30 18:28:55 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.margins: 5
|
|
|
|
height: 20
|
|
|
|
width: height
|
|
|
|
source: UIStyle.iconPath(routeListItem.icon)
|
2016-12-17 03:20:45 +00:00
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
}
|
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
Text {
|
2016-12-17 03:20:45 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2023-11-30 18:28:55 +00:00
|
|
|
anchors.left: naviIcon.right
|
|
|
|
anchors.margins: 5
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: routeListItem.shortInfo
|
|
|
|
font: UIStyle.h3
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
padding: 1
|
|
|
|
color: UIStyle.textColor
|
|
|
|
}
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
Text {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.margins: 10
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: routeListItem.distance
|
|
|
|
font: UIStyle.h3
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
padding: 1
|
|
|
|
color: UIStyle.textColor
|
2016-12-17 03:20:45 +00:00
|
|
|
}
|
|
|
|
}
|
2023-11-30 18:28:55 +00:00
|
|
|
|
|
|
|
Text {
|
|
|
|
id: instructionText
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 5
|
|
|
|
anchors.topMargin: 25
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: routeListItem.instruction
|
|
|
|
font: UIStyle.p1
|
|
|
|
lineHeight: UIStyle.p1lineHeight
|
|
|
|
lineHeightMode: Text.FixedHeight
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
padding: 1
|
|
|
|
color: UIStyle.textColor
|
|
|
|
}
|
2016-12-17 03:20:45 +00:00
|
|
|
}
|