2
* Copyright (C) 2015 Canonical Ltd
4
* This file is part of Ubuntu Clock App
6
* Ubuntu Clock App is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 3 as
8
* published by the Free Software Foundation.
10
* Ubuntu Clock App is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
import QtQuick.Layouts 1.1
21
import Ubuntu.Components 1.2
38
verticalCenter: parent.verticalCenter
43
// #TRANSLATORS: This refers to the stopwatch lap and is shown as a header where space is limited. Constrain
44
// translation length to a few characters.
46
width: parent.width / 7
47
elide: Text.ElideRight
48
font.weight: Font.DemiBold
49
horizontalAlignment: Text.AlignHCenter
53
width: 3 * parent.width / 7
54
elide: Text.ElideRight
55
text: i18n.tr("Lap Time")
56
font.weight: Font.DemiBold
57
horizontalAlignment: Text.AlignHCenter
61
width: 3 * parent.width / 7
62
elide: Text.ElideRight
63
text: i18n.tr("Total Time")
64
font.weight: Font.DemiBold
65
horizontalAlignment: Text.AlignHCenter
70
displaced: Transition {
71
UbuntuNumberAnimation {
73
duration: UbuntuAnimation.BriskDuration
79
leadingActions: ListItemActions {
84
lapHistory.removeLap(index)
94
verticalCenter: parent.verticalCenter
99
color: UbuntuColors.midAubergine
100
text: "#%1".arg(Number(count - index).toLocaleString(Qt.locale(), "f", 0))
101
width: parent.width / 7
102
horizontalAlignment: Text.AlignHCenter
106
width: 3 * parent.width / 7
107
height: childrenRect.height
109
anchors.horizontalCenter: parent.horizontalCenter
111
text: stopwatchUtils.lapTimeToString(model.laptime) + "."
115
text: stopwatchUtils.millisToString(model.laptime)
116
anchors.bottom: parent.bottom
117
anchors.bottomMargin: units.dp(1)
123
width: 3 * parent.width / 7
124
height: childrenRect.height
126
anchors.horizontalCenter: parent.horizontalCenter
128
text: stopwatchUtils.lapTimeToString(model.totaltime) + "."
132
text: stopwatchUtils.millisToString(model.totaltime)
133
anchors.bottom: parent.bottom
134
anchors.bottomMargin: units.dp(1)