diff --git a/ScStwApp.pro b/ScStwApp.pro index 1800b0d..62d75c7 100644 --- a/ScStwApp.pro +++ b/ScStwApp.pro @@ -3,8 +3,15 @@ QT += quick qml quickcontrols2 sql multimedia android { QT += androidextras } -VERSION = 0.04 -DEFINES += APP_VERSION=$$VERSION + +VERSION = 1.0.0 +QMAKE_TARGET_PRODUCT = "ScStwApp" +QMAKE_TARGET_COMPANY = "Itsblue Development" +QMAKE_TARGET_COPYRIGHT = "Copyright (c) by Itsblue Development" + +# Add to define +DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\" + CONFIG += c++11 # The following define makes your compiler emit warnings if you use @@ -66,5 +73,9 @@ DISTFILES += \ android { ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android - ANDROID_ABIS = armeabi-v7a arm64-v8a + ANDROID_VERSION_CODE = 15 + ANDROID_VERSION_NAME = $${VERSION} } + +# This has to be the last line in the file +ANDROID_ABIS = armeabi-v7a arm64-v8a diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 31a7da9..0c1bdf9 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,8 +1,8 @@ - + - + @@ -71,6 +71,7 @@ - + + diff --git a/android/build.gradle b/android/build.gradle index cea09f2..0051ff0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -74,4 +74,8 @@ android { minSdkVersion = qtMinSdkVersion targetSdkVersion = 29 } + + lintOptions { + checkReleaseBuilds false + } } diff --git a/resources/qml/SettingsDialog/SettingsAboutPage.qml b/resources/qml/SettingsDialog/SettingsAboutPage.qml new file mode 100644 index 0000000..ccedfa0 --- /dev/null +++ b/resources/qml/SettingsDialog/SettingsAboutPage.qml @@ -0,0 +1,103 @@ +import QtQuick 2.9 +import QtMultimedia 5.8 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.2 +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: control + + spacing: parentObj.delegateHeight * 0.2 + + property string title: "about" + property var parentObj + + function updateSetting(key, val, del){ + del.busy = true + scStwAppSettings.writeSetting(key, val, ScStwSettings.KeyLevel) + del.busy = false + } + + function loadSetting(key, del){ + return scStwAppSettings.readSetting(key, ScStwSettings.KeyLevel) + } + + Label { + id: headerLabel + + width: parent.width + height: parentObj.delegateHeight * 0.8 + + visible: true + + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + + fontSizeMode: Text.Fit + font.pixelSize: height + + minimumPixelSize: 1 + + color: appTheme.theme.colors.text + + text: "ScStwApp" + } + + Label { + width: parent.width * 1 + height: parentObj.delegateHeight * 0.8 + + + verticalAlignment: Text.AlignTop + horizontalAlignment: Text.AlignHCenter + + fontSizeMode: Text.Fit + font.pixelSize: height + + minimumPixelSize: 1 + + color: appTheme.theme.colors.line + + text: "V" + APP_VERSION + "
By Itsblue Development" + + onLinkActivated: { + Qt.openUrlExternally(link) + } + } + + Label { + width: parent.width * 1 + height: parent.height + + + verticalAlignment: Text.AlignTop + horizontalAlignment: Text.AlignHCenter + + fontSizeMode: Text.Fit + font.pixelSize: height + + minimumPixelSize: 1 + + color: appTheme.theme.colors.line + + text: " This app was built using the Qt Framework
+ licensed under the GNU lgplV3 license.

+ + This app is open source and licensed
under the GNU agplV3 license,
+ the source code can be found here." + + onLinkActivated: { + Qt.openUrlExternally(link) + } + } +} + diff --git a/resources/qml/SettingsDialog/SettingsStack.qml b/resources/qml/SettingsDialog/SettingsStack.qml index 9981e6f..f9cdf21 100644 --- a/resources/qml/SettingsDialog/SettingsStack.qml +++ b/resources/qml/SettingsDialog/SettingsStack.qml @@ -35,6 +35,14 @@ StackView { } + Component { + id: about + + SettingsAboutPage { + parentObj: control + } + } + /*-----Page to connect to the base station -----*/ Component { id: connect diff --git a/resources/qml/SettingsDialog/StartPage.qml b/resources/qml/SettingsDialog/StartPage.qml index b5a3808..931cd2f 100644 --- a/resources/qml/SettingsDialog/StartPage.qml +++ b/resources/qml/SettingsDialog/StartPage.qml @@ -47,6 +47,19 @@ Column { } } + /*----About the app----*/ + NextPageDelegate { + id: about_del + + height: parentObj.delegateHeight + + text: qsTr("about this app") + + onClicked: { + parentObj.push(about) + } + } + /*----Style Settings----*/ SmoothSwitchDelegate { id: styleDel diff --git a/resources/qml/qml.qrc b/resources/qml/qml.qrc index 18988d9..4ce1277 100644 --- a/resources/qml/qml.qrc +++ b/resources/qml/qml.qrc @@ -30,5 +30,6 @@ components/BatteryIndicator.qml components/ExtensionOverview.qml SettingsDialog/SettingsBaseStationSettingsPage.qml + SettingsDialog/SettingsAboutPage.qml diff --git a/sources/main.cpp b/sources/main.cpp index a4efc7b..104ba58 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -69,6 +69,9 @@ int main(int argc, char *argv[]) QQmlApplicationEngine engine; + // pass app version to qml + engine.rootContext()->setContextProperty("APP_VERSION", APP_VERSION); + ScStwLibraries::init(); ScStwLibraries::initStyling(&engine);