diff --git a/android-sources/AndroidManifest.xml b/android-sources/AndroidManifest.xml index efa45e4..ffab56b 100644 --- a/android-sources/AndroidManifest.xml +++ b/android-sources/AndroidManifest.xml @@ -1,7 +1,24 @@ + + - + diff --git a/android-sources/src/MainActivity.java b/android-sources/src/MainActivity.java new file mode 100644 index 0000000..79815bf --- /dev/null +++ b/android-sources/src/MainActivity.java @@ -0,0 +1,26 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +package com.itsblue.speedclimbing_stopwatch; +public class MainActivity extends org.qtproject.qt5.android.bindings.QtActivity { + @Override + public void onCreate(android.os.Bundle savedInstanceState){ + super.onCreate(savedInstanceState); + this.getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + //this.getWindow().setVolumeControlStream(android.view.AudioManager.STREAM_MUSIC); + } +} diff --git a/android-sources/src/StayAwake.java b/android-sources/src/StayAwake.java deleted file mode 100644 index e99750e..0000000 --- a/android-sources/src/StayAwake.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.itsblue; -public class StayAwake extends org.qtproject.qt5.android.bindings.QtActivity { - @Override - public void onCreate(android.os.Bundle savedInstanceState){ - super.onCreate(savedInstanceState); - this.getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - //this.getWindow().setVolumeControlStream(android.view.AudioManager.STREAM_MUSIC); - } -} diff --git a/qml/FadeAnimation.qml b/qml/FadeAnimation.qml index 46af6f7..bb05356 100644 --- a/qml/FadeAnimation.qml +++ b/qml/FadeAnimation.qml @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + import QtQuick 2.0 SequentialAnimation { diff --git a/qml/ProfilesDialog.qml b/qml/ProfilesDialog.qml index d9809e0..8bebe40 100644 --- a/qml/ProfilesDialog.qml +++ b/qml/ProfilesDialog.qml @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + import QtQuick 2.9 import QtMultimedia 5.8 import QtQuick.Window 2.2 diff --git a/qml/ProgressCircle.qml b/qml/ProgressCircle.qml index 5febcbc..3fa6350 100644 --- a/qml/ProgressCircle.qml +++ b/qml/ProgressCircle.qml @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + import QtQuick 2.0 import QtQml 2.2 diff --git a/qml/SettingsDialog.qml b/qml/SettingsDialog.qml index 0281e69..8a3219b 100644 --- a/qml/SettingsDialog.qml +++ b/qml/SettingsDialog.qml @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + import QtQuick 2.9 import QtMultimedia 5.8 import QtQuick.Window 2.2 diff --git a/qml/SimpleIndicator.qml b/qml/SimpleIndicator.qml index e84d9dc..d77c17b 100644 --- a/qml/SimpleIndicator.qml +++ b/qml/SimpleIndicator.qml @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + import QtQuick 2.0 Rectangle { diff --git a/qml/main.qml b/qml/main.qml index a2de7a2..6733f1a 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + import QtQuick 2.9 import QtMultimedia 5.8 import QtQuick.Window 2.2 diff --git a/sources/appsettings.cpp b/sources/appsettings.cpp index 20e3314..809161d 100644 --- a/sources/appsettings.cpp +++ b/sources/appsettings.cpp @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + #include "headers/appsettings.h" AppSettings::AppSettings(QObject* parent) diff --git a/sources/buzzerconn.cpp b/sources/buzzerconn.cpp index 1efa6cd..6f71c0c 100644 --- a/sources/buzzerconn.cpp +++ b/sources/buzzerconn.cpp @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + #include "headers/buzzerconn.h" BuzzerConn::BuzzerConn(QObject *parent) : QObject(parent) diff --git a/sources/main.cpp b/sources/main.cpp index 2f7ea29..cf072a4 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + #include #include #include @@ -29,7 +46,7 @@ #include #include #ifdef Q_OS_ANDROID - #include +#include #endif #include "headers/sqlstoragemodel.h" #include "headers/sqlprofilemodel.h" @@ -68,12 +85,12 @@ int main(int argc, char *argv[]) QGuiApplication app(argc, argv); - #ifdef Q_OS_ANDROID +#ifdef Q_OS_ANDROID //set the standard volume to media - QAndroidJniObject jactivity=QtAndroid::androidActivity(); - if(jactivity.isValid()) + QAndroidJniObject jactivity=QtAndroid::androidActivity(); + if(jactivity.isValid()) jactivity.callMethod("setVolumeControlStream","(I)V",3); - #endif +#endif connectToDatabase(); BuzzerConn * pBuzzerConn = new BuzzerConn; diff --git a/sources/sqlprofilemodel.cpp b/sources/sqlprofilemodel.cpp index 0237a17..1bd98d6 100644 --- a/sources/sqlprofilemodel.cpp +++ b/sources/sqlprofilemodel.cpp @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + #include "headers/sqlprofilemodel.h" static void createTable() diff --git a/sources/sqlstoragemodel.cpp b/sources/sqlstoragemodel.cpp index 8eeeca3..d5906c8 100644 --- a/sources/sqlstoragemodel.cpp +++ b/sources/sqlstoragemodel.cpp @@ -1,3 +1,20 @@ +/* + Speed Climbing Stopwatch - Simple Stopwatch for Climbers + Copyright (C) 2018 Itsblue Development - Dorian Zeder + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + #include "headers/sqlstoragemodel.h" SqlStorageModel::SqlStorageModel(QObject *parent) : QSqlTableModel(parent) diff --git a/speedclimbing_stopwatch.pro b/speedclimbing_stopwatch.pro index f266bdc..40da7d8 100644 --- a/speedclimbing_stopwatch.pro +++ b/speedclimbing_stopwatch.pro @@ -45,8 +45,8 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin DISTFILES += \ android-sources/AndroidManifest.xml \ - android-sources/src/StayAwake.java \ - CHANGELOG + CHANGELOG \ + android-sources/src/MainActivity.java android { ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources