Compare commits
1 commit
main
...
feat/dual-
Author | SHA1 | Date | |
---|---|---|---|
41178e76d9 |
6 changed files with 48 additions and 10 deletions
|
@ -15,9 +15,7 @@ steps:
|
|||
- name: publish package
|
||||
image: alpine/curl
|
||||
commands:
|
||||
- ls -l outputs
|
||||
- ls -l outputs/apk
|
||||
- ls -l outputs/apk/debug
|
||||
- env
|
||||
- "curl --fail --user $GITEA_USER:$GITEA_TOKEN --upload-file outputs/apk/debug/android-build-debug.apk https://itsblue.dev/api/packages/ScStw/generic/app/0.0.0-preview-${DRONE_COMMIT_SHA}/ScStwApp.apk"
|
||||
environment:
|
||||
GITEA_USER:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="com.itsblue.speedclimbing_stopwatch" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="-- %%INSERT_VERSION_NAME%% --" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:installLocation="auto">
|
||||
<manifest package="com.itsblue.speedclimbing_stopwatch_test" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="-- %%INSERT_VERSION_NAME%% --" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:installLocation="auto">
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default permissions. -->
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ public:
|
|||
enum AppInternalSetting {
|
||||
InvalidSetting = -1,
|
||||
AppThemeSetting,
|
||||
BaseStationIpSetting
|
||||
BaseStationIpSetting,
|
||||
KeyboardControlSetting
|
||||
};
|
||||
Q_ENUM(AppInternalSetting)
|
||||
|
||||
|
@ -39,7 +40,8 @@ public:
|
|||
static QVariant::Type keyToType(int key) {
|
||||
QMap<AppInternalSetting, QVariant::Type> types = {
|
||||
{AppThemeSetting, QVariant::String},
|
||||
{BaseStationIpSetting, QVariant::String}
|
||||
{BaseStationIpSetting, QVariant::String},
|
||||
{KeyboardControlSetting, QVariant::Bool}
|
||||
};
|
||||
|
||||
if(types.contains(AppInternalSetting(key)))
|
||||
|
|
|
@ -74,4 +74,19 @@ Column {
|
|||
appTheme.setting.setValue(checked ? "Dark":"Light")
|
||||
}
|
||||
}
|
||||
|
||||
/*----Style Settings----*/
|
||||
SmoothSwitchDelegate {
|
||||
id: keyboardDel
|
||||
text: qsTr("keyboard control")
|
||||
|
||||
width: parent.width
|
||||
height: parentObj.delegateHeight
|
||||
|
||||
checked: scStwAppSettings.readSetting(ScStwAppSettings.KeyboardControlSetting)
|
||||
|
||||
onCheckedChanged: {
|
||||
scStwAppSettings.writeSetting(ScStwAppSettings.KeyboardControlSetting, checked)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,21 @@ ApplicationWindow {
|
|||
|
||||
state: scStwRemoteRace.state
|
||||
|
||||
Keys.onPressed: {
|
||||
if (!scStwAppSettings.readSetting(ScStwAppSettings.KeyboardControlSetting) || scStwRemoteRace.state !== ScStwRace.RUNNING) {
|
||||
return
|
||||
}
|
||||
|
||||
if(event.key === Qt.Key_A) {
|
||||
defaultTimerA.stop()
|
||||
}
|
||||
|
||||
if(event.key === Qt.Key_L) {
|
||||
defaultTimerB.stop()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: backgroundRect
|
||||
anchors.fill: parent
|
||||
|
@ -77,7 +92,14 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
ScStwTimer {
|
||||
id: defaultTimer
|
||||
id: defaultTimerA
|
||||
letter: "A"
|
||||
}
|
||||
|
||||
|
||||
ScStwTimer {
|
||||
id: defaultTimerB
|
||||
letter: "B"
|
||||
}
|
||||
|
||||
ScStwRemoteRace {
|
||||
|
@ -88,7 +110,8 @@ ApplicationWindow {
|
|||
scStwClient: scStwClient
|
||||
|
||||
Component.onCompleted: {
|
||||
scStwRemoteRace.addTimer(defaultTimer)
|
||||
scStwRemoteRace.addTimer(defaultTimerA)
|
||||
scStwRemoteRace.addTimer(defaultTimerB)
|
||||
}
|
||||
|
||||
onStateChanged: {
|
||||
|
@ -210,7 +233,7 @@ ApplicationWindow {
|
|||
|
||||
PropertyChanges {
|
||||
target: topToolBar
|
||||
sizeMode: "medium"
|
||||
sizeMode: scStwAppSettings.readSetting(ScStwAppSettings.KeyboardControlSetting) ? "large":"medium"
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0f269a76370d84c8d1f43a7298a59b6fac1c6980
|
||||
Subproject commit 206d55f301da6fbbb7c8ae3932349cb2bbc57efb
|
Reference in a new issue