From 5b2ac995fe6704b315162d8365cec9429a014cb7 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Thu, 8 Apr 2021 16:37:20 +0200 Subject: [PATCH 1/3] remove dependency on QtGraphicalEffects --- ScStwMonitor.pro | 2 +- resources/qml/main.qml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ScStwMonitor.pro b/ScStwMonitor.pro index 38a2ed6..836366f 100755 --- a/ScStwMonitor.pro +++ b/ScStwMonitor.pro @@ -38,7 +38,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/ScStwMonitor !isEmpty(target.path): INSTALLS += target HEADERS += \ diff --git a/resources/qml/main.qml b/resources/qml/main.qml index 159367e..f4e5658 100755 --- a/resources/qml/main.qml +++ b/resources/qml/main.qml @@ -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 From 48f4e6972d7aad5247379404594a2a02cdd25efb Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Thu, 8 Apr 2021 19:05:37 +0200 Subject: [PATCH 2/3] Some tweaks for Raspi --- ScStwMonitor.pro | 8 +++++++- resources/qml/main.qml | 2 +- sources/main.cpp | 12 +++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ScStwMonitor.pro b/ScStwMonitor.pro index 836366f..ef71b5e 100755 --- a/ScStwMonitor.pro +++ b/ScStwMonitor.pro @@ -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/bin/ScStwMonitor +else: unix:!android: target.path = /usr/bin !isEmpty(target.path): INSTALLS += target HEADERS += \ diff --git a/resources/qml/main.qml b/resources/qml/main.qml index f4e5658..b22b77d 100755 --- a/resources/qml/main.qml +++ b/resources/qml/main.qml @@ -535,7 +535,7 @@ Window { horizontalCenter: parent.horizontalCenter } - visible: !textFieldEnableMa.containsMouse + visible: !textFieldEnableMa.containsMouse && !raspi opacity: scStwClient.state === ScStwClient.CONNECTED ? 0:1 diff --git a/sources/main.cpp b/sources/main.cpp index e47d5af..d466a1e 100755 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -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(); From 8fb5624456771806073c91110a255e594770fa62 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Fri, 9 Apr 2021 18:01:31 +0200 Subject: [PATCH 3/3] hide busyindicator on raspi --- resources/qml/main.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/qml/main.qml b/resources/qml/main.qml index b22b77d..a6dd0a2 100755 --- a/resources/qml/main.qml +++ b/resources/qml/main.qml @@ -514,6 +514,8 @@ Window { id: loadingInd anchors.centerIn: parent + visible: !raspi + width: app.landscape() ? parent.height * 0.2 : parent.width *0.2 height: width