- athlete and time storage now supports multiple timers
- some design improvements - removed translations
This commit is contained in:
parent
499cd247d4
commit
fb453d4053
17 changed files with 174 additions and 614 deletions
|
@ -100,7 +100,7 @@ public slots:
|
||||||
Q_INVOKABLE QVariant getAthletes();
|
Q_INVOKABLE QVariant getAthletes();
|
||||||
Q_INVOKABLE bool createAthlete( QString userName, QString fullName );
|
Q_INVOKABLE bool createAthlete( QString userName, QString fullName );
|
||||||
Q_INVOKABLE bool deleteAthlete( QString userName );
|
Q_INVOKABLE bool deleteAthlete( QString userName );
|
||||||
Q_INVOKABLE bool selectAthlete( QString userName );
|
Q_INVOKABLE bool selectAthlete( QString userName, int timerId );
|
||||||
Q_INVOKABLE QVariant getResults( QString userName );
|
Q_INVOKABLE QVariant getResults( QString userName );
|
||||||
|
|
||||||
Q_INVOKABLE bool reloadBaseStationIpAdress();
|
Q_INVOKABLE bool reloadBaseStationIpAdress();
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
/*
|
|
||||||
Speed Climbing Stopwatch - Simple Stopwatch for Climbers
|
|
||||||
Copyright (C) 2018 Itsblue Development - Dorian Zeder
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published
|
|
||||||
by the Free Software Foundation, version 3 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.9
|
|
||||||
import QtMultimedia 5.8
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import QtQuick.Controls 2.2
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import com.itsblue.speedclimbingstopwatch 2.0
|
|
||||||
|
|
||||||
|
|
||||||
Popup {
|
|
||||||
id: root
|
|
||||||
x: startButt.x
|
|
||||||
y: startButt.y
|
|
||||||
width: startButt.width
|
|
||||||
height: startButt.height
|
|
||||||
modal: true
|
|
||||||
|
|
||||||
enter: Transition {
|
|
||||||
NumberAnimation { properties: "scale"; from: 0; to: 1; duration: 300; easing.type: Easing.Linear }
|
|
||||||
}
|
|
||||||
|
|
||||||
exit: Transition {
|
|
||||||
NumberAnimation { properties: "scale"; from: 1; to: 0; duration: 300; easing.type: Easing.Linear }
|
|
||||||
}
|
|
||||||
|
|
||||||
background: Rectangle {
|
|
||||||
radius: width * 0.5
|
|
||||||
color: appTheme.style.viewColor
|
|
||||||
border.color: appTheme.style.lineColor
|
|
||||||
border.width: 1
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: head_text
|
|
||||||
text: "error"
|
|
||||||
font.pixelSize: headlineUnderline.width * 0.1
|
|
||||||
color: enabled ? appTheme.style.textColor:appTheme.style.disabledTextColor
|
|
||||||
anchors {
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
top: parent.top
|
|
||||||
topMargin: headlineUnderline.anchors.topMargin / 2 - height / 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: headlineUnderline
|
|
||||||
height: 1
|
|
||||||
width: parent.width
|
|
||||||
color: appTheme.style.lineColor
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
topMargin: parent.height * 0.15
|
|
||||||
rightMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
|
|
||||||
leftMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: errorIcon
|
|
||||||
source: "qrc:/graphics/icons/error.png"
|
|
||||||
anchors.centerIn: parent
|
|
||||||
height: parent.height * 0.5
|
|
||||||
width: height
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -60,7 +60,7 @@ RemoteDataListView {
|
||||||
delegate: SwipeDelegate {
|
delegate: SwipeDelegate {
|
||||||
id: swipeDelegate
|
id: swipeDelegate
|
||||||
|
|
||||||
property bool active: profileList.currentAthlete === profileList.listData[index]["id"]
|
property int thisIndex: index
|
||||||
|
|
||||||
text: profileList.listData[index]["fullName"]
|
text: profileList.listData[index]["fullName"]
|
||||||
width: profileList.width - (swipeDelegate.x)
|
width: profileList.width - (swipeDelegate.x)
|
||||||
|
@ -86,8 +86,8 @@ RemoteDataListView {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: swipeDelegate.width * 0.05
|
leftMargin: swipeDelegate.width * 0.05
|
||||||
right: parent.right
|
right: athleteSelectBoxRow.left
|
||||||
rightMargin: swipeDelegate.rightPadding
|
rightMargin: leftMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
text: swipeDelegate.text
|
text: swipeDelegate.text
|
||||||
|
@ -114,21 +114,36 @@ RemoteDataListView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
Row {
|
||||||
id: control
|
id: athleteSelectBoxRow
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: 7
|
rightMargin: 7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
height: parent.height
|
||||||
|
width: childrenRect.width
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: athleteSelectBoxRep
|
||||||
|
|
||||||
|
model: speedBackend.timers.length
|
||||||
|
|
||||||
|
delegate: CheckBox {
|
||||||
|
id: control
|
||||||
|
|
||||||
|
property bool active: speedBackend.timers[index]["id"] === profileList.listData[swipeDelegate.thisIndex]["active"]
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
height: parent.height * 0.6
|
height: parent.height * 0.6
|
||||||
|
|
||||||
checked: swipeDelegate.active
|
enabled: speedBackend.timers[index]["state"] !== "DISABLED"
|
||||||
|
checked: control.active
|
||||||
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if(checked && !swipeDelegate.active && speedBackend.selectAthlete(profileList.listData[index]["userName"])){
|
if(checked && !control.active && speedBackend.selectAthlete(profileList.listData[swipeDelegate.thisIndex]["userName"], speedBackend.timers[index]["id"])){
|
||||||
profileList.loadData()
|
profileList.loadData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,7 +159,7 @@ RemoteDataListView {
|
||||||
y: parent.height / 2 - height / 2
|
y: parent.height / 2 - height / 2
|
||||||
|
|
||||||
radius: width * 0.2
|
radius: width * 0.2
|
||||||
border.color: control.down ? "#17a81a" : "#21be2b"
|
border.color: control.enabled ? control.down ? "#17a81a" : "#21be2b" : "grey"
|
||||||
color: control.down ? appTheme.style.delegatePressedColor : appTheme.style.delegateBackgroundColor
|
color: control.down ? appTheme.style.delegatePressedColor : appTheme.style.delegateBackgroundColor
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -152,7 +167,7 @@ RemoteDataListView {
|
||||||
height: width
|
height: width
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: control.checked ? width * 0.2:0
|
radius: control.checked ? width * 0.2:0
|
||||||
color: control.down ? "#17a81a" : "#21be2b"
|
color: control.enabled ? control.down ? "#17a81a" : "#21be2b" : "grey"
|
||||||
opacity: control.checked ? 1:0
|
opacity: control.checked ? 1:0
|
||||||
scale: control.checked ? 0.9:0
|
scale: control.checked ? 0.9:0
|
||||||
|
|
||||||
|
@ -183,6 +198,10 @@ RemoteDataListView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "grey"
|
color: "grey"
|
||||||
height: 1
|
height: 1
|
||||||
|
|
|
@ -26,7 +26,7 @@ SmoothItemDelegate {
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
if(oldState !== status.status) {
|
if(oldState !== status.status) {
|
||||||
if(status.status === "disconnected" && oldState === "connecting") {
|
if(status.status === "disconnected" && oldState === "connecting") {
|
||||||
statusIndicator.color_override = "red"
|
statusIndicator.color_override = appTheme.style.errorColor
|
||||||
shortDelay.start()
|
shortDelay.start()
|
||||||
}
|
}
|
||||||
oldState = status.status
|
oldState = status.status
|
||||||
|
@ -57,11 +57,11 @@ SmoothItemDelegate {
|
||||||
id: statusIndicator
|
id: statusIndicator
|
||||||
property string color_override: ""
|
property string color_override: ""
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: color_override === "" ? status.status === "connected" ? "#c1ff32":"transparent":color_override
|
color: color_override === "" ? status.status === "connected" ? appTheme.style.successColor:"transparent":color_override
|
||||||
opacity: status.status === "connecting" ? 0:1
|
opacity: status.status === "connecting" ? 0:1
|
||||||
radius: height * 0.5
|
radius: height * 0.5
|
||||||
border.color: "grey"
|
border.color: appTheme.style.lineColor
|
||||||
border.width: height * 0.1
|
border.width: 1
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
|
@ -81,11 +81,11 @@ SmoothItemDelegate {
|
||||||
id: prog
|
id: prog
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: status.status === "connecting" ? 1:0
|
opacity: status.status === "connecting" ? 1:0
|
||||||
lineWidth: height * 0.1
|
lineWidth: 1
|
||||||
|
|
||||||
arcBegin: 0
|
arcBegin: 0
|
||||||
arcEnd: 360 * ( status.progress / 100 )
|
arcEnd: 360 * ( status.progress / 100 )
|
||||||
colorCircle: "grey"
|
colorCircle: appTheme.style.lineColor
|
||||||
onColorCircleChanged: prog.repaint()
|
onColorCircleChanged: prog.repaint()
|
||||||
onArcEndChanged: prog.repaint()
|
onArcEndChanged: prog.repaint()
|
||||||
|
|
||||||
|
|
159
qml/main.qml
159
qml/main.qml
|
@ -31,12 +31,12 @@ Window {
|
||||||
visible: true
|
visible: true
|
||||||
width: 540
|
width: 540
|
||||||
height: 960
|
height: 960
|
||||||
title: qsTr("Speedclimbing stw")
|
title: "Speedclimbing stw"
|
||||||
property date currentTime: new Date()
|
property date currentTime: new Date()
|
||||||
property int millis: 0
|
property int millis: 0
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id:root
|
id:app
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
//set default state to IDLE
|
//set default state to IDLE
|
||||||
|
@ -84,7 +84,7 @@ Window {
|
||||||
settingsDialog.close()
|
settingsDialog.close()
|
||||||
profilesDialog.close()
|
profilesDialog.close()
|
||||||
}
|
}
|
||||||
root.state = stateString
|
app.state = stateString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,10 +111,10 @@ Window {
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: root.landscape() ? startButt.left:parent.right
|
right: app.landscape() ? startButt.left:parent.right
|
||||||
bottom: root.landscape() ? parent.bottom:startButt.top
|
bottom: app.landscape() ? parent.bottom:startButt.top
|
||||||
bottomMargin: root.landscape() ? undefined:parent.height * 0.1
|
bottomMargin: app.landscape() ? undefined:parent.height * 0.1
|
||||||
rightMargin: root.landscape() ? parent.width * 0.05:0
|
rightMargin: app.landscape() ? parent.width * 0.05:0
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -137,7 +137,7 @@ Window {
|
||||||
|
|
||||||
width: parent.width * 0.7
|
width: parent.width * 0.7
|
||||||
|
|
||||||
text: qsTr("Click Start to start")
|
text: "Click Start to start"
|
||||||
|
|
||||||
color: appTheme.style.textColor
|
color: appTheme.style.textColor
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ Window {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
font.pixelSize: root.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
font.pixelSize: app.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
||||||
|
|
||||||
minimumPixelSize: 1
|
minimumPixelSize: 1
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@ Window {
|
||||||
id: timerCol
|
id: timerCol
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
anchors.bottomMargin: app.landscape() ? 0:parent.height * 0.1
|
||||||
|
|
||||||
opacity: ( speedBackend.state < 3 ) ? 0:1
|
opacity: ( speedBackend.state < 3 ) ? 0:1
|
||||||
|
|
||||||
|
@ -187,8 +188,8 @@ Window {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
elide: "ElideRight"
|
elide: "ElideRight"
|
||||||
color: speedBackend.timers[index]["state"] === "WON" ? "green" :
|
color: speedBackend.timers[index]["state"] === "WON" ? appTheme.style.successColor :
|
||||||
speedBackend.timers[index]["state"] === "LOST" ? "red":
|
speedBackend.timers[index]["state"] === "LOST" ? appTheme.style.errorColor:
|
||||||
appTheme.style.textColor
|
appTheme.style.textColor
|
||||||
|
|
||||||
enabled: speedBackend.timers[index]["state"] !== "DISABLED"
|
enabled: speedBackend.timers[index]["state"] !== "DISABLED"
|
||||||
|
@ -200,12 +201,12 @@ Window {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
font.pixelSize: root.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
font.pixelSize: app.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
||||||
|
|
||||||
minimumPixelSize: 1
|
minimumPixelSize: 1
|
||||||
|
|
||||||
Behavior on text {
|
Behavior on text {
|
||||||
enabled: root.state !== "RUNNING"
|
enabled: app.state !== "RUNNING" && app.state !== "STOPPED"
|
||||||
FadeAnimation {
|
FadeAnimation {
|
||||||
target: timerTextLa
|
target: timerTextLa
|
||||||
}
|
}
|
||||||
|
@ -219,7 +220,7 @@ Window {
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
centerIn: parent
|
centerIn: parent
|
||||||
verticalCenterOffset: parent.height * 0.25
|
verticalCenterOffset: timerTextLa.font.pixelSize * 0.5 + react_time.font.pixelSize * 0.5
|
||||||
}
|
}
|
||||||
|
|
||||||
width: ( parent.width * 0.6 )
|
width: ( parent.width * 0.6 )
|
||||||
|
@ -230,9 +231,9 @@ Window {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: qsTr("reaction time (ms): ") + Math.round(rtime)
|
text: "reaction time (ms): " + Math.round(rtime)
|
||||||
|
|
||||||
opacity: (root.state === "RUNNING" || root.state === "STOPPED") && rtime !== 0 ? 1:0
|
opacity: (app.state === "RUNNING" || app.state === "STOPPED") && rtime !== 0 ? 1:0
|
||||||
|
|
||||||
color: appTheme.style.textColor
|
color: appTheme.style.textColor
|
||||||
|
|
||||||
|
@ -263,8 +264,8 @@ Window {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: root.landscape() ? 0:parent.height * 0.8
|
bottomMargin: app.landscape() ? 0:parent.height * 0.8
|
||||||
rightMargin: root.landscape() ? parent.width * 0.8:0
|
rightMargin: app.landscape() ? parent.width * 0.8:0
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionIcon {
|
ConnectionIcon {
|
||||||
|
@ -279,7 +280,7 @@ Window {
|
||||||
leftMargin: 10
|
leftMargin: 10
|
||||||
}
|
}
|
||||||
scale: 1.3
|
scale: 1.3
|
||||||
height: !root.landscape()? parent.height*0.3:parent.width*0.3
|
height: !app.landscape()? parent.height*0.3:parent.width*0.3
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -317,7 +318,7 @@ Window {
|
||||||
|
|
||||||
scale: 0
|
scale: 0
|
||||||
|
|
||||||
height: !root.landscape()? parent.height*0.17:parent.width*0.17
|
height: !app.landscape()? parent.height*0.17:parent.width*0.17
|
||||||
width: status === "disconnected" ? 0:height
|
width: status === "disconnected" ? 0:height
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
@ -342,12 +343,12 @@ Window {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: upper_line
|
id: upper_line
|
||||||
width: root.landscape() ? 1:parent.width
|
width: app.landscape() ? 1:parent.width
|
||||||
height: root.landscape() ? parent.height:1
|
height: app.landscape() ? parent.height:1
|
||||||
color: appTheme.style.lineColor
|
color: appTheme.style.lineColor
|
||||||
anchors.left: root.landscape() ? topContainerItm.right:parent.left
|
anchors.left: app.landscape() ? topContainerItm.right:parent.left
|
||||||
anchors.top: root.landscape() ? parent.top:topContainerItm.bottom
|
anchors.top: app.landscape() ? parent.top:topContainerItm.bottom
|
||||||
anchors.bottom: root.landscape() ? parent.bottom:undefined
|
anchors.bottom: app.landscape() ? parent.bottom:undefined
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,18 +358,18 @@ Window {
|
||||||
FancyButton {
|
FancyButton {
|
||||||
id : startButt
|
id : startButt
|
||||||
|
|
||||||
text: qsTr("start")
|
text: "start"
|
||||||
property int size: root.landscape() ? parent.width * 0.5:parent.height * 0.5
|
property int size: app.landscape() ? parent.width * 0.5:parent.height * 0.5
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: root.height * 0.5 - height * 0.5
|
bottomMargin: app.height * 0.5 - height * 0.5
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: root.width * 0.5 - width * 0.5
|
rightMargin: app.width * 0.5 - width * 0.5
|
||||||
}
|
}
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
//make text disappear
|
//make text disappear
|
||||||
}
|
}
|
||||||
height: root.landscape() ? (size > parent.height * 0.9 ? parent.height * 0.9:size) : (size > parent.width * 0.9 ? parent.width * 0.9:size)
|
height: app.landscape() ? (size > parent.height * 0.9 ? parent.height * 0.9:size) : (size > parent.width * 0.9 ? parent.width * 0.9:size)
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -391,15 +392,15 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
switch(root.state) {
|
switch(app.state) {
|
||||||
case "IDLE":
|
case "IDLE":
|
||||||
root.start()
|
app.start()
|
||||||
break
|
break
|
||||||
case "RUNNING":
|
case "RUNNING":
|
||||||
root.stop(0)
|
app.stop(0)
|
||||||
break
|
break
|
||||||
case "STOPPED":
|
case "STOPPED":
|
||||||
root.reset()
|
app.reset()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,7 +409,7 @@ Window {
|
||||||
ProgressCircle {
|
ProgressCircle {
|
||||||
id: prog
|
id: prog
|
||||||
anchors.fill: startButt
|
anchors.fill: startButt
|
||||||
opacity: root.state === "STARTING" || root.state === "IDLE" ? 1:0
|
opacity: app.state === "STARTING" || app.state === "IDLE" ? 1:0
|
||||||
|
|
||||||
scale: startButt.scale
|
scale: startButt.scale
|
||||||
|
|
||||||
|
@ -434,7 +435,7 @@ Window {
|
||||||
FancyButton {
|
FancyButton {
|
||||||
id: cancelButt
|
id: cancelButt
|
||||||
|
|
||||||
text: qsTr("cancel")
|
text: "cancel"
|
||||||
anchors {
|
anchors {
|
||||||
right: startButt.right
|
right: startButt.right
|
||||||
bottom: startButt.bottom
|
bottom: startButt.bottom
|
||||||
|
@ -446,10 +447,10 @@ Window {
|
||||||
scale: 0
|
scale: 0
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
enabled: root.state === "STARTING"
|
enabled: app.state === "STARTING"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.stop(1)
|
app.stop(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
|
@ -485,12 +486,12 @@ Window {
|
||||||
ProfilesDialog {
|
ProfilesDialog {
|
||||||
id: profilesDialog
|
id: profilesDialog
|
||||||
|
|
||||||
property int margin: root.landscape() ? root.height * 0.05:root.width * 0.05
|
property int margin: app.landscape() ? app.height * 0.05:app.width * 0.05
|
||||||
|
|
||||||
x: root.landscape() ? topContainerItm.width + margin:topContainerItm.x + margin
|
x: app.landscape() ? topContainerItm.width + margin:topContainerItm.x + margin
|
||||||
y: !root.landscape() ? topContainerItm.height + margin:topContainerItm.x + margin
|
y: !app.landscape() ? topContainerItm.height + margin:topContainerItm.x + margin
|
||||||
width: root.landscape() ? root.width - topContainerItm.width - menu_container.width - margin * 2 : root.width - margin * 2
|
width: app.landscape() ? app.width - topContainerItm.width - menu_container.width - margin * 2 : app.width - margin * 2
|
||||||
height: !root.landscape() ? root.height - topContainerItm.height - menu_container.height - margin * 2 : root.height - margin * 2
|
height: !app.landscape() ? app.height - topContainerItm.height - menu_container.height - margin * 2 : app.height - margin * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------
|
/*-------------------
|
||||||
|
@ -499,12 +500,12 @@ Window {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: lowerLine
|
id: lowerLine
|
||||||
width: root.landscape() ? 1:parent.width
|
width: app.landscape() ? 1:parent.width
|
||||||
height: root.landscape() ? parent.height:1
|
height: app.landscape() ? parent.height:1
|
||||||
color: appTheme.style.lineColor
|
color: appTheme.style.lineColor
|
||||||
anchors.right: root.landscape() ? menu_container.left:parent.right
|
anchors.right: app.landscape() ? menu_container.left:parent.right
|
||||||
anchors.bottom: root.landscape() ? parent.bottom:menu_container.top
|
anchors.bottom: app.landscape() ? parent.bottom:menu_container.top
|
||||||
anchors.top: root.landscape() ? parent.top:undefined
|
anchors.top: app.landscape() ? parent.top:undefined
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,10 +525,10 @@ Window {
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
right: parent.right
|
right: parent.right
|
||||||
left: root.landscape() ? startButt.right:parent.left
|
left: app.landscape() ? startButt.right:parent.left
|
||||||
top: root.landscape() ? parent.top:startButt.bottom
|
top: app.landscape() ? parent.top:startButt.bottom
|
||||||
topMargin: root.landscape() ? undefined:parent.height * 0.1
|
topMargin: app.landscape() ? undefined:parent.height * 0.1
|
||||||
leftMargin: root.landscape() ? parent.width * 0.05:0
|
leftMargin: app.landscape() ? parent.width * 0.05:0
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -565,10 +566,10 @@ Window {
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
|
|
||||||
rows: root.landscape() ? activeChildren:1
|
rows: app.landscape() ? activeChildren:1
|
||||||
columns: root.landscape() ? 1:activeChildren
|
columns: app.landscape() ? 1:activeChildren
|
||||||
|
|
||||||
spacing: 0// root.landscape() ? parent.height * spacingMultiplier * 0.001:parent.width * spacingMultiplier * 0.001
|
spacing: 0// app.landscape() ? parent.height * spacingMultiplier * 0.001:parent.width * spacingMultiplier * 0.001
|
||||||
|
|
||||||
Behavior on spacingMultiplier {
|
Behavior on spacingMultiplier {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
@ -579,7 +580,7 @@ Window {
|
||||||
FancyButton {
|
FancyButton {
|
||||||
id: settingsButt
|
id: settingsButt
|
||||||
|
|
||||||
height: root.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
height: app.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -625,7 +626,7 @@ Window {
|
||||||
name: "visible"
|
name: "visible"
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: profilesButt
|
target: profilesButt
|
||||||
height: root.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
height: app.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -650,19 +651,19 @@ Window {
|
||||||
//state for the start page
|
//state for the start page
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topContainerItm;
|
target: topContainerItm;
|
||||||
anchors.bottomMargin: root.landscape() ? undefined:parent.height * 0.1;
|
anchors.bottomMargin: app.landscape() ? undefined:parent.height * 0.1;
|
||||||
anchors.rightMargin: root.landscape() ? parent.height * 0.05:0
|
anchors.rightMargin: app.landscape() ? parent.height * 0.05:0
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: startButt;
|
target: startButt;
|
||||||
enabled: true; text: qsTr("start");
|
enabled: true; text: "start";
|
||||||
size: root.landscape() ? parent.width * 0.5:parent.height * 0.5
|
size: app.landscape() ? parent.width * 0.5:parent.height * 0.5
|
||||||
anchors.bottomMargin: parent.height * 0.5 - startButt.height * 0.5
|
anchors.bottomMargin: parent.height * 0.5 - startButt.height * 0.5
|
||||||
anchors.rightMargin: parent.width * 0.5 - startButt.width * 0.5
|
anchors.rightMargin: parent.width * 0.5 - startButt.width * 0.5
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topLa
|
target: topLa
|
||||||
text: qsTr("Click Start to start")
|
text: "Click Start to start"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -670,29 +671,29 @@ Window {
|
||||||
name: "WAITING"
|
name: "WAITING"
|
||||||
//state when a false start occured and waiting for time calculation
|
//state when a false start occured and waiting for time calculation
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: startButt; enabled: false; text: qsTr("waiting...");
|
target: startButt; enabled: false; text: "waiting...";
|
||||||
anchors.rightMargin: root.landscape() ? parent.width * 0.05:parent.width * 0.5 - startButt.width * 0.5 //put the button more to the right to hide the menu (only in landscape mode)
|
anchors.rightMargin: app.landscape() ? parent.width * 0.05:parent.width * 0.5 - startButt.width * 0.5 //put the button more to the right to hide the menu (only in landscape mode)
|
||||||
anchors.bottomMargin: root.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.1 //put the button lower to hide the menu (only in portrait mode)
|
anchors.bottomMargin: app.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.1 //put the button lower to hide the menu (only in portrait mode)
|
||||||
}
|
}
|
||||||
PropertyChanges { target: cancelButt; scale: 0; enabled: false}
|
PropertyChanges { target: cancelButt; scale: 0; enabled: false}
|
||||||
PropertyChanges { target: menu_container; }
|
PropertyChanges { target: menu_container; }
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topLa
|
target: topLa
|
||||||
text: qsTr("please wait...")
|
text: "please wait..."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "STARTING"
|
name: "STARTING"
|
||||||
//state for the start sequence
|
//state for the start sequence
|
||||||
PropertyChanges { target: startButt; enabled: false; text: qsTr("starting...");
|
PropertyChanges { target: startButt; enabled: false; text: "starting...";
|
||||||
anchors.rightMargin: root.landscape() ? parent.width * 0.05:parent.width * 0.5 - startButt.width * 0.5 //put the button more to the right to hide the menu (only in landscape mode)
|
anchors.rightMargin: app.landscape() ? parent.width * 0.05:parent.width * 0.5 - startButt.width * 0.5 //put the button more to the right to hide the menu (only in landscape mode)
|
||||||
anchors.bottomMargin: root.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.1 //put the button lower to hide the menu (only in portrait mode)
|
anchors.bottomMargin: app.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.1 //put the button lower to hide the menu (only in portrait mode)
|
||||||
}
|
}
|
||||||
PropertyChanges { target: cancelButt; scale: 1}
|
PropertyChanges { target: cancelButt; scale: 1}
|
||||||
PropertyChanges { target: menu_container; }
|
PropertyChanges { target: menu_container; }
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topLa
|
target: topLa
|
||||||
text: qsTr("starting...")
|
text: "starting..."
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -701,8 +702,8 @@ Window {
|
||||||
//state when the timer is running
|
//state when the timer is running
|
||||||
PropertyChanges { target: startButt; enabled: true;
|
PropertyChanges { target: startButt; enabled: true;
|
||||||
text: "stop"
|
text: "stop"
|
||||||
anchors.rightMargin: root.landscape() ? parent.width * 0.05:parent.width * 0.5 - startButt.width * 0.5 //put the button more to the right to hide the menu (only in landscape mode)
|
anchors.rightMargin: app.landscape() ? parent.width * 0.05:parent.width * 0.5 - startButt.width * 0.5 //put the button more to the right to hide the menu (only in landscape mode)
|
||||||
anchors.bottomMargin: root.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.1 //put the button lower to hide the menu (only in portrait mode)
|
anchors.bottomMargin: app.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.1 //put the button lower to hide the menu (only in portrait mode)
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topLa
|
target: topLa
|
||||||
|
@ -715,15 +716,15 @@ Window {
|
||||||
//state when the meassuring is over
|
//state when the meassuring is over
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: startButt;
|
target: startButt;
|
||||||
enabled: true; text: qsTr("reset");
|
enabled: true; text: "reset";
|
||||||
size: root.landscape() ? parent.height * 0.35:parent.height * 0.2;
|
size: app.landscape() ? parent.height * 0.35:parent.height * 0.2;
|
||||||
anchors.bottomMargin: root.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.2 - startButt.height * 0.5
|
anchors.bottomMargin: app.landscape() ? parent.height * 0.5 - startButt.height * 0.5:parent.height * 0.2 - startButt.height * 0.5
|
||||||
anchors.rightMargin: root.landscape() ? parent.height * 0.2 - startButt.height * 0.5:parent.width * 0.5 - startButt.width * 0.5
|
anchors.rightMargin: app.landscape() ? parent.height * 0.2 - startButt.height * 0.5:parent.width * 0.5 - startButt.width * 0.5
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topContainerItm;
|
target: topContainerItm;
|
||||||
anchors.rightMargin: root.landscape() ? 0-startButt.width/2:undefined
|
anchors.rightMargin: app.landscape() ? 0-startButt.width/2:undefined
|
||||||
anchors.bottomMargin: root.landscape() ? undefined:0-startButt.height/2
|
anchors.bottomMargin: app.landscape() ? undefined:0-startButt.height/2
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topLa
|
target: topLa
|
||||||
|
@ -764,7 +765,7 @@ Window {
|
||||||
Timer functions
|
Timer functions
|
||||||
----------------------*/
|
----------------------*/
|
||||||
function landscape(){
|
function landscape(){
|
||||||
return(root.height < root.width)
|
return(app.height < app.width)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----Functions to control the stopwatch----*/
|
/*----Functions to control the stopwatch----*/
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<file>components/FadeAnimation.qml</file>
|
<file>components/FadeAnimation.qml</file>
|
||||||
<file>components/ConnectionIcon.qml</file>
|
<file>components/ConnectionIcon.qml</file>
|
||||||
<file>components/NextPageDelegate.qml</file>
|
<file>components/NextPageDelegate.qml</file>
|
||||||
<file>ErrorDialog.qml</file>
|
|
||||||
<file>components/FancyButton.qml</file>
|
<file>components/FancyButton.qml</file>
|
||||||
<file>components/SmoothItemDelegate.qml</file>
|
<file>components/SmoothItemDelegate.qml</file>
|
||||||
<file>components/SmoothSwitchDelegate.qml</file>
|
<file>components/SmoothSwitchDelegate.qml</file>
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
<file>sounds/at_marks_2.wav</file>
|
<file>sounds/at_marks_2.wav</file>
|
||||||
<file>graphics/icons/buzzer_black.png</file>
|
<file>graphics/icons/buzzer_black.png</file>
|
||||||
<file>graphics/icons/ok_black.png</file>
|
<file>graphics/icons/ok_black.png</file>
|
||||||
<file>translations/de_DE.qm</file>
|
|
||||||
<file>translations/de_DE.ts</file>
|
|
||||||
<file>graphics/icons/settings_black.png</file>
|
<file>graphics/icons/settings_black.png</file>
|
||||||
<file>graphics/icons/startpad_black.png</file>
|
<file>graphics/icons/startpad_black.png</file>
|
||||||
<file>sounds/false.wav</file>
|
<file>sounds/false.wav</file>
|
||||||
|
|
|
@ -25,8 +25,8 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
|
||||||
|
|
||||||
{"sliderColor", "#6ccaf2"},
|
{"sliderColor", "#6ccaf2"},
|
||||||
|
|
||||||
{"errorColor", "#ba3f62"},
|
{"successColor", "#6bd43b"},
|
||||||
{"infoColor", "#3fba62"},
|
{"errorColor", "#e03b2f"},
|
||||||
|
|
||||||
{"lineColor", "grey"},
|
{"lineColor", "grey"},
|
||||||
|
|
||||||
|
@ -63,8 +63,8 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
|
||||||
|
|
||||||
{"sliderColor", "#6ccaf2"},
|
{"sliderColor", "#6ccaf2"},
|
||||||
|
|
||||||
{"errorColor", "#ba3f62"},
|
{"successColor", "#60de26"},
|
||||||
{"infoColor", "#3fba62"},
|
{"errorColor", "#ff0000"},
|
||||||
|
|
||||||
{"lineColor", "grey"},
|
{"lineColor", "grey"},
|
||||||
|
|
||||||
|
|
|
@ -394,7 +394,7 @@ void ClimbingRace::refreshTimerText() {
|
||||||
QVariantList newTimerTextList;
|
QVariantList newTimerTextList;
|
||||||
|
|
||||||
foreach(SpeedTimer * timer, this->speedTimers){
|
foreach(SpeedTimer * timer, this->speedTimers){
|
||||||
QVariantMap timerMap = {{"text",timer->getText()}, {"reacttime", timer->reactionTime}, {"state", timer->getState()}};
|
QVariantMap timerMap = {{"text",timer->getText()}, {"reacttime", timer->reactionTime}, {"state", timer->getState()}, {"id", this->speedTimers.indexOf(timer)}};
|
||||||
newTimerTextList.append(timerMap);
|
newTimerTextList.append(timerMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,9 +526,9 @@ bool ClimbingRace::deleteAthlete( QString userName ){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClimbingRace::selectAthlete( QString userName){
|
bool ClimbingRace::selectAthlete( QString userName, int timerId ){
|
||||||
|
|
||||||
QVariant requestData = QVariantMap({{"userName", userName}});
|
QVariant requestData = QVariantMap({{"userName", userName}, {"timerId", timerId}});
|
||||||
|
|
||||||
QVariantMap reply = this->baseConn->sendCommand(4000, requestData.toJsonValue());
|
QVariantMap reply = this->baseConn->sendCommand(4000, requestData.toJsonValue());
|
||||||
|
|
||||||
|
|
|
@ -115,26 +115,16 @@ int main(int argc, char *argv[])
|
||||||
qmlRegisterType<SqlProfileModel>("com.itsblue.speedclimbingstopwatch", 1, 0, "SqlProfileModel");
|
qmlRegisterType<SqlProfileModel>("com.itsblue.speedclimbingstopwatch", 1, 0, "SqlProfileModel");
|
||||||
qmlRegisterType<SqlStorageModel>("com.itsblue.speedclimbingstopwatch", 1, 0, "SqlStorageModel");
|
qmlRegisterType<SqlStorageModel>("com.itsblue.speedclimbingstopwatch", 1, 0, "SqlStorageModel");
|
||||||
|
|
||||||
//setup the startpad and buzzer conn qml objects
|
// setup speed backend and App themes
|
||||||
//qmlRegisterType<BuzzerConn>("com.itsblue.speedclimbingstopwatch", 1, 0, "BuzzerConn");
|
|
||||||
//qmlRegisterType<BuzzerConn>("com.itsblue.speedclimbingstopwatch", 1, 0, "StartpadConn");
|
|
||||||
//qmlRegisterType<BaseConn>("com.itsblue.speedclimbingstopwatch", 1, 0, "BaseStationConn");
|
|
||||||
//qmlRegisterType<SpeedTimerQmlAdapter>("com.itsblue.speedclimbingstopwatch", 1, 0, "SpeedTimerBackend");
|
|
||||||
|
|
||||||
qmlRegisterType<ClimbingRace>("com.itsblue.speedclimbingstopwatch", 2, 0, "SpeedBackend");
|
qmlRegisterType<ClimbingRace>("com.itsblue.speedclimbingstopwatch", 2, 0, "SpeedBackend");
|
||||||
qmlRegisterType<AppTheme>("com.itsblue.speedclimbingstopwatch", 2, 0, "AppTheme");
|
qmlRegisterType<AppTheme>("com.itsblue.speedclimbingstopwatch", 2, 0, "AppTheme");
|
||||||
|
|
||||||
//setup translation engine
|
|
||||||
//to the language of the system
|
|
||||||
//if the system language is not found the language is set to english
|
|
||||||
QTranslator translator;
|
|
||||||
translator.load(":/translations/"+QLocale::system().name()+".qm");
|
|
||||||
app.installTranslator(&translator);
|
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||||
|
|
||||||
QQmlContext *context = engine.rootContext();
|
QQmlContext *context = engine.rootContext();
|
||||||
|
|
||||||
|
// stup app settings
|
||||||
context->setContextProperty("_cppAppSettings", pAppSettings);
|
context->setContextProperty("_cppAppSettings", pAppSettings);
|
||||||
|
|
||||||
if (engine.rootObjects().isEmpty())
|
if (engine.rootObjects().isEmpty())
|
||||||
|
|
|
@ -96,21 +96,21 @@ void SpeedTimer::setState(timerState newState){
|
||||||
QString SpeedTimer::getState(){
|
QString SpeedTimer::getState(){
|
||||||
switch(state){
|
switch(state){
|
||||||
case IDLE:
|
case IDLE:
|
||||||
return("IDLE");
|
return "IDLE";
|
||||||
case STARTING:
|
case STARTING:
|
||||||
return("STARTING");
|
return "STARTING";
|
||||||
case WAITING:
|
case WAITING:
|
||||||
return ("WAITING");
|
return "WAITING";
|
||||||
case RUNNING:
|
case RUNNING:
|
||||||
return("RUNNING");
|
return "RUNNING";
|
||||||
case WON:
|
case WON:
|
||||||
return "WON";
|
return "WON";
|
||||||
case LOST:
|
case LOST:
|
||||||
return "LOST";
|
return "LOST";
|
||||||
case FAILED:
|
case FAILED:
|
||||||
return("FAILED");
|
return "FAILED";
|
||||||
case CANCELLED:
|
case CANCELLED:
|
||||||
return("CANCELLED");
|
return "CANCELLED";
|
||||||
case DISABLED:
|
case DISABLED:
|
||||||
return "DISABLED";
|
return "DISABLED";
|
||||||
}
|
}
|
||||||
|
@ -134,13 +134,13 @@ QString SpeedTimer::getText() {
|
||||||
QString newText;
|
QString newText;
|
||||||
switch (this->state) {
|
switch (this->state) {
|
||||||
case SpeedTimer::IDLE:
|
case SpeedTimer::IDLE:
|
||||||
newText = tr("Click Start to start");
|
newText = "0.000 sec";
|
||||||
break;
|
break;
|
||||||
case SpeedTimer::STARTING:
|
case SpeedTimer::STARTING:
|
||||||
newText = "0.000 sec";
|
newText = "0.000 sec";
|
||||||
break;
|
break;
|
||||||
case SpeedTimer::WAITING:
|
case SpeedTimer::WAITING:
|
||||||
newText = tr("Please wait...");
|
newText = "Please wait...";
|
||||||
break;
|
break;
|
||||||
case SpeedTimer::RUNNING:
|
case SpeedTimer::RUNNING:
|
||||||
newText = QString::number( this->getCurrTime() / 1000.0, 'f', 3 ) + " sec";
|
newText = QString::number( this->getCurrTime() / 1000.0, 'f', 3 ) + " sec";
|
||||||
|
@ -152,10 +152,10 @@ QString SpeedTimer::getText() {
|
||||||
newText = QString::number( this->stoppedTime / 1000.0, 'f', 3 ) + " sec";
|
newText = QString::number( this->stoppedTime / 1000.0, 'f', 3 ) + " sec";
|
||||||
break;
|
break;
|
||||||
case SpeedTimer::FAILED:
|
case SpeedTimer::FAILED:
|
||||||
newText = tr("False Start");
|
newText = "False Start";
|
||||||
break;
|
break;
|
||||||
case SpeedTimer::CANCELLED:
|
case SpeedTimer::CANCELLED:
|
||||||
newText = tr("Cancelled");
|
newText = "Cancelled";
|
||||||
break;
|
break;
|
||||||
case SpeedTimer::DISABLED:
|
case SpeedTimer::DISABLED:
|
||||||
newText = "---";
|
newText = "---";
|
||||||
|
|
|
@ -43,8 +43,6 @@ RESOURCES += \
|
||||||
shared.qrc \
|
shared.qrc \
|
||||||
qml/qml.qrc
|
qml/qml.qrc
|
||||||
|
|
||||||
TRANSLATIONS = translations/de_DE.ts
|
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||||
QML_IMPORT_PATH =
|
QML_IMPORT_PATH =
|
||||||
|
|
||||||
|
@ -63,8 +61,7 @@ else: unix:!android: target.path = /home/pi/$${TARGET}/bin
|
||||||
DISTFILES += \
|
DISTFILES += \
|
||||||
android-sources/AndroidManifest.xml \
|
android-sources/AndroidManifest.xml \
|
||||||
CHANGELOG \
|
CHANGELOG \
|
||||||
android-sources/src/MainActivity.java \
|
android-sources/src/MainActivity.java
|
||||||
translations/german_de.ts
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
|
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
|
||||||
|
|
Binary file not shown.
|
@ -1,195 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="de_DE" sourcelanguage="en">
|
|
||||||
<context>
|
|
||||||
<name>InputDelegate</name>
|
|
||||||
<message>
|
|
||||||
<source>delay (ms)</source>
|
|
||||||
<translation type="vanished">Verzögerung (ms)</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>SettingsDialog</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="236"/>
|
|
||||||
<source>Options</source>
|
|
||||||
<translation>Optionen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>connected to buzzer</source>
|
|
||||||
<translation type="vanished">Mit Buzzer verbunden</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>connect to buzzer</source>
|
|
||||||
<translation type="vanished">Mit Buzzer verbinden</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="387"/>
|
|
||||||
<source>connecting...</source>
|
|
||||||
<translation>verbinde...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>success!</source>
|
|
||||||
<translation type="vanished">Erfolg</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>error!</source>
|
|
||||||
<translation type="vanished">Fehler</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="245"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="379"/>
|
|
||||||
<source>Base Station</source>
|
|
||||||
<translation>Base Station</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="257"/>
|
|
||||||
<source>start sequence</source>
|
|
||||||
<translation>Start Ablauf</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="267"/>
|
|
||||||
<source>dark mode</source>
|
|
||||||
<translation>dunkler Modus</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="310"/>
|
|
||||||
<source>say 'ready'</source>
|
|
||||||
<translation>sage 'ready'</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="327"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="359"/>
|
|
||||||
<source>delay (ms)</source>
|
|
||||||
<translation>Verzögerung (ms)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="328"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="360"/>
|
|
||||||
<source>time</source>
|
|
||||||
<translation>Zeit</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="344"/>
|
|
||||||
<source>say 'at your marks'</source>
|
|
||||||
<translation>sage 'at your marks'</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="387"/>
|
|
||||||
<source>disconnect</source>
|
|
||||||
<translation>trennen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="387"/>
|
|
||||||
<source>connect</source>
|
|
||||||
<translation>verbinden</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="403"/>
|
|
||||||
<source>IP-Adress</source>
|
|
||||||
<translation>IP-Adresse</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="429"/>
|
|
||||||
<source>volume</source>
|
|
||||||
<translation>Lautstärke</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="465"/>
|
|
||||||
<source>connected extensions</source>
|
|
||||||
<translation>verbundene Erweiterungen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="492"/>
|
|
||||||
<source>connections</source>
|
|
||||||
<translation>Verbindungen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>say
|
|
||||||
'at your marks'</source>
|
|
||||||
<translation type="vanished">sage
|
|
||||||
'at your marks'</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>SpeedTimer</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../sources/speedtimer.cpp" line="130"/>
|
|
||||||
<source>Click Start to start</source>
|
|
||||||
<translation>Tippe start zum Starten</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../sources/speedtimer.cpp" line="136"/>
|
|
||||||
<source>Please wait...</source>
|
|
||||||
<translation>Bitte warten...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../sources/speedtimer.cpp" line="145"/>
|
|
||||||
<source>False Start</source>
|
|
||||||
<translation>Fehlstart</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../sources/speedtimer.cpp" line="148"/>
|
|
||||||
<source>Cancelled</source>
|
|
||||||
<translation>Abgebrochen</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>main</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="33"/>
|
|
||||||
<source>Speedclimbing stw</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Click start to start</source>
|
|
||||||
<translation type="vanished">Tippe start zum Starten</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="222"/>
|
|
||||||
<source>reaction time (ms): </source>
|
|
||||||
<translation>Reaktionszeit (ms): </translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="349"/>
|
|
||||||
<location filename="../qml/main.qml" line="629"/>
|
|
||||||
<source>start</source>
|
|
||||||
<translation>start</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="426"/>
|
|
||||||
<source>cancel</source>
|
|
||||||
<translation>Abbruch</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="636"/>
|
|
||||||
<source>Click Start to start</source>
|
|
||||||
<translation type="unfinished">Tippe start zum Starten</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="644"/>
|
|
||||||
<source>waiting...</source>
|
|
||||||
<translation>warte...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="652"/>
|
|
||||||
<source>please wait...</source>
|
|
||||||
<translation>Bitte warten...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="658"/>
|
|
||||||
<location filename="../qml/main.qml" line="666"/>
|
|
||||||
<source>starting...</source>
|
|
||||||
<translation>starte...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>false start</source>
|
|
||||||
<translation type="vanished">Fehlstart</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="686"/>
|
|
||||||
<source>reset</source>
|
|
||||||
<translation>reset</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
|
@ -1,58 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1">
|
|
||||||
<context>
|
|
||||||
<name>SettingsDialog</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="275"/>
|
|
||||||
<source>say 'ready'</source>
|
|
||||||
<translation>fertig</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="316"/>
|
|
||||||
<source>say
|
|
||||||
'at your marks'</source>
|
|
||||||
<translation type="unfinished">auf die Plätze</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>main</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="30"/>
|
|
||||||
<source>Speedclimbing stw</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="195"/>
|
|
||||||
<location filename="../qml/main.qml" line="540"/>
|
|
||||||
<source>Click start to start</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="246"/>
|
|
||||||
<location filename="../qml/main.qml" line="549"/>
|
|
||||||
<source>start</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="346"/>
|
|
||||||
<source>cancel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="559"/>
|
|
||||||
<source>starting...</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="583"/>
|
|
||||||
<source>false start</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="589"/>
|
|
||||||
<source>reset</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
Binary file not shown.
|
@ -1,108 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="de_DE">
|
|
||||||
<context>
|
|
||||||
<name>SettingsDialog</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="170"/>
|
|
||||||
<source>Options</source>
|
|
||||||
<translation>Einstellungen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="177"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="184"/>
|
|
||||||
<source>connected to buzzer</source>
|
|
||||||
<translation>Mit Buzzer verbunden</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="177"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="184"/>
|
|
||||||
<source>connect to buzzer</source>
|
|
||||||
<translation>Mit Buzzer verbinden</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="195"/>
|
|
||||||
<source>connecting...</source>
|
|
||||||
<translation>verbinde...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="201"/>
|
|
||||||
<source>success!</source>
|
|
||||||
<translation>erfolgreich!</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="207"/>
|
|
||||||
<source>error!</source>
|
|
||||||
<translation>fehler!</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="232"/>
|
|
||||||
<source>start sequence</source>
|
|
||||||
<translation>Start Abfolge</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="275"/>
|
|
||||||
<source>say 'ready'</source>
|
|
||||||
<translation>sage 'ready'</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="291"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="332"/>
|
|
||||||
<source>delay (ms)</source>
|
|
||||||
<translation>Verzögerung (ms)</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="299"/>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="341"/>
|
|
||||||
<source>time</source>
|
|
||||||
<translation>Zeit</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/SettingsDialog.qml" line="316"/>
|
|
||||||
<source>say
|
|
||||||
'at your marks'</source>
|
|
||||||
<translation>sage
|
|
||||||
'at your marks'</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>main</name>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="30"/>
|
|
||||||
<source>Speedclimbing stw</source>
|
|
||||||
<translation></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="195"/>
|
|
||||||
<location filename="../qml/main.qml" line="540"/>
|
|
||||||
<source>Click start to start</source>
|
|
||||||
<translation>Tippe start zum Starten</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="246"/>
|
|
||||||
<location filename="../qml/main.qml" line="549"/>
|
|
||||||
<source>start</source>
|
|
||||||
<translation>start</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="346"/>
|
|
||||||
<source>cancel</source>
|
|
||||||
<translation>abbruch</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="559"/>
|
|
||||||
<source>starting...</source>
|
|
||||||
<translation>starte...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="583"/>
|
|
||||||
<source>false start</source>
|
|
||||||
<translation>Fehlstart</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../qml/main.qml" line="589"/>
|
|
||||||
<source>reset</source>
|
|
||||||
<translation>reset</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
Reference in a new issue