Some tweaks for Raspi
This commit is contained in:
parent
5b2ac995fe
commit
48f4e6972d
3 changed files with 17 additions and 5 deletions
|
@ -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 += \
|
||||
|
|
|
@ -535,7 +535,7 @@ Window {
|
|||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
visible: !textFieldEnableMa.containsMouse
|
||||
visible: !textFieldEnableMa.containsMouse && !raspi
|
||||
|
||||
opacity: scStwClient.state === ScStwClient.CONNECTED ? 0:1
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Reference in a new issue