some stuff for IOS
14
ScStwApp.pro
|
@ -18,7 +18,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
TARGET = speedclimbing_stw
|
TARGET = ScStwApp
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
sources/main.cpp \
|
sources/main.cpp \
|
||||||
|
@ -66,3 +66,15 @@ DISTFILES += \
|
||||||
android {
|
android {
|
||||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
|
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ios {
|
||||||
|
QMAKE_ASSET_CATALOGS += resources/shared/graphics/Assets.xcassets
|
||||||
|
xcode_product_bundle_identifier_setting.value = "de.itsblue.ScStwApp"
|
||||||
|
|
||||||
|
OBJECTIVE_SOURCES += \
|
||||||
|
sources/sleepprevent.mm
|
||||||
|
OBJECTIVE_HEADERS += \
|
||||||
|
headers/sleepprevent.h
|
||||||
|
|
||||||
|
QTPLUGIN -= qtaudio_coreaudio
|
||||||
|
}
|
||||||
|
|
5
headers/sleepprevent.h
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class SleepPrevent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void setTimerDisabled();
|
||||||
|
};
|
|
@ -4,7 +4,6 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtQuick.Templates 2.12 as T
|
import QtQuick.Templates 2.12 as T
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Window 2.2
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.4
|
import QtQuick.Controls 2.4
|
||||||
import QtQuick.Controls.Styles 1.2
|
|
||||||
|
|
||||||
BusyIndicator {
|
BusyIndicator {
|
||||||
id: control
|
id: control
|
||||||
|
|
After Width: | Height: | Size: 2 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 287 B |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 691 B |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 842 B |
After Width: | Height: | Size: 841 B |
After Width: | Height: | Size: 918 B |
After Width: | Height: | Size: 1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -57,6 +57,10 @@
|
||||||
#include "headers/apptheme.h"
|
#include "headers/apptheme.h"
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
|
#if defined(Q_OS_IOS)
|
||||||
|
#include "headers/sleepprevent.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void connectToDatabase()
|
static void connectToDatabase()
|
||||||
{
|
{
|
||||||
QSqlDatabase database = QSqlDatabase::database();
|
QSqlDatabase database = QSqlDatabase::database();
|
||||||
|
@ -127,6 +131,11 @@ int main(int argc, char *argv[])
|
||||||
// stup app settings
|
// stup app settings
|
||||||
context->setContextProperty("_cppAppSettings", pAppSettings);
|
context->setContextProperty("_cppAppSettings", pAppSettings);
|
||||||
|
|
||||||
|
#if defined(Q_OS_IOS)
|
||||||
|
SleepPrevent sp;
|
||||||
|
sp.setTimerDisabled();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (engine.rootObjects().isEmpty())
|
if (engine.rootObjects().isEmpty())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
7
sources/sleepprevent.mm
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#include "headers/sleepprevent.h"
|
||||||
|
|
||||||
|
void SleepPrevent::setTimerDisabled() {
|
||||||
|
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
|
||||||
|
}
|