- removed redundant files
- improved the look of switches in dark mode - added 'What is this for?' button to the BaseStation settings
This commit is contained in:
parent
5340398f80
commit
c990791306
9 changed files with 173 additions and 75 deletions
|
@ -229,7 +229,7 @@ Popup {
|
||||||
|
|
||||||
height: options_stack.delegateHeight
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
text: qsTr("start sequence")
|
text: qsTr("Start sequence")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
options_stack.push(autostart)
|
options_stack.push(autostart)
|
||||||
|
@ -239,7 +239,7 @@ Popup {
|
||||||
/*----Style Settings----*/
|
/*----Style Settings----*/
|
||||||
SmoothSwitchDelegate {
|
SmoothSwitchDelegate {
|
||||||
id: styleDel
|
id: styleDel
|
||||||
text: qsTr("dark mode")
|
text: qsTr("Dark mode")
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: options_stack.delegateHeight
|
height: options_stack.delegateHeight
|
||||||
|
@ -278,7 +278,7 @@ Popup {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: options_stack.delegateHeight
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
text: qsTr("say 'ready'")
|
text: qsTr("Say 'ready'")
|
||||||
|
|
||||||
checked: parent.loadSetting("ready_en", ready_del) === "true"
|
checked: parent.loadSetting("ready_en", ready_del) === "true"
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ Popup {
|
||||||
|
|
||||||
enabled: ready_del.checked
|
enabled: ready_del.checked
|
||||||
|
|
||||||
text: qsTr("delay (ms)")
|
text: qsTr("Delay (ms)")
|
||||||
inputHint: qsTr("time")
|
inputHint: qsTr("time")
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ Popup {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: options_stack.delegateHeight
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
text: qsTr("say 'at your marks'")
|
text: qsTr("Say 'at your marks'")
|
||||||
|
|
||||||
checked: autostart_col.loadSetting("at_marks_en", ready_del) === "true"
|
checked: autostart_col.loadSetting("at_marks_en", ready_del) === "true"
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ Popup {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: options_stack.delegateHeight
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
text: qsTr("delay (ms)")
|
text: qsTr("Delay (ms)")
|
||||||
inputHint: qsTr("time")
|
inputHint: qsTr("time")
|
||||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ Popup {
|
||||||
|
|
||||||
ConnectionDelegate {
|
ConnectionDelegate {
|
||||||
id: connectToBaseDel
|
id: connectToBaseDel
|
||||||
text: status.status === "connected" ? qsTr("disconnect"): status.status === "disconnected" ? qsTr("connect"):qsTr("connecting...")
|
text: status.status === "connected" ? qsTr("Disconnect"): status.status === "disconnected" ? qsTr("Connect"):qsTr("Connecting...")
|
||||||
|
|
||||||
status: { "status": speedBackend.baseStationState, "progress": 100 }
|
status: { "status": speedBackend.baseStationState, "progress": 100 }
|
||||||
connect: speedBackend.connectBaseStation
|
connect: speedBackend.connectBaseStation
|
||||||
|
@ -364,91 +364,189 @@ Popup {
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: options_stack.delegateHeight
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
font.pixelSize: height * 0.6
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InputDelegate {
|
Loader {
|
||||||
id: baseStationIpDel
|
id: baseStationOptionsLd
|
||||||
|
|
||||||
text: qsTr("IP-Adress")
|
property alias parentComp: connectCol
|
||||||
|
property alias baseConnected: connectCol.baseConnected
|
||||||
|
|
||||||
inputHint: "IP"
|
onBaseConnectedChanged: {
|
||||||
inputText: speedBackend.readSetting("baseStationIpAdress")
|
disappearAnim.start()
|
||||||
inputTextFieldWidth: width * 0.7
|
|
||||||
|
|
||||||
onInputTextChanged: {
|
|
||||||
speedBackend.writeSetting("baseStationIpAdress", inputText)
|
|
||||||
speedBackend.reloadBaseStationIpAdress()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
width: parent.width
|
Component.onCompleted: {
|
||||||
height: !connectCol.baseConnected ? options_stack.delegateHeight:0
|
baseStationOptionsLd.sourceComponent = connectCol.baseConnected ? baseStationConnectedOptionsComp : baseStationDisconnectedOptionsComp
|
||||||
|
item.opacity = 1
|
||||||
|
item.scale = 1
|
||||||
|
}
|
||||||
|
|
||||||
visible: height > 5
|
sourceComponent: null
|
||||||
|
|
||||||
|
ParallelAnimation {
|
||||||
|
id: disappearAnim
|
||||||
|
|
||||||
Behavior on height {
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 400
|
property: "opacity"
|
||||||
easing.type: Easing.Linear
|
to: 0
|
||||||
|
duration: 100
|
||||||
|
target: baseStationOptionsLd.item
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SmoothSliderDelegate {
|
NumberAnimation {
|
||||||
id: baseStationVolumeDel
|
property: "scale"
|
||||||
text: qsTr("volume")
|
to: 0.95
|
||||||
|
duration: 100
|
||||||
|
target: baseStationOptionsLd.item
|
||||||
|
}
|
||||||
|
|
||||||
property bool active: connectCol.baseConnected
|
onRunningChanged: {
|
||||||
|
if(!running) {
|
||||||
width: parent.width
|
baseStationOptionsLd.sourceComponent = connectCol.baseConnected ? baseStationConnectedOptionsComp : baseStationDisconnectedOptionsComp
|
||||||
height: active ? options_stack.delegateHeight:0
|
appearAnim.start()
|
||||||
|
|
||||||
visible: height > 5
|
|
||||||
|
|
||||||
sliderValue: 0
|
|
||||||
|
|
||||||
onSliderFinished: {
|
|
||||||
speedBackend.writeSetting("soundVolume", sliderValue)
|
|
||||||
}
|
|
||||||
|
|
||||||
onActiveChanged: {
|
|
||||||
|
|
||||||
if(active){
|
|
||||||
var val = speedBackend.readSetting("soundVolume")
|
|
||||||
console.log(val)
|
|
||||||
if(val !== "false"){
|
|
||||||
sliderValue = parseFloat(val)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on height {
|
ParallelAnimation {
|
||||||
|
id: appearAnim
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 400
|
property: "opacity"
|
||||||
easing.type: Easing.Linear
|
from: 0
|
||||||
|
to: 1
|
||||||
|
duration: 100
|
||||||
|
target: baseStationOptionsLd.item
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberAnimation {
|
||||||
|
property: "scale"
|
||||||
|
from: 0.95
|
||||||
|
to: 1
|
||||||
|
duration: 100
|
||||||
|
target: baseStationOptionsLd.item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NextPageDelegate {
|
Component {
|
||||||
id: baseStationConnectionsDel
|
id: baseStationDisconnectedOptionsComp
|
||||||
text: qsTr("connected extensions")
|
|
||||||
|
|
||||||
width: parent.width
|
Column {
|
||||||
height: connectCol.baseConnected ? options_stack.delegateHeight:0
|
id: baseStationDisconnectedOptions
|
||||||
|
|
||||||
visible: height > 5
|
width: parentComp.width
|
||||||
|
|
||||||
|
opacity: 0 // opacity and scale are adjusted by baseStationOptionsLd
|
||||||
|
scale: 0.95
|
||||||
|
|
||||||
|
InputDelegate {
|
||||||
|
id: baseStationIpDel
|
||||||
|
|
||||||
|
text: qsTr("IP")
|
||||||
|
|
||||||
|
inputHint: "IP"
|
||||||
|
inputText: speedBackend.readSetting("baseStationIpAdress")
|
||||||
|
inputTextFieldWidth: width * 0.7
|
||||||
|
|
||||||
|
onInputTextChanged: {
|
||||||
|
speedBackend.writeSetting("baseStationIpAdress", inputText)
|
||||||
|
speedBackend.reloadBaseStationIpAdress()
|
||||||
|
}
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
|
visible: height > 5
|
||||||
|
|
||||||
|
Behavior on height {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 400
|
||||||
|
easing.type: Easing.Linear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SmoothItemDelegate {
|
||||||
|
id: baseStationHelpDel
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
|
text: qsTr("What is this for?")
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
Qt.openUrlExternally("https://itsblue.de/index.php/speed-climbing?ref=ScStwApp")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
options_stack.push(baseStationConnections)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on height {
|
}
|
||||||
NumberAnimation {
|
|
||||||
duration: 400
|
Component {
|
||||||
easing.type: Easing.Linear
|
id: baseStationConnectedOptionsComp
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: baseStationConnectedOptions
|
||||||
|
|
||||||
|
width: parentComp.width
|
||||||
|
|
||||||
|
opacity: 0 // opacity and scale are adjusted by baseStationOptionsLd
|
||||||
|
scale: 0.95
|
||||||
|
|
||||||
|
SmoothSliderDelegate {
|
||||||
|
id: baseStationVolumeDel
|
||||||
|
text: qsTr("Volume")
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
|
sliderValue: 0
|
||||||
|
|
||||||
|
onSliderFinished: {
|
||||||
|
speedBackend.writeSetting("soundVolume", sliderValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
var val = speedBackend.readSetting("soundVolume")
|
||||||
|
console.log(val)
|
||||||
|
if(val !== "false"){
|
||||||
|
sliderValue = parseFloat(val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on height {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 400
|
||||||
|
easing.type: Easing.Linear
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NextPageDelegate {
|
||||||
|
id: baseStationConnectionsDel
|
||||||
|
text: qsTr("Connected extensions")
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
height: options_stack.delegateHeight
|
||||||
|
|
||||||
|
visible: height > 5
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
options_stack.push(baseStationConnections)
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on height {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 400
|
||||||
|
easing.type: Easing.Linear
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ ItemDelegate {
|
||||||
property color textColor: appTheme.style.textColor
|
property color textColor: appTheme.style.textColor
|
||||||
property alias backgroundRect: backgroundRect
|
property alias backgroundRect: backgroundRect
|
||||||
|
|
||||||
|
font.pixelSize: height * 0.4
|
||||||
|
|
||||||
opacity: enabled ? 1 : 0.2
|
opacity: enabled ? 1 : 0.2
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
|
@ -31,7 +33,7 @@ ItemDelegate {
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
|
|
||||||
font.pixelSize: control.height * 0.4
|
font.pixelSize: control.font.pixelSize
|
||||||
|
|
||||||
minimumPixelSize: 1
|
minimumPixelSize: 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ SwitchDelegate {
|
||||||
width: parent.height
|
width: parent.height
|
||||||
height: parent.height
|
height: parent.height
|
||||||
radius: height * 0.5
|
radius: height * 0.5
|
||||||
color: parent.down ? "#cccccc" : "#ffffff"
|
color: parent.down ? appTheme.style.buttonPressedColor:appTheme.style.backgroundColor
|
||||||
border.color: parent.checked ? (parent.down ? "#17a81a" : "#21be2b") : "#999999"
|
border.color: parent.checked ? (parent.down ? "#17a81a" : "#21be2b") : "#999999"
|
||||||
Behavior on x{
|
Behavior on x{
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
10
qml/main.qml
10
qml/main.qml
|
@ -188,8 +188,8 @@ Window {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
elide: "ElideRight"
|
elide: "ElideRight"
|
||||||
color: speedBackend.timers[index]["state"] === "WON" ? appTheme.style.successColor :
|
color: ["WON"].includes(speedBackend.timers[index]["state"]) ? appTheme.style.successColor :
|
||||||
speedBackend.timers[index]["state"] === "LOST" ? appTheme.style.errorColor:
|
["LOST", "FAILED"].includes(speedBackend.timers[index]["state"]) ? appTheme.style.errorColor:
|
||||||
appTheme.style.textColor
|
appTheme.style.textColor
|
||||||
|
|
||||||
enabled: speedBackend.timers[index]["state"] !== "DISABLED"
|
enabled: speedBackend.timers[index]["state"] !== "DISABLED"
|
||||||
|
@ -205,12 +205,12 @@ Window {
|
||||||
|
|
||||||
minimumPixelSize: 1
|
minimumPixelSize: 1
|
||||||
|
|
||||||
Behavior on text {
|
/*Behavior on text {
|
||||||
enabled: app.state !== "RUNNING" && app.state !== "STOPPED"
|
enabled: !["RUNNING", "STOPPED", "WON", "LOST", "FAILED", "CANCELLED"].includes(app.state)
|
||||||
FadeAnimation {
|
FadeAnimation {
|
||||||
target: timerTextLa
|
target: timerTextLa
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
<file>graphics/icons/startpad.png</file>
|
<file>graphics/icons/startpad.png</file>
|
||||||
<file>graphics/icons/user_black.png</file>
|
<file>graphics/icons/user_black.png</file>
|
||||||
<file>graphics/icons/ok.png</file>
|
<file>graphics/icons/ok.png</file>
|
||||||
<file>sounds/IFSC_STARTSIGNAL_SAWTOOTH.wav</file>
|
|
||||||
<file>sounds/IFSC_STARTSIGNAL_SINE.wav</file>
|
<file>sounds/IFSC_STARTSIGNAL_SINE.wav</file>
|
||||||
<file>sounds/IFSC_STARTSIGNAL_SQUARE.wav</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -7,7 +7,7 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
|
||||||
{"backgroundColor", "#2d3037"},
|
{"backgroundColor", "#2d3037"},
|
||||||
|
|
||||||
{"buttonColor", "#202227"},
|
{"buttonColor", "#202227"},
|
||||||
{"buttonPressedColor", "#6ccaf2"},
|
{"buttonPressedColor", "#41454f"},
|
||||||
{"buttonBorderColor", "grey"},
|
{"buttonBorderColor", "grey"},
|
||||||
{"disabledButtonColor", "#555555"},
|
{"disabledButtonColor", "#555555"},
|
||||||
|
|
||||||
|
|
Reference in a new issue