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
|
- name: publish package
|
||||||
image: alpine/curl
|
image: alpine/curl
|
||||||
commands:
|
commands:
|
||||||
- ls -l outputs
|
- env
|
||||||
- ls -l outputs/apk
|
|
||||||
- ls -l outputs/apk/debug
|
|
||||||
- "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"
|
- "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:
|
environment:
|
||||||
GITEA_USER:
|
GITEA_USER:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0"?>
|
<?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.
|
<!-- 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. -->
|
Remove the comment if you do not require these default permissions. -->
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,8 @@ public:
|
||||||
enum AppInternalSetting {
|
enum AppInternalSetting {
|
||||||
InvalidSetting = -1,
|
InvalidSetting = -1,
|
||||||
AppThemeSetting,
|
AppThemeSetting,
|
||||||
BaseStationIpSetting
|
BaseStationIpSetting,
|
||||||
|
KeyboardControlSetting
|
||||||
};
|
};
|
||||||
Q_ENUM(AppInternalSetting)
|
Q_ENUM(AppInternalSetting)
|
||||||
|
|
||||||
|
@ -39,7 +40,8 @@ public:
|
||||||
static QVariant::Type keyToType(int key) {
|
static QVariant::Type keyToType(int key) {
|
||||||
QMap<AppInternalSetting, QVariant::Type> types = {
|
QMap<AppInternalSetting, QVariant::Type> types = {
|
||||||
{AppThemeSetting, QVariant::String},
|
{AppThemeSetting, QVariant::String},
|
||||||
{BaseStationIpSetting, QVariant::String}
|
{BaseStationIpSetting, QVariant::String},
|
||||||
|
{KeyboardControlSetting, QVariant::Bool}
|
||||||
};
|
};
|
||||||
|
|
||||||
if(types.contains(AppInternalSetting(key)))
|
if(types.contains(AppInternalSetting(key)))
|
||||||
|
|
|
@ -74,4 +74,19 @@ Column {
|
||||||
appTheme.setting.setValue(checked ? "Dark":"Light")
|
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
|
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 {
|
Rectangle {
|
||||||
id: backgroundRect
|
id: backgroundRect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -77,7 +92,14 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
ScStwTimer {
|
ScStwTimer {
|
||||||
id: defaultTimer
|
id: defaultTimerA
|
||||||
|
letter: "A"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ScStwTimer {
|
||||||
|
id: defaultTimerB
|
||||||
|
letter: "B"
|
||||||
}
|
}
|
||||||
|
|
||||||
ScStwRemoteRace {
|
ScStwRemoteRace {
|
||||||
|
@ -88,7 +110,8 @@ ApplicationWindow {
|
||||||
scStwClient: scStwClient
|
scStwClient: scStwClient
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
scStwRemoteRace.addTimer(defaultTimer)
|
scStwRemoteRace.addTimer(defaultTimerA)
|
||||||
|
scStwRemoteRace.addTimer(defaultTimerB)
|
||||||
}
|
}
|
||||||
|
|
||||||
onStateChanged: {
|
onStateChanged: {
|
||||||
|
@ -210,7 +233,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: topToolBar
|
target: topToolBar
|
||||||
sizeMode: "medium"
|
sizeMode: scStwAppSettings.readSetting(ScStwAppSettings.KeyboardControlSetting) ? "large":"medium"
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0f269a76370d84c8d1f43a7298a59b6fac1c6980
|
Subproject commit 206d55f301da6fbbb7c8ae3932349cb2bbc57efb
|
Reference in a new issue