Compare commits
No commits in common. "main" and "v0.7.1" have entirely different histories.
14 changed files with 362 additions and 484 deletions
|
@ -7,7 +7,7 @@ steps:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: build app
|
- name: build app
|
||||||
image: itsblue.dev/plugins/qt-android:5.15.5-4
|
image: itsblue.dev/plugins/qt-android:5.15.5-3
|
||||||
settings:
|
settings:
|
||||||
qmake_arguments: "CONFIG+=release"
|
qmake_arguments: "CONFIG+=release"
|
||||||
androiddeployqt_arguments: "--android-platform android-31 --aab"
|
androiddeployqt_arguments: "--android-platform android-31 --aab"
|
||||||
|
|
|
@ -3,14 +3,6 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
# [0.8.0] - 2023-06-05
|
|
||||||
### Added
|
|
||||||
- Show both results in speed quali
|
|
||||||
|
|
||||||
# [0.7.3] - 2023-05-02
|
|
||||||
### Removed
|
|
||||||
- Im-App purchase on android
|
|
||||||
|
|
||||||
# [0.7.1] - 2022-08-22
|
# [0.7.1] - 2022-08-22
|
||||||
### Fixed
|
### Fixed
|
||||||
- remove unused ACCESS_FINE_LOCATION permission
|
- remove unused ACCESS_FINE_LOCATION permission
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true" android:icon="@drawable/icon">
|
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true" android:icon="@drawable/icon">
|
||||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="de.itsblue.blueROCK.MainActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleInstance" android:exported="true">
|
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="de.itsblue.blueROCK.MainActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleInstance">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
<uses-permission android:name="com.android.vending.BILLING"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
<uses-permission android:name="android.permission.CAMERA"/>
|
<uses-permission android:name="android.permission.CAMERA"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
QT += quick qml quickcontrols2
|
QT += quick qml quickcontrols2 purchasing
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
VERSION = 0.8.0
|
VERSION = 0.7.2
|
||||||
TARGET = blueROCK
|
TARGET = blueROCK
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
|
@ -89,7 +89,7 @@ android {
|
||||||
|
|
||||||
ANDROID_VERSION_NAME = $$VERSION
|
ANDROID_VERSION_NAME = $$VERSION
|
||||||
ANDROID_VERSION_CODE = $$droidVersionCode($$ANDROID_VERSION_NAME)
|
ANDROID_VERSION_CODE = $$droidVersionCode($$ANDROID_VERSION_NAME)
|
||||||
ANDROID_TARGET_SDK_VERSION = 31
|
ANDROID_TARGET_SDK_VERSION = 30
|
||||||
|
|
||||||
ANDROID_HOME = $$(ANDROID_HOME)
|
ANDROID_HOME = $$(ANDROID_HOME)
|
||||||
include($$ANDROID_HOME/android_openssl/openssl.pri)
|
include($$ANDROID_HOME/android_openssl/openssl.pri)
|
||||||
|
@ -97,7 +97,6 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
ios {
|
ios {
|
||||||
QT += purchasing
|
|
||||||
OBJECTIVE_SOURCES += sources/shareUtils/ios/iosshareutils.mm \
|
OBJECTIVE_SOURCES += sources/shareUtils/ios/iosshareutils.mm \
|
||||||
sources/iospermissionutils.mm \
|
sources/iospermissionutils.mm \
|
||||||
sources/shareUtils/ios/docviewcontroller.mm
|
sources/shareUtils/ios/docviewcontroller.mm
|
||||||
|
|
2
qzxing
2
qzxing
|
@ -1 +1 @@
|
||||||
Subproject commit 6ea2b31e26db9d43db027ba207f5c73dc9d759fc
|
Subproject commit cfc728583b867e157bd27e8b7c239c05a081e562
|
|
@ -1,262 +0,0 @@
|
||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
import QtQuick.Controls.Material 2.15
|
|
||||||
|
|
||||||
Row {
|
|
||||||
id: multiResRow
|
|
||||||
|
|
||||||
property bool active: parseInt(widgetData[ "route_order" ]) > -1 && boulderResRep.model > 0
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: active ? parent.width * 0.75:0
|
|
||||||
|
|
||||||
enabled: parseInt(widgetData[ "route_order" ]) > -1 && boulderResRep.model > 0
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
id: boulderResRep
|
|
||||||
model: parseInt(widgetData[ "route_num_problems" ])
|
|
||||||
|
|
||||||
function getDataForIcon(index){
|
|
||||||
// TODO: clean
|
|
||||||
var resultString = widgetData[ "participants" ][partDel.thisIndex]["boulder"+(index+1)]
|
|
||||||
var numTrys = widgetData[ "participants" ][partDel.thisIndex]["try"+(index+1)]
|
|
||||||
|
|
||||||
var resultList = []
|
|
||||||
|
|
||||||
if (resultString !== undefined) {
|
|
||||||
resultString = resultString.replace("t", "")
|
|
||||||
resultString = resultString.replace("z", "")
|
|
||||||
resultString = resultString.replace("b", "")
|
|
||||||
resultList = resultString.split(" ")
|
|
||||||
|
|
||||||
while (resultList.length < 2){
|
|
||||||
resultList.unshift(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
resultList = [-1,-1]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (numTrys !== undefined) {
|
|
||||||
resultList.push(numTrys)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
resultList.push(-1)
|
|
||||||
}
|
|
||||||
|
|
||||||
return resultList
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: Item {
|
|
||||||
id: boulderResItm
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
width: parent.width / ( boulderResRep.model )
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
Canvas {
|
|
||||||
id: boulderResCv
|
|
||||||
|
|
||||||
property var resultData: boulderResRep.getDataForIcon(index)
|
|
||||||
|
|
||||||
onResultDataChanged: {
|
|
||||||
boulderResCv.requestPaint()
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
height: parent.height > parent.width ? parent.width * 0.9:parent.height * 0.9
|
|
||||||
width: height
|
|
||||||
|
|
||||||
onPaint: {
|
|
||||||
var width = 24//boulderResCv.width * 0.9
|
|
||||||
var height = width
|
|
||||||
|
|
||||||
var radius = width * 0.3
|
|
||||||
|
|
||||||
var offsetX = width * 0.05
|
|
||||||
var offsetY = height * 0.05
|
|
||||||
|
|
||||||
//console.log("drawing result rect with width: " + width + " and height: " + height)
|
|
||||||
|
|
||||||
var context = getContext("2d");
|
|
||||||
|
|
||||||
// clear all remainings from other routes
|
|
||||||
context.clearRect(0, 0, width, height);
|
|
||||||
|
|
||||||
context.beginPath();
|
|
||||||
|
|
||||||
context.moveTo(0 + offsetX + radius, 0 + offsetY);
|
|
||||||
|
|
||||||
// top line
|
|
||||||
context.lineTo(width - radius + offsetX, 0 + offsetY);
|
|
||||||
// top right corner
|
|
||||||
context.arc(width-radius + offsetX, radius + offsetY, radius, 1.5 * Math.PI, 0);
|
|
||||||
// right line
|
|
||||||
context.lineTo(width + offsetX, height - radius + offsetY);
|
|
||||||
// bottom right corner
|
|
||||||
context.arc(width-radius + offsetX, height - radius + offsetY, radius, 0, 0.5 * Math.PI);
|
|
||||||
// bottom line
|
|
||||||
context.lineTo(0 + radius + offsetX, height + offsetY);
|
|
||||||
// bottom left corner
|
|
||||||
context.arc(radius + offsetY, height - radius + offsetY, radius, 0.5 * Math.PI, Math.PI);
|
|
||||||
// left line
|
|
||||||
context.lineTo(0 + offsetX, radius + offsetY);
|
|
||||||
// top left corner
|
|
||||||
context.arc(radius + offsetX, radius + offsetY, radius, Math.PI, 1.5 * Math.PI);
|
|
||||||
|
|
||||||
// fill
|
|
||||||
if(resultData[0] !== -1 || resultData[2] !== -1) {
|
|
||||||
// if there is a result available -> draw background
|
|
||||||
context.fillStyle = "#b7b7b7";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
context.fillStyle = "transparent";
|
|
||||||
}
|
|
||||||
|
|
||||||
context.fill();
|
|
||||||
|
|
||||||
// outline
|
|
||||||
context.lineWidth = 1;
|
|
||||||
context.strokeStyle = Material.primaryTextColor;
|
|
||||||
context.stroke();
|
|
||||||
|
|
||||||
if(resultData[1] > 0){
|
|
||||||
|
|
||||||
// the first triangle
|
|
||||||
context.beginPath();
|
|
||||||
|
|
||||||
// top right corner
|
|
||||||
context.arc(width-radius + offsetX, radius + offsetY, radius, 1.75 * Math.PI, 0);
|
|
||||||
|
|
||||||
// right line
|
|
||||||
context.lineTo(width + offsetX, height - radius + offsetY);
|
|
||||||
|
|
||||||
// bottom right corner
|
|
||||||
context.arc(width-radius + offsetX, height - radius + offsetY, radius, 0, 0.5 * Math.PI);
|
|
||||||
|
|
||||||
// bottom line
|
|
||||||
context.lineTo(0 + radius + offsetX, height + offsetY);
|
|
||||||
// bottom left corner
|
|
||||||
context.arc(radius + offsetX, height - radius + offsetY, radius, 0.5 * Math.PI, 0.75 * Math.PI);
|
|
||||||
context.closePath();
|
|
||||||
|
|
||||||
context.fillStyle = "#44ed38";
|
|
||||||
context.fill();
|
|
||||||
|
|
||||||
// outline
|
|
||||||
context.lineWidth = 1;
|
|
||||||
context.strokeStyle = Material.primaryTextColor;
|
|
||||||
context.stroke();
|
|
||||||
|
|
||||||
|
|
||||||
if(resultData[0] > 0){
|
|
||||||
// the second triangle
|
|
||||||
context.beginPath();
|
|
||||||
// bottom left corner
|
|
||||||
context.arc(radius + offsetX, height - radius + offsetY, radius, 0.75 * Math.PI, 1 * Math.PI);
|
|
||||||
// left line
|
|
||||||
context.lineTo(0 + offsetX, radius + offsetY);
|
|
||||||
// top left corner
|
|
||||||
context.arc(radius + offsetX, radius + offsetY, radius, Math.PI, 1.5 * Math.PI);
|
|
||||||
// top line
|
|
||||||
context.lineTo(width - radius + offsetX, 0 + offsetY);
|
|
||||||
// top right corner
|
|
||||||
context.arc(width-radius + offsetX, radius + offsetY, radius, 1.5 * Math.PI, 1.75 * Math.PI);
|
|
||||||
|
|
||||||
context.closePath();
|
|
||||||
|
|
||||||
context.fillStyle = "#44ed38";
|
|
||||||
context.fill();
|
|
||||||
|
|
||||||
// outline
|
|
||||||
context.lineWidth = 1;
|
|
||||||
context.strokeStyle = Material.primaryTextColor;
|
|
||||||
context.stroke();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: boulderResTrysLa
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
height: parent.height / 2
|
|
||||||
width: parent.width / 2
|
|
||||||
|
|
||||||
visible: !boulderResZoneLa.visible && boulderResCv.resultData[2] > 0
|
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
|
||||||
font.pixelSize: height
|
|
||||||
minimumPixelSize: 1
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
|
|
||||||
color: "#dd000000"
|
|
||||||
|
|
||||||
text: boulderResCv.resultData[2]
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: boulderResZoneLa
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
right: parent.right
|
|
||||||
bottom: parent.bottom
|
|
||||||
margins: boulderResCv.height * 0.05
|
|
||||||
}
|
|
||||||
|
|
||||||
height: parent.height / 2
|
|
||||||
width: parent.width / 2
|
|
||||||
|
|
||||||
visible: parseInt(text) > 0
|
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
|
||||||
font.pixelSize: height
|
|
||||||
minimumPixelSize: 1
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
|
|
||||||
color: "#dd000000"
|
|
||||||
|
|
||||||
text: boulderResCv.resultData[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: boulderResTopLa
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
top: parent.top
|
|
||||||
margins: boulderResCv.height * 0.05
|
|
||||||
}
|
|
||||||
|
|
||||||
height: parent.height / 2
|
|
||||||
width: parent.width / 2
|
|
||||||
|
|
||||||
visible: parseInt(text) > 0
|
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
|
||||||
font.pixelSize: height
|
|
||||||
minimumPixelSize: 1
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
|
|
||||||
color: "#dd000000"
|
|
||||||
|
|
||||||
text: boulderResCv.resultData[0]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,97 +0,0 @@
|
||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
import QtQuick.Controls.Material 2.15
|
|
||||||
|
|
||||||
Row {
|
|
||||||
id: multiGenResRow
|
|
||||||
|
|
||||||
property bool active: (parseInt(widgetData[ "route_order" ]) === -1) && (generalResRep.model > 0)
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: active ? parent.width - resultLa.width:0
|
|
||||||
|
|
||||||
enabled: active
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
id: generalResRep
|
|
||||||
|
|
||||||
property var routes: getRoutes()
|
|
||||||
model: routes.length
|
|
||||||
|
|
||||||
function getRoutes() {
|
|
||||||
|
|
||||||
var obj = widgetData["route_names"]
|
|
||||||
var routes = []
|
|
||||||
|
|
||||||
for(var prop in obj) {
|
|
||||||
// go through the whole array and search for data keys
|
|
||||||
if (obj.hasOwnProperty(prop) && prop > -1) {
|
|
||||||
routes.push([prop, obj[prop]])
|
|
||||||
//console.log("found " + obj[prop] + " at index " + prop)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
routes.sort(function(a, b) {
|
|
||||||
return a[0] - b[0];
|
|
||||||
});
|
|
||||||
|
|
||||||
return routes
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: Item {
|
|
||||||
id: boulderGenResItm
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
width: parent.width / ( generalResRep.model )
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
visible: multiGenResRow.active
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 1
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
visible: index === 0
|
|
||||||
|
|
||||||
color: Material.primaryTextColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors {
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 1
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
color: Material.primaryTextColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: boulderGenResLa
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width * 0.9
|
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
|
||||||
font.pixelSize: Math.abs( height * 0.6 )
|
|
||||||
minimumPixelSize: 1
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
|
|
||||||
text: widgetData["participants"][partDel.thisIndex]["result"+(generalResRep.routes[index][0])] === undefined ?
|
|
||||||
"":
|
|
||||||
widgetData[ "participants" ][partDel.thisIndex]["result"+(generalResRep.routes[index][0])]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -33,19 +33,6 @@ ColoredItemDelegate {
|
||||||
NumberAnimation { target: partDel; property: "scale"; from: 0.8; to: 1.0; duration: 400 }
|
NumberAnimation { target: partDel; property: "scale"; from: 0.8; to: 1.0; duration: 400 }
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
visible: widgetData["route_quota"] !== null && parseInt(widgetData["route_quota"]) - 1 === thisIndex
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
verticalCenter: parent.bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
height: 3
|
|
||||||
color: Material.primaryTextColor
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: partDelCol
|
id: partDelCol
|
||||||
|
|
||||||
|
@ -120,29 +107,370 @@ ColoredItemDelegate {
|
||||||
Layout.preferredWidth: partDelCol.showSideBySide ? parent.width * 0.5 : parent.width
|
Layout.preferredWidth: partDelCol.showSideBySide ? parent.width * 0.5 : parent.width
|
||||||
Layout.preferredHeight: partDelCol.showSideBySide ? parent.height : parent.height * 0.5
|
Layout.preferredHeight: partDelCol.showSideBySide ? parent.height : parent.height * 0.5
|
||||||
|
|
||||||
visible: boulderResRow.active || generalResRow.active || speedQualificationResRow.active || resultLa.active
|
visible: multiResRow.active || multiGenResRow.active || resultLa.acitve
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: multiResRow
|
||||||
|
|
||||||
|
property bool active: parseInt(widgetData[ "route_order" ]) > -1 && boulderResRep.model > 0
|
||||||
|
|
||||||
|
height: parent.height
|
||||||
|
width: active ? parent.width * 0.75:0
|
||||||
|
|
||||||
|
enabled: parseInt(widgetData[ "route_order" ]) > -1 && boulderResRep.model > 0
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: boulderResRep
|
||||||
|
model: parseInt(widgetData[ "route_num_problems" ])
|
||||||
|
|
||||||
|
function getDataForIcon(index){
|
||||||
|
// TODO: clean
|
||||||
|
var resultString = widgetData[ "participants" ][partDel.thisIndex]["boulder"+(index+1)]
|
||||||
|
var numTrys = widgetData[ "participants" ][partDel.thisIndex]["try"+(index+1)]
|
||||||
|
|
||||||
|
var resultList = []
|
||||||
|
|
||||||
|
if (resultString !== undefined) {
|
||||||
|
resultString = resultString.replace("t", "")
|
||||||
|
resultString = resultString.replace("z", "")
|
||||||
|
resultString = resultString.replace("b", "")
|
||||||
|
resultList = resultString.split(" ")
|
||||||
|
|
||||||
|
while (resultList.length < 2){
|
||||||
|
resultList.unshift(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
resultList = [-1,-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numTrys !== undefined) {
|
||||||
|
resultList.push(numTrys)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
resultList.push(-1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultList
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate: Item {
|
||||||
|
id: boulderResItm
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
width: parent.width / ( boulderResRep.model )
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
Canvas {
|
||||||
|
id: boulderResCv
|
||||||
|
|
||||||
|
property var resultData: boulderResRep.getDataForIcon(index)
|
||||||
|
|
||||||
|
onResultDataChanged: {
|
||||||
|
boulderResCv.requestPaint()
|
||||||
|
}
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
height: parent.height > parent.width ? parent.width * 0.9:parent.height * 0.9
|
||||||
|
width: height
|
||||||
|
|
||||||
|
onPaint: {
|
||||||
|
var width = 24//boulderResCv.width * 0.9
|
||||||
|
var height = width
|
||||||
|
|
||||||
|
var radius = width * 0.3
|
||||||
|
|
||||||
|
var offsetX = width * 0.05
|
||||||
|
var offsetY = height * 0.05
|
||||||
|
|
||||||
|
//console.log("drawing result rect with width: " + width + " and height: " + height)
|
||||||
|
|
||||||
|
var context = getContext("2d");
|
||||||
|
|
||||||
|
// clear all remainings from other routes
|
||||||
|
context.clearRect(0, 0, width, height);
|
||||||
|
|
||||||
|
context.beginPath();
|
||||||
|
|
||||||
|
context.moveTo(0 + offsetX + radius, 0 + offsetY);
|
||||||
|
|
||||||
|
// top line
|
||||||
|
context.lineTo(width - radius + offsetX, 0 + offsetY);
|
||||||
|
// top right corner
|
||||||
|
context.arc(width-radius + offsetX, radius + offsetY, radius, 1.5 * Math.PI, 0);
|
||||||
|
// right line
|
||||||
|
context.lineTo(width + offsetX, height - radius + offsetY);
|
||||||
|
// bottom right corner
|
||||||
|
context.arc(width-radius + offsetX, height - radius + offsetY, radius, 0, 0.5 * Math.PI);
|
||||||
|
// bottom line
|
||||||
|
context.lineTo(0 + radius + offsetX, height + offsetY);
|
||||||
|
// bottom left corner
|
||||||
|
context.arc(radius + offsetY, height - radius + offsetY, radius, 0.5 * Math.PI, Math.PI);
|
||||||
|
// left line
|
||||||
|
context.lineTo(0 + offsetX, radius + offsetY);
|
||||||
|
// top left corner
|
||||||
|
context.arc(radius + offsetX, radius + offsetY, radius, Math.PI, 1.5 * Math.PI);
|
||||||
|
|
||||||
|
// fill
|
||||||
|
if(resultData[0] !== -1 || resultData[2] !== -1) {
|
||||||
|
// if there is a result available -> draw background
|
||||||
|
context.fillStyle = "#b7b7b7";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
context.fillStyle = "transparent";
|
||||||
|
}
|
||||||
|
|
||||||
|
context.fill();
|
||||||
|
|
||||||
|
// outline
|
||||||
|
context.lineWidth = 1;
|
||||||
|
context.strokeStyle = Material.primaryTextColor;
|
||||||
|
context.stroke();
|
||||||
|
|
||||||
|
if(resultData[1] > 0){
|
||||||
|
|
||||||
|
// the first triangle
|
||||||
|
context.beginPath();
|
||||||
|
|
||||||
|
// top right corner
|
||||||
|
context.arc(width-radius + offsetX, radius + offsetY, radius, 1.75 * Math.PI, 0);
|
||||||
|
|
||||||
|
// right line
|
||||||
|
context.lineTo(width + offsetX, height - radius + offsetY);
|
||||||
|
|
||||||
|
// bottom right corner
|
||||||
|
context.arc(width-radius + offsetX, height - radius + offsetY, radius, 0, 0.5 * Math.PI);
|
||||||
|
|
||||||
|
// bottom line
|
||||||
|
context.lineTo(0 + radius + offsetX, height + offsetY);
|
||||||
|
// bottom left corner
|
||||||
|
context.arc(radius + offsetX, height - radius + offsetY, radius, 0.5 * Math.PI, 0.75 * Math.PI);
|
||||||
|
context.closePath();
|
||||||
|
|
||||||
|
context.fillStyle = "#44ed38";
|
||||||
|
context.fill();
|
||||||
|
|
||||||
|
// outline
|
||||||
|
context.lineWidth = 1;
|
||||||
|
context.strokeStyle = Material.primaryTextColor;
|
||||||
|
context.stroke();
|
||||||
|
|
||||||
|
|
||||||
|
if(resultData[0] > 0){
|
||||||
|
// the second triangle
|
||||||
|
context.beginPath();
|
||||||
|
// bottom left corner
|
||||||
|
context.arc(radius + offsetX, height - radius + offsetY, radius, 0.75 * Math.PI, 1 * Math.PI);
|
||||||
|
// left line
|
||||||
|
context.lineTo(0 + offsetX, radius + offsetY);
|
||||||
|
// top left corner
|
||||||
|
context.arc(radius + offsetX, radius + offsetY, radius, Math.PI, 1.5 * Math.PI);
|
||||||
|
// top line
|
||||||
|
context.lineTo(width - radius + offsetX, 0 + offsetY);
|
||||||
|
// top right corner
|
||||||
|
context.arc(width-radius + offsetX, radius + offsetY, radius, 1.5 * Math.PI, 1.75 * Math.PI);
|
||||||
|
|
||||||
|
context.closePath();
|
||||||
|
|
||||||
|
context.fillStyle = "#44ed38";
|
||||||
|
context.fill();
|
||||||
|
|
||||||
|
// outline
|
||||||
|
context.lineWidth = 1;
|
||||||
|
context.strokeStyle = Material.primaryTextColor;
|
||||||
|
context.stroke();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: boulderResTrysLa
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
height: parent.height / 2
|
||||||
|
width: parent.width / 2
|
||||||
|
|
||||||
|
visible: !boulderResZoneLa.visible && boulderResCv.resultData[2] > 0
|
||||||
|
|
||||||
|
fontSizeMode: Text.Fit
|
||||||
|
font.pixelSize: height
|
||||||
|
minimumPixelSize: 1
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
color: "#dd000000"
|
||||||
|
|
||||||
|
text: boulderResCv.resultData[2]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: boulderResZoneLa
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
margins: boulderResCv.height * 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
height: parent.height / 2
|
||||||
|
width: parent.width / 2
|
||||||
|
|
||||||
|
visible: parseInt(text) > 0
|
||||||
|
|
||||||
|
fontSizeMode: Text.Fit
|
||||||
|
font.pixelSize: height
|
||||||
|
minimumPixelSize: 1
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
color: "#dd000000"
|
||||||
|
|
||||||
|
text: boulderResCv.resultData[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: boulderResTopLa
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
top: parent.top
|
||||||
|
margins: boulderResCv.height * 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
height: parent.height / 2
|
||||||
|
width: parent.width / 2
|
||||||
|
|
||||||
|
visible: parseInt(text) > 0
|
||||||
|
|
||||||
|
fontSizeMode: Text.Fit
|
||||||
|
font.pixelSize: height
|
||||||
|
minimumPixelSize: 1
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
color: "#dd000000"
|
||||||
|
|
||||||
|
text: boulderResCv.resultData[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
BoulderResultRow {
|
|
||||||
id: boulderResRow
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneralResultRow {
|
Row {
|
||||||
id: generalResRow
|
id: multiGenResRow
|
||||||
}
|
|
||||||
|
|
||||||
SpeedQualificationResultRow {
|
property bool active: ((parseInt(widgetData[ "route_order" ]) === -1) && (generalResRep.model > 0)) ? true:false
|
||||||
id: speedQualificationResRow
|
|
||||||
|
height: parent.height
|
||||||
|
width: active ? parent.width - resultLa.width:0
|
||||||
|
|
||||||
|
enabled: ((parseInt(widgetData[ "route_order" ]) === -1) && (generalResRep.model > 0)) ? true:false
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: generalResRep
|
||||||
|
|
||||||
|
property var routes: getRoutes()
|
||||||
|
model: routes.length
|
||||||
|
|
||||||
|
function getRoutes() {
|
||||||
|
|
||||||
|
var obj = widgetData["route_names"]
|
||||||
|
var routes = []
|
||||||
|
|
||||||
|
for(var prop in obj) {
|
||||||
|
// go through the whole array and search for data keys
|
||||||
|
if (obj.hasOwnProperty(prop) && prop > -1) {
|
||||||
|
routes.push([prop, obj[prop]])
|
||||||
|
//console.log("found " + obj[prop] + " at index " + prop)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
routes.sort(function(a, b) {
|
||||||
|
return a[0] - b[0];
|
||||||
|
});
|
||||||
|
|
||||||
|
return routes
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate: Item {
|
||||||
|
id: boulderGenResItm
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
width: parent.width / ( generalResRep.model )
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
visible: multiGenResRow.active
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
}
|
||||||
|
|
||||||
|
width: 1
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
visible: index === 0
|
||||||
|
|
||||||
|
color: Material.primaryTextColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors {
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
width: 1
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
color: Material.primaryTextColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: boulderGenResLa
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width * 0.9
|
||||||
|
|
||||||
|
fontSizeMode: Text.Fit
|
||||||
|
font.pixelSize: Math.abs( height * 0.6 )
|
||||||
|
minimumPixelSize: 1
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
|
text: widgetData["participants"][partDel.thisIndex]["result"+(generalResRep.routes[index][0])] === undefined ?
|
||||||
|
"":
|
||||||
|
widgetData[ "participants" ][partDel.thisIndex]["result"+(generalResRep.routes[index][0])]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: resultLa
|
id: resultLa
|
||||||
|
|
||||||
property bool active: ( parseInt(widgetData[ "route_num_problems" ]) > 0 || widgetData["discipline"] !== "boulder" ) && parseInt(widgetData[ "route_order" ]) > -1 && !speedQualificationResRow.active
|
property bool acitve: ( boulderResRep.model > 0 || widgetData["discipline"] !== "boulder" ) && parseInt(widgetData[ "route_order" ]) > -1
|
||||||
|
|
||||||
width: enabled ? parent.width * 0.25:0
|
width: enabled ? parent.width * 0.25:0
|
||||||
height: enabled ? parent.height:0
|
height: enabled ? parent.height:0
|
||||||
|
|
||||||
enabled: active
|
enabled: ( boulderResRep.model > 0 || widgetData["discipline"] !== "boulder" ) && parseInt(widgetData[ "route_order" ]) > -1
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QZXing 3.3
|
import QZXing 3.1
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
|
|
|
@ -9,7 +9,7 @@ Rectangle {
|
||||||
|
|
||||||
// always unlock in debug mode
|
// always unlock in debug mode
|
||||||
//property bool unlocked: QT_DEBUG || appSettings.read("speedBackendPurchase") === "1"
|
//property bool unlocked: QT_DEBUG || appSettings.read("speedBackendPurchase") === "1"
|
||||||
property bool unlocked: Qt.platform.os !== "iso" || appSettings.read("speedBackendPurchase") === "1"
|
property bool unlocked: appSettings.read("speedBackendPurchase") === "1"
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
console.warn("unlocked:", appSettings.read("speedBackendPurchase"))
|
console.warn("unlocked:", appSettings.read("speedBackendPurchase"))
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
import QtQuick.Controls.Material 2.15
|
|
||||||
|
|
||||||
Row {
|
|
||||||
id: control
|
|
||||||
|
|
||||||
property bool active: (parseInt(widgetData[ "route_order" ]) === 0) && (widgetData["discipline"] === "speed") && (thisData["result_l"] !== undefined || thisData["result_r"] !== undefined)
|
|
||||||
property var thisData: widgetData["participants"][partDel.thisIndex]
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: active ? parent.width - resultLa.width:0
|
|
||||||
|
|
||||||
enabled: active
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
id: generalResRep
|
|
||||||
|
|
||||||
model: 2
|
|
||||||
|
|
||||||
delegate: Item {
|
|
||||||
id: boulderGenResItm
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
width: parent.width / ( generalResRep.model )
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
visible: control.active
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 1
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
visible: index === 0
|
|
||||||
|
|
||||||
color: Material.primaryTextColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors {
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 1
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
color: Material.primaryTextColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
id: boulderGenResLa
|
|
||||||
|
|
||||||
property string thisKey: "result_"+(["l", "r"][index])
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width * 0.9
|
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
|
||||||
font.pixelSize: Math.abs( height * 0.6 )
|
|
||||||
minimumPixelSize: 1
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
font.bold: thisData["result_l"] !== undefined && thisData["result_r"] !== undefined && thisData[thisKey] === thisData["result"]
|
|
||||||
|
|
||||||
text: (control.thisData[thisKey] !== undefined && parseInt(control.thisData[thisKey]) > 0) ? control.thisData[thisKey] : ""
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QZXing 3.3
|
import QZXing 3.1
|
||||||
import QtMultimedia 5.12
|
import QtMultimedia 5.12
|
||||||
import QtQuick.Shapes 1.12
|
import QtQuick.Shapes 1.12
|
||||||
import QtQuick.Controls.Material 2.12
|
import QtQuick.Controls.Material 2.12
|
||||||
|
|
|
@ -171,7 +171,7 @@ Page {
|
||||||
id: aboutBluerockDisclaimerDialog
|
id: aboutBluerockDisclaimerDialog
|
||||||
Material.theme: root.Material.theme
|
Material.theme: root.Material.theme
|
||||||
//% "privacy policy"
|
//% "privacy policy"
|
||||||
title: "blueROCK v" + APP_VERSION + "<br>By <a href=\"https://itsblue.de\">Itsblue Development</a>, <a href=\"https://itsblue.de/apps/bluerock/privacypolicy.html\">" + qsTrId("#privacyPolicy") + "</a>"
|
title: "blueROCK v" + APP_VERSION + "<br>By <a href=\"https://itsblue.de\">Itsblue Development</a>, <a href=\"https://itsblue.de/apps/bluerock\">" + qsTrId("#privacyPolicy") + "</a>"
|
||||||
//% "This app was built using the <a href='https://qt.io'>Qt Framework</a> licensed under the <a href='https://www.gnu.org/licenses/lgpl-3.0.en.html'>GNU lgplV3 license</a>.<br><br>This app is open source and licensed under the <a href='https://www.gnu.org/licenses/agpl-3.0.en.html'>GNU agplV3 license</a>, the source code can be found <a href='https://itsblue.dev/blueROCK/app'>here</a>.<br><br>Resultservice and rankings provided by <a href='http://www.digitalROCK.de'>digital ROCK</a>."
|
//% "This app was built using the <a href='https://qt.io'>Qt Framework</a> licensed under the <a href='https://www.gnu.org/licenses/lgpl-3.0.en.html'>GNU lgplV3 license</a>.<br><br>This app is open source and licensed under the <a href='https://www.gnu.org/licenses/agpl-3.0.en.html'>GNU agplV3 license</a>, the source code can be found <a href='https://itsblue.dev/blueROCK/app'>here</a>.<br><br>Resultservice and rankings provided by <a href='http://www.digitalROCK.de'>digital ROCK</a>."
|
||||||
content: qsTrId("#aboutBluerockDisclaimer")
|
content: qsTrId("#aboutBluerockDisclaimer")
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,5 @@
|
||||||
<file>Pages/QrCodeScanPage.qml</file>
|
<file>Pages/QrCodeScanPage.qml</file>
|
||||||
<file>Components/MovingLabel.qml</file>
|
<file>Components/MovingLabel.qml</file>
|
||||||
<file>Components/SpeedFlowChart.js</file>
|
<file>Components/SpeedFlowChart.js</file>
|
||||||
<file>Components/BoulderResultRow.qml</file>
|
|
||||||
<file>Components/GeneralResultRow.qml</file>
|
|
||||||
<file>Components/SpeedQualificationResultRow.qml</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in a new issue