...
 
Commits (2)
......@@ -20,6 +20,8 @@ BusyIndicator {
var margins = width * 0.01
var lineWidth = width * 0.1
ctx.clearRect(0,0,width,height)
ctx.beginPath();
ctx.arc(width * 0.5 + margins, height * 0.5 + margins, height*0.5 - margins*2 - lineWidth , 0, 2*Math.PI);
......
......@@ -6,6 +6,9 @@
#include <QScreen>
#include "baseconn.h"
#if defined(Q_OS_IOS)
#include "sleepprevent.h"
#endif
int main(int argc, char *argv[])
{
......@@ -25,6 +28,11 @@ int main(int argc, char *argv[])
if (engine.rootObjects().isEmpty())
return -1;
#if defined(Q_OS_IOS)
SleepPrevent sp;
sp.setTimerDisabled();
#endif
// move the cursor into an invisible position
QScreen *screen = QGuiApplication::primaryScreen();
QRect rect = screen->geometry();
......
class SleepPrevent
{
public:
void setTimerDisabled();
};
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#include "sleepprevent.h"
void SleepPrevent::setTimerDisabled() {
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
}
......@@ -54,5 +54,11 @@ contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
ios {
QMAKE_ASSET_CATALOGS += icon/Assets.xcassets
xcode_product_bundle_identifier_setting.value = "de.itsblue.ScStwMonitor"
OBJECTIVE_SOURCES += \
sleepprevent.mm
OBJECTIVE_HEADERS += \
sleepprevent.h
}