Merge branch 'master' into milestone/1.1

This commit is contained in:
Dorian Zedler 2021-05-02 20:18:53 +02:00
commit 45bb39efa7
Signed by: dorian
GPG key ID: 989DE36109AFA354
3 changed files with 19 additions and 6 deletions

View file

@ -17,6 +17,12 @@ DEFINES += QT_DEPRECATED_WARNINGS
# 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
# for raspi
contains(QMAKE_CXX, .*aarch.*):{
message("this is raspi")
DEFINES += RASPI
}
SOURCES += \
sources/main.cpp
@ -38,7 +44,7 @@ QML_DESIGNER_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
# target path for raspi
else: unix:!android: target.path = /usr/share/ScStwMonitor
else: unix:!android: target.path = /usr/bin
!isEmpty(target.path): INSTALLS += target
HEADERS += \

View file

@ -19,7 +19,6 @@
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import Qt.labs.settings 1.0
import QtQuick.Layouts 1.0
@ -515,6 +514,8 @@ Window {
id: loadingInd
anchors.centerIn: parent
visible: !raspi
width: app.landscape() ? parent.height * 0.2 : parent.width *0.2
height: width
@ -536,7 +537,7 @@ Window {
horizontalCenter: parent.horizontalCenter
}
visible: !textFieldEnableMa.containsMouse
visible: !textFieldEnableMa.containsMouse && !raspi
opacity: scStwClient.state === ScStwClient.CONNECTED ? 0:1

View file

@ -35,7 +35,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
app.setOrganizationName("itsblue");
app.setOrganizationName("ScStwMonitor");
app.setOrganizationDomain("itsblue.de");
QQmlApplicationEngine engine;
@ -68,14 +68,20 @@ int main(int argc, char *argv[])
else
engine.rootContext()->setContextProperty("darkMode", false);
#ifdef RASPI
engine.rootContext()->setContextProperty("raspi", true);
#else
engine.rootContext()->setContextProperty("raspi", false);
#endif
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
#if defined(Q_OS_IOS)
#if defined(Q_OS_IOS)
SleepPrevent sp;
sp.setTimerDisabled();
#endif
#endif
// move the cursor into an invisible position
QScreen *screen = QGuiApplication::primaryScreen();