From 21c479cd559ab436707c875ec3c5576193922cf7 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Thu, 11 Aug 2022 08:47:22 +0200 Subject: [PATCH 1/3] Feat: add start numbers to speed flowchart (fixes #30) --- resources/qml/Components/SpeedFlowChart.qml | 54 ++++++++++++++++--- .../qml/Components/SpeedFlowChartPopup.qml | 2 +- resources/qml/main.qml | 1 + 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/resources/qml/Components/SpeedFlowChart.qml b/resources/qml/Components/SpeedFlowChart.qml index 26705fd..9aabc6d 100644 --- a/resources/qml/Components/SpeedFlowChart.qml +++ b/resources/qml/Components/SpeedFlowChart.qml @@ -222,7 +222,7 @@ Item { ListView { id: roundListView - property int columnWidth: height * 0.3 + property int columnWidth: height * 0.4 property int columnHeight: height anchors { @@ -386,8 +386,6 @@ Item { height: roundItem.tileSize //scale: 0.9 color: Material.dialogColor - border.color: "lightgrey" - border.width: 0 radius: height * 0.2 Column { @@ -409,13 +407,15 @@ Item { Label { Layout.preferredHeight: parent.height - Layout.preferredWidth: parent.width * 0.15 + Layout.preferredWidth: parent.width * 0.08 + + height: parent.height verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft - font.pixelSize: height * 0.7 - fontSizeMode: Text.Fit - minimumPixelSize: 1 + font.pixelSize: height * 0.4 + font.bold: true + opacity: 0.7 text: matchItm.thisMatchData[index] !== undefined ? ( @@ -428,7 +428,8 @@ Item { Label { Layout.preferredHeight: parent.height - Layout.fillWidth: true + Layout.maximumWidth: parent.width * 0.6 + height: parent.height @@ -443,13 +444,50 @@ Item { text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['firstname'] + " " + matchItm.thisMatchData[index]['lastname'] :"-" } + Rectangle { + Layout.preferredHeight: parent.height * 0.8 + Layout.preferredWidth: parent.width * 0.13 + + radius: height / 2 + + border.width: 1 + border.color: Material.frameColor + color: "transparent" + + Label { + anchors.fill: parent + + padding: parent.parent.height * 0.1 + leftPadding: padding * 2 + rightPadding: leftPadding + + font.pixelSize: parent.height * 0.5 + font.bold: true + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + + + text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]["start_number"]:"" + } + } + + Item { + Layout.fillHeight: true + Layout.fillWidth: true + } + Label { Layout.preferredHeight: parent.height + Layout.preferredWidth: parent.width * 0.15 height: parent.height verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignRight font.pixelSize: height * 0.5 + font.bold: matchItm.winnerIndex === index + + color: matchItm.winnerIndex === index ? Material.color(Material.Green):Material.primaryTextColor text: matchItm.thisMatchData[index] !== undefined && matchItm.thisMatchData[index]['result'+matchItm.thisRound] !== undefined ? ( parseFloat(matchItm.thisMatchData[index]['result'+matchItm.thisRound]) ? diff --git a/resources/qml/Components/SpeedFlowChartPopup.qml b/resources/qml/Components/SpeedFlowChartPopup.qml index 3200d82..ccd8e07 100644 --- a/resources/qml/Components/SpeedFlowChartPopup.qml +++ b/resources/qml/Components/SpeedFlowChartPopup.qml @@ -9,7 +9,7 @@ Rectangle { // always unlock in debug mode //property bool unlocked: QT_DEBUG || appSettings.read("speedBackendPurchase") === "1" - property bool unlocked: appSettings.read("speedBackendPurchase") === "1" + property bool unlocked: true //appSettings.read("speedBackendPurchase") === "1" Component.onCompleted: { console.warn("unlocked:", appSettings.read("speedBackendPurchase")) diff --git a/resources/qml/main.qml b/resources/qml/main.qml index 72c8c6c..2aad106 100644 --- a/resources/qml/main.qml +++ b/resources/qml/main.qml @@ -199,6 +199,7 @@ Window { //openWidget({person: 6623}) //console.log(JSON.stringify(serverConn.getParamsFromUrl(""))) //openWidgetFromUrl("https://l.bluerock.dev/?comp=11501&cat=GER_M") + openWidgetFromUrl("https://www.digitalrock.de/egroupware/ranking/json.php?cat=12&comp=12171&type=") } FontLoader { -- 2.45.2 From a1ea8a4c65bee90a3933a0bc1116b93b6d79e7ff Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Thu, 11 Aug 2022 08:49:37 +0200 Subject: [PATCH 2/3] Fix: don't unlock speed flowchart --- resources/qml/Components/SpeedFlowChartPopup.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Components/SpeedFlowChartPopup.qml b/resources/qml/Components/SpeedFlowChartPopup.qml index ccd8e07..3200d82 100644 --- a/resources/qml/Components/SpeedFlowChartPopup.qml +++ b/resources/qml/Components/SpeedFlowChartPopup.qml @@ -9,7 +9,7 @@ Rectangle { // always unlock in debug mode //property bool unlocked: QT_DEBUG || appSettings.read("speedBackendPurchase") === "1" - property bool unlocked: true //appSettings.read("speedBackendPurchase") === "1" + property bool unlocked: appSettings.read("speedBackendPurchase") === "1" Component.onCompleted: { console.warn("unlocked:", appSettings.read("speedBackendPurchase")) -- 2.45.2 From 0920ee6f77ccb88bd4fa5c313e0d65e871ca3da3 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Thu, 11 Aug 2022 08:51:05 +0200 Subject: [PATCH 3/3] Fix: don't go to comp on start --- resources/qml/main.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/main.qml b/resources/qml/main.qml index 2aad106..8e33191 100644 --- a/resources/qml/main.qml +++ b/resources/qml/main.qml @@ -199,7 +199,7 @@ Window { //openWidget({person: 6623}) //console.log(JSON.stringify(serverConn.getParamsFromUrl(""))) //openWidgetFromUrl("https://l.bluerock.dev/?comp=11501&cat=GER_M") - openWidgetFromUrl("https://www.digitalrock.de/egroupware/ranking/json.php?cat=12&comp=12171&type=") + //openWidgetFromUrl("https://www.digitalrock.de/egroupware/ranking/json.php?cat=12&comp=12171&type=") } FontLoader { -- 2.45.2