Library migration #36
7 changed files with 27 additions and 13 deletions
|
@ -93,7 +93,9 @@ public slots:
|
|||
Q_INVOKABLE int getNextStartAction();
|
||||
|
||||
Q_INVOKABLE void writeSetting(QString key, QVariant value);
|
||||
Q_INVOKABLE void writeSetting(ScStw::BaseStationSetting key, QVariant value);
|
||||
Q_INVOKABLE QString readSetting(QString key);
|
||||
Q_INVOKABLE QString readSetting(ScStw::BaseStationSetting key);
|
||||
|
||||
Q_INVOKABLE void connectBaseStation();
|
||||
Q_INVOKABLE void disconnectBaseStation();
|
||||
|
|
|
@ -210,12 +210,12 @@ Column {
|
|||
|
||||
onSliderFinished: {
|
||||
enabled = false
|
||||
speedBackend.writeSetting("soundVolume", sliderValue)
|
||||
speedBackend.writeSetting("SoundVolume", sliderValue)
|
||||
enabled = true
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var val = speedBackend.readSetting("soundVolume")
|
||||
var val = speedBackend.readSetting("SoundVolume")
|
||||
if(val !== "false"){
|
||||
sliderValue = parseFloat(val)
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import QtQuick.Controls 2.2
|
|||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
import "../components"
|
||||
|
||||
Column {
|
||||
|
@ -37,10 +38,10 @@ Column {
|
|||
|
||||
text: qsTr("say 'ready'")
|
||||
|
||||
checked: parent.loadSetting("ready_en", ready_del) === "true"
|
||||
checked: parent.loadSetting("ReadySoundEnable", ready_del) === "true"
|
||||
|
||||
onCheckedChanged: {
|
||||
parent.updateSetting("ready_en", checked, ready_del)
|
||||
parent.updateSetting("ReadySoundEnable", checked, ready_del)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,10 +59,10 @@ Column {
|
|||
inputHint: qsTr("time")
|
||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||
|
||||
inputText: control.loadSetting("ready_delay", ready_delay_del)
|
||||
inputText: control.loadSetting("ReadySoundDelay", ready_delay_del)
|
||||
|
||||
onInputFinished: {
|
||||
control.updateSetting("ready_delay", inputText, ready_delay_del)
|
||||
control.updateSetting("ReadySoundDelay", inputText, ready_delay_del)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,10 +78,10 @@ Column {
|
|||
|
||||
text: qsTr("say 'at your marks'")
|
||||
|
||||
checked: control.loadSetting("at_marks_en", ready_del) === "true"
|
||||
checked: control.loadSetting("AtYourMarksSoundEnable", ready_del) === "true"
|
||||
|
||||
onCheckedChanged: {
|
||||
parent.updateSetting("at_marks_en",at_marks_del.checked, at_marks_del)
|
||||
parent.updateSetting("AtYourMarksSoundEnable", at_marks_del.checked, at_marks_del)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,10 +99,10 @@ Column {
|
|||
|
||||
enabled: !busy && at_marks_del.checked
|
||||
|
||||
inputText: control.loadSetting("at_marks_delay", at_marks_delay_del)
|
||||
inputText: control.loadSetting("AtYourMarksSoundDelay", at_marks_delay_del)
|
||||
|
||||
onInputFinished: {
|
||||
control.updateSetting("at_marks_delay", inputText, at_marks_delay_del)
|
||||
control.updateSetting("AtYourMarksSoundDelay", inputText, at_marks_delay_del)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -25,6 +25,5 @@
|
|||
<file>graphics/icons/user_black.png</file>
|
||||
<file>graphics/icons/ok.png</file>
|
||||
<file>sounds/IFSC_STARTSIGNAL_SINE.wav</file>
|
||||
<file>ScStwBasestation.sb64</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -585,6 +585,12 @@ void ClimbingRace::writeSetting(QString key, QVariant value) {
|
|||
}
|
||||
}
|
||||
|
||||
void ClimbingRace::writeSetting(ScStw::BaseStationSetting key, QVariant value) {
|
||||
if(ScStw::baseStationSettingToString(key) != "Invalid" ){
|
||||
this->writeSetting(ScStw::baseStationSettingToString(key), value);
|
||||
}
|
||||
}
|
||||
|
||||
QString ClimbingRace::readSetting(QString key) {
|
||||
if(this->mode == REMOTE && ScStw::baseStationSettingFromString(key) != ScStw::InvalidSetting){
|
||||
return this->scStwClient->readRemoteSetting(ScStw::baseStationSettingFromString(key));
|
||||
|
@ -594,6 +600,13 @@ QString ClimbingRace::readSetting(QString key) {
|
|||
}
|
||||
}
|
||||
|
||||
QString ClimbingRace::readSetting(ScStw::BaseStationSetting key) {
|
||||
if(ScStw::baseStationSettingToString(key) != "Invalid") {
|
||||
return this->readSetting(ScStw::baseStationSettingToString(key));
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
void ClimbingRace::connectBaseStation() {
|
||||
this->reloadBaseStationIpAdress();
|
||||
this->scStwClient->connectToHost();
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e7ecd6730fa988f078f8fc052e94086f5acbcdac
|
||||
Subproject commit b350f4636a898e6364181023f7bb51e9390794e9
|
Reference in a new issue