Library migration #36

Merged
dorian merged 62 commits from library_migration into master 2024-10-17 17:52:36 +02:00
9 changed files with 86 additions and 37 deletions
Showing only changes of commit 33834884e8 - Show all commits

View file

@ -166,7 +166,6 @@ ToolBar {
function getLaneState(extensions) {
var batteryWarning = false;
for(var i = 0; i < extensions.length; i++) {
console.log(JSON.stringify(extensions[i]))
if(extensions[i]["state"] !== ScStw.ExtensionConnected || extensions[i]["batteryState"] === ScStw.BatteryCritical)
return 2
if(extensions[i]["batteryState"] === ScStw.BatteryWarning)

View file

@ -92,7 +92,7 @@ Popup {
Connections {
target: root
onOpened: {
function onOpened() {
profilesStack.init()
}
}

View file

@ -190,8 +190,7 @@ Column {
width: parent.width
height: parentObj.delegateHeight
scale: 0
visible: false
visible: true
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
@ -226,44 +225,19 @@ Column {
text: "Firmware: " + speedBackend.scStwClient.getFirmwareVersion() + " API: " + speedBackend.scStwClient.getApiVersion()
}
SmoothSliderDelegate {
id: baseStationVolumeDel
property ScStwSetting setting: scStwAppSettings.getSetting(ScStwSettings.SoundVolumeSetting, ScStwSettings.KeyLevel)
text: qsTr("volume")
NextPageDelegate {
text: qsTr("settings")
width: parent.width
height: parentObj.delegateHeight * 0.8
font.pixelSize: height * 0.5
sliderValue: setting.value
onSliderFinished: {
enabled = false
setting.value = sliderValue
enabled = true
onClicked: {
parentObj.push(baseStationSettings)
}
}
SmoothSwitchDelegate {
property ScStwSetting setting: scStwAppSettings.getSetting(ScStwSettings.CompetitionModeSetting, ScStwSettings.KeyLevel)
width: parent.width
height: parentObj.delegateHeight
checked: setting.value
onCheckedChanged: {
enabled = false
setting.value = checked
enabled = true
}
text: qsTr("competition mode")
}
NextPageDelegate {
text: qsTr("extensions")

View file

@ -0,0 +1,62 @@
import QtQuick 2.12
import QtMultimedia 5.8
import QtQuick.Window 2.2
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.4
import de.itsblue.ScStw 2.0
import de.itsblue.ScStw.Styling 2.0
import de.itsblue.ScStw.Styling.Components 1.0
import de.itsblue.ScStwApp 2.0
import "../components"
Column {
id: baseStationSettings
property var parentObj
property string title: "Bs settings"
width: parentObj.width
SmoothSliderDelegate {
id: baseStationVolumeDel
property ScStwSetting setting: scStwAppSettings.getSetting(ScStwSettings.SoundVolumeSetting, ScStwSettings.KeyLevel)
text: qsTr("volume")
width: parent.width
height: parentObj.delegateHeight
font.pixelSize: height * 0.5
sliderValue: setting.readonlyValue
onSliderFinished: {
enabled = false
setting.value = sliderValue
enabled = true
}
}
SmoothSwitchDelegate {
property ScStwSetting setting: scStwAppSettings.getSetting(ScStwSettings.CompetitionModeSetting, ScStwSettings.KeyLevel)
width: parent.width
height: parentObj.delegateHeight
checked: setting.readonlyValue
onClicked: {
enabled = false
setting.value = checked
enabled = true
}
text: qsTr("competition mode")
}
}

View file

@ -57,6 +57,14 @@ StackView {
}
}
Component {
id: baseStationSettings
SettingsBaseStationSettingsPage {
parentObj: control
}
}
/*-----Custom animations-----*/
pushEnter: Transition {
NumberAnimation {

View file

@ -94,8 +94,13 @@ DelayButton {
Connections {
target: control
onProgressChanged: canvas.requestPaint()
onOldStartProgressChanged: canvas.requestPaint()
function onProgressChanged() {
canvas.requestPaint()
}
function onOldStartProgressChanged() {
canvas.requestPaint()
}
}
onPaint: {

View file

@ -43,7 +43,7 @@ ItemDelegate {
background: Rectangle {
id: backgroundRect
color: control.down ? Qt.darker(control.color, 1.3) : control.color
color: control.down ? appTheme.theme.colors.delegatePressed : appTheme.theme.colors.delegateBackground
radius: height * 0.3

View file

@ -29,5 +29,6 @@
<file>components/StateIndicator.qml</file>
<file>components/BatteryIndicator.qml</file>
<file>components/ExtensionOverview.qml</file>
<file>SettingsDialog/SettingsBaseStationSettingsPage.qml</file>
</qresource>
</RCC>

@ -1 +1 @@
Subproject commit 92fae096726f559cf36a87816ab97093db555d8b
Subproject commit d37c5646f02712b8c88e98fc540c78158fca0cc0