diff --git a/.vscode/launch.json b/.vscode/launch.json index 3518b41d..802d17f9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -21,13 +21,17 @@ "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;" } ], - "type": "cppvsdbg", "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlay.exe" }, "osx": { "MIMode": "lldb", "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay", "type": "lldb" + }, + "linux": { + "MIMode": "lldb", + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug/bin/ScreenPlay", + "type": "lldb" } }, { @@ -53,6 +57,10 @@ "MIMode": "lldb", "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay", "type": "lldb" + }, + "linux": { + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo/bin/ScreenPlay", + "type": "lldb" } }, { @@ -77,6 +85,10 @@ "MIMode": "lldb", "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper", "type": "lldb" + }, + "linux": { + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug/bin/ScreenPlayWallpaper", + "type": "lldb" } }, { @@ -103,6 +115,10 @@ "MIMode": "lldb", "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper", "type": "lldb" + }, + "linux": { + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo/bin/ScreenPlayWallpaper", + "type": "lldb" } }, { @@ -129,6 +145,10 @@ "MIMode": "lldb", "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget", "type": "lldb" + }, + "linux": { + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug/bin/ScreenPlayWidget", + "type": "lldb" } } ] diff --git a/CMakePresets.json b/CMakePresets.json index c399fa0a..3f8e07f8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -74,7 +74,7 @@ "displayName": "ScreenPlay 64bit Debug Linux", "description": "Linux only!", "generator": "Ninja", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_GCC_Debug", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug", "condition": { "type": "equals", "lhs": "${hostSystemName}", @@ -91,7 +91,7 @@ "CMAKE_CXX_COMPILER": "g++", "CMAKE_C_COMPILER": "gcc", "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_PREFIX_PATH": "$env{qt_path}/6.5.0/gcc_64", + "CMAKE_PREFIX_PATH": "$env{qt_path}/6.4.2/gcc_64", "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake", "VCPKG_TARGET_TRIPLET": "x64-linux" } @@ -100,7 +100,7 @@ "name": "linux-relwithdebinfo", "displayName": "ScreenPlay 64bit RelWithDebInfo Linux", "inherits":"linux-debug", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_GCC_RelWithDebInfo", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } diff --git a/ScreenPlayWallpaper/src/linuxwindow.cpp b/ScreenPlayWallpaper/src/linuxwindow.cpp index 92b79dd8..ee402bea 100644 --- a/ScreenPlayWallpaper/src/linuxwindow.cpp +++ b/ScreenPlayWallpaper/src/linuxwindow.cpp @@ -1,55 +1,25 @@ // SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only #include "linuxwindow.h" -LinuxWindow::LinuxWindow( - const QVector& activeScreensList, - const QString& projectFilePath, - const QString& appID, - const QString& volume, - const QString& fillmode, - const QString& type, - const bool checkWallpaperVisible, - const bool debugMode, - QObject* parent) - : BaseWindow( - activeScreensList, - projectFilePath, - type, - checkWallpaperVisible, - appID, - debugMode) + +ScreenPlay::WallpaperExitCode LinuxWindow::start() { - m_window.setWidth(1920); - m_window.setHeight(1080); + + if(!debugMode()){ + connect(m_sdk.get(), &ScreenPlaySDK::sdkDisconnected, this, &LinuxWindow::destroyThis); + } + Qt::WindowFlags flags = m_window.flags(); + m_window.setFlags(flags | Qt::FramelessWindowHint | Qt::Desktop); + auto* screen = QGuiApplication::screens().at(activeScreensList().at(0)); + m_window.setGeometry(screen->geometry()); m_window.show(); - bool ok = false; - float volumeParsed = volume.toFloat(&ok); - if (!ok) { - qFatal("Could not parse volume"); - } - - setVolume(volumeParsed); - setFillMode(fillmode); - - // Ether for one Screen or for all - if ((QApplication::screens().length() == activeScreensList.length()) && (activeScreensList.length() != 1)) { - setupWallpaperForAllScreens(); - } else if (activeScreensList.length() == 1) { - setupWallpaperForOneScreen(activeScreensList.at(0)); - setCanFade(true); - } else if (activeScreensList.length() > 1) { - setupWallpaperForMultipleScreens(activeScreensList); - } - - setWidth(m_window.width()); - setHeight(m_window.height()); - m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView); qmlRegisterSingletonInstance("ScreenPlayWallpaper", 1, 0, "Wallpaper", this); m_window.setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering); m_window.setSource(QUrl("qrc:/ScreenPlayWallpaper/qml/Wallpaper.qml")); + return ScreenPlay::WallpaperExitCode::Ok; } void LinuxWindow::setupWallpaperForOneScreen(int activeScreen) diff --git a/ScreenPlayWallpaper/src/linuxwindow.h b/ScreenPlayWallpaper/src/linuxwindow.h index b5bd4d0b..74126521 100644 --- a/ScreenPlayWallpaper/src/linuxwindow.h +++ b/ScreenPlayWallpaper/src/linuxwindow.h @@ -17,17 +17,9 @@ class LinuxWindow : public BaseWindow { Q_OBJECT + public: - explicit LinuxWindow( - const QVector& activeScreensList, - const QString& projectFilePath, - const QString& appID, - const QString& volume, - const QString& fillmode, - const QString& type, - const bool checkWallpaperVisible, - const bool debugMode, - QObject* parent = nullptr); + ScreenPlay::WallpaperExitCode start() override; signals: diff --git a/Tools/defines.py b/Tools/defines.py index f2f4910c..c49773ce 100644 --- a/Tools/defines.py +++ b/Tools/defines.py @@ -21,7 +21,7 @@ SCREENPLAY_VERSION = "0.15.0-RC4" QT_PATH = Path.cwd().parent.parent.joinpath("aqt") -QT_VERSION = "6.5.0" +QT_VERSION = "6.5.0" if sys.platform != "linux" else "6.4.2" QT_BIN_PATH = QT_PATH.joinpath(f"{QT_VERSION}/{QT_PLATFORM}/bin") QT_TOOLS_PATH = QT_PATH.joinpath("Tools/") QT_IFW_VERSION = "4.5"