mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Add qt6 support
This commit is contained in:
parent
d5276b8169
commit
01031ba5d8
@ -79,12 +79,8 @@ if(WIN32)
|
||||
add_subdirectory(ScreenPlaySysInfo)
|
||||
endif()
|
||||
|
||||
#if(APPLE)
|
||||
#add_custom_target(CopyDependencies DEPENDS ScreenPlay)
|
||||
#add_custom_command(TARGET CopyDependencies POST_BUILD
|
||||
# COMMAND "ScreenPlayWallpaper" -E copy_directory
|
||||
# "$<TARGET_FILE:ScreenPlayWallpaper>"
|
||||
# "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/$<TARGET_FILE_NAME:ScreenPlayWallpaper>/"
|
||||
# COMMENT "Copying into ScreenPlay.app bundle")
|
||||
#endif()
|
||||
|
||||
message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
|
||||
message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")
|
||||
message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
|
||||
message(STATUS "[PROJECT] QT_VERSION_MAJOR = ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH} ")
|
||||
message(STATUS "[PROJECT] Qt6_FOUND = ${Qt6_FOUND}")
|
||||
|
@ -47,7 +47,12 @@
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
#include <QtQml>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtWebEngine>
|
||||
#else
|
||||
#include <QtWebEngineCore>
|
||||
#endif
|
||||
|
||||
#include <QtSvg>
|
||||
|
||||
#include "src/create.h"
|
||||
|
@ -36,7 +36,14 @@
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDebug>
|
||||
#include <QtWebEngine/QtWebEngine>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtWebEngine>
|
||||
#else
|
||||
#include <QtWebEngineCore>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include <sentry.h>
|
||||
#define DOCTEST_CONFIG_IMPLEMENT
|
||||
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
|
||||
@ -44,8 +51,10 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QtWebEngine::initialize();
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
|
||||
QApplication qtGuiApp(argc, argv);
|
||||
|
@ -3,9 +3,9 @@ import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import ScreenPlay 1.0
|
||||
import Settings 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import "qml/Monitors" as Monitors
|
||||
import "qml/Common" as Common
|
||||
import "qml/Common/Dialogs" as Dialogs
|
||||
@ -35,7 +35,7 @@ ApplicationWindow {
|
||||
if (nav.currentNavigationName === name) {
|
||||
if (name === "Installed")
|
||||
ScreenPlay.installedListModel.reset();
|
||||
|
||||
return
|
||||
}
|
||||
stackView.replace("qrc:/qml/" + name + "/" + name + ".qml");
|
||||
sidebar.state = "inactive";
|
||||
@ -186,7 +186,7 @@ ApplicationWindow {
|
||||
Navigation.Navigation {
|
||||
id: nav
|
||||
|
||||
onChangePage: {
|
||||
onChangePage: (name)=> {
|
||||
monitors.close();
|
||||
switchPage(name);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Particles 2.0
|
||||
|
||||
Rectangle {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.14
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.3
|
||||
|
||||
/*!
|
||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Window 2.2
|
||||
import QtGraphicalEffects 1.15
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Dialog {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Dialogs 1.2
|
||||
import Qt.labs.platform 1.1
|
||||
import ScreenPlay 1.0
|
||||
|
||||
/*!
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Rectangle {
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.12
|
||||
|
||||
Item {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import ScreenPlay 1.0
|
||||
|
||||
|
@ -2,7 +2,7 @@ import QtQuick 2.14
|
||||
import QtQuick.Window 2.14
|
||||
import QtQuick.Controls.Material 2.14
|
||||
import QtQuick.Controls 2.14 as QQC
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts 1.14
|
||||
import ScreenPlay 1.0
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
import QtQuick 2.0
|
||||
import Qt.labs.platform 1.0
|
||||
import Qt.labs.platform 1.1
|
||||
import ScreenPlay 1.0
|
||||
|
||||
SystemTrayIcon {
|
||||
id: root
|
||||
|
||||
visible: true
|
||||
iconSource: "qrc:/assets/icons/app.ico"
|
||||
icon.source: "qrc:/assets/icons/app.ico"
|
||||
tooltip: qsTr("ScreenPlay - Double click to change you settings.")
|
||||
onActivated: {
|
||||
onActivated: (reason)=>{
|
||||
switch (reason) {
|
||||
case SystemTrayIcon.Unknown:
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.14
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts 1.3
|
||||
import ScreenPlay 1.0
|
||||
import QtWebEngine 1.8
|
||||
|
@ -1,9 +1,9 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.XmlListModel 2.12
|
||||
import QtQml.XmlListModel
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
@ -34,29 +34,29 @@ Item {
|
||||
source: "https://screen-play.app/blog/index.xml"
|
||||
query: "/rss/channel/item"
|
||||
|
||||
XmlRole {
|
||||
XmlListModelRole {
|
||||
name: "title"
|
||||
query: "title/string()"
|
||||
elementName: "title"
|
||||
}
|
||||
|
||||
XmlRole {
|
||||
XmlListModelRole {
|
||||
name: "image"
|
||||
query: "image/string()"
|
||||
elementName: "image"
|
||||
}
|
||||
|
||||
XmlRole {
|
||||
XmlListModelRole {
|
||||
name: "pubDate"
|
||||
query: "pubDate/string()"
|
||||
elementName: "pubDate"
|
||||
}
|
||||
|
||||
XmlRole {
|
||||
XmlListModelRole {
|
||||
name: "link"
|
||||
query: "link/string()"
|
||||
elementName: "link"
|
||||
}
|
||||
|
||||
XmlRole {
|
||||
XmlListModelRole {
|
||||
name: "description"
|
||||
query: "description/string()"
|
||||
elementName: "description"
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Particles 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Particles 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Particles 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Particles 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
|
@ -2,7 +2,7 @@ import QtQuick 2.14
|
||||
import QtQuick.Controls.Material 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick.Dialogs 1.2
|
||||
import Qt.labs.platform 1.1
|
||||
import ScreenPlay 1.0
|
||||
import "../../Common" as Common
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -2,7 +2,7 @@ import QtQuick 2.14
|
||||
import QtQuick.Controls.Material 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import "../../Common" as Common
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,9 +1,9 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Dialogs 1.3
|
||||
import Qt.labs.platform 1.1
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../../Common" as Common
|
||||
|
@ -2,8 +2,8 @@ import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,9 +1,9 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Dialogs 1.3
|
||||
import Qt.labs.platform 1.1
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Create 1.0
|
||||
import "../../../Common" as Common
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -2,7 +2,7 @@ import QtQuick 2.14
|
||||
import QtQuick.Controls.Material 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
import ScreenPlay 1.0
|
||||
import "../../Common" as Common
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,8 +1,8 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import ScreenPlay 1.0
|
||||
import "../Common"
|
||||
|
@ -1,8 +1,8 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
|
@ -1,8 +1,8 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Controls
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
import "../Common/Util.js" as JSUtil
|
||||
@ -212,7 +212,7 @@ Item {
|
||||
screenPlayItemImage.state = "loaded";
|
||||
screenPlayItemImage.exit();
|
||||
}
|
||||
onClicked: {
|
||||
onClicked: (mouse)=> {
|
||||
if (mouse.button === Qt.LeftButton)
|
||||
ScreenPlay.util.setSidebarItem(root.screenId, root.type);
|
||||
else if (mouse.button === Qt.RightButton)
|
||||
|
@ -1,7 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Extras 1.4
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import ScreenPlay 1.0
|
||||
@ -168,15 +168,15 @@ Rectangle {
|
||||
|
||||
}
|
||||
|
||||
layer.effect: InnerShadow {
|
||||
cached: true
|
||||
fast: true
|
||||
smooth: true
|
||||
radius: 32
|
||||
spread: 0.8
|
||||
verticalOffset: 3
|
||||
color: "#55000000"
|
||||
}
|
||||
// layer.effect: InnerShadow {
|
||||
// cached: true
|
||||
// fast: true
|
||||
// smooth: true
|
||||
// radius: 32
|
||||
// spread: 0.8
|
||||
// verticalOffset: 3
|
||||
// color: "#55000000"
|
||||
// }
|
||||
// Width of the Sidebar or Space that should be used
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.InstalledType 1.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
@ -83,7 +83,7 @@ Popup {
|
||||
monitorWithoutContentSelectable: false
|
||||
availableWidth: width - 20
|
||||
availableHeight: 150
|
||||
onRequestProjectSettings: {
|
||||
function onRequestProjectSettings() {
|
||||
if (installedType === InstalledType.VideoWallpaper) {
|
||||
videoControlWrapper.state = "visible";
|
||||
customPropertiesGridView.visible = false;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Qt.labs.platform 1.1
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import ScreenPlay 1.0
|
||||
import "../Workshop"
|
||||
@ -79,7 +79,7 @@ Rectangle {
|
||||
state: "inactive"
|
||||
name: "Create"
|
||||
iconSource: "qrc:/assets/icons/icon_plus.svg"
|
||||
onPageClicked: root.onPageChanged(name)
|
||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
||||
}
|
||||
|
||||
NavigationItem {
|
||||
@ -88,7 +88,7 @@ Rectangle {
|
||||
state: "inactive"
|
||||
name: "Workshop"
|
||||
iconSource: "qrc:/assets/icons/icon_steam.svg"
|
||||
onPageClicked: root.onPageChanged(name)
|
||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
||||
}
|
||||
|
||||
NavigationItem {
|
||||
@ -98,7 +98,7 @@ Rectangle {
|
||||
name: "Installed"
|
||||
amount: ScreenPlay.installedListModel.count
|
||||
iconSource: "qrc:/assets/icons/icon_installed.svg"
|
||||
onPageClicked: root.onPageChanged(name)
|
||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
||||
}
|
||||
|
||||
NavigationItem {
|
||||
@ -107,7 +107,7 @@ Rectangle {
|
||||
state: "inactive"
|
||||
name: "Community"
|
||||
iconSource: "qrc:/assets/icons/icon_community.svg"
|
||||
onPageClicked: root.onPageChanged(name)
|
||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
||||
}
|
||||
|
||||
NavigationItem {
|
||||
@ -116,7 +116,7 @@ Rectangle {
|
||||
state: "inactive"
|
||||
name: "Settings"
|
||||
iconSource: "qrc:/assets/icons/icon_settings.svg"
|
||||
onPageClicked: root.onPageChanged(name)
|
||||
onPageClicked: (name)=> {root.onPageChanged(name)}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import ScreenPlay 1.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
import "../Common"
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Dialogs 1.3
|
||||
import Qt.labs.platform 1.1
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
import ScreenPlay.Enums.FillMode 1.0
|
||||
import Settings 1.0
|
||||
@ -72,7 +72,7 @@ Item {
|
||||
headline: qsTr("Autostart")
|
||||
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
|
||||
isChecked: ScreenPlay.settings.autostart
|
||||
onCheckboxChanged: {
|
||||
onCheckboxChanged: (checked) => {
|
||||
ScreenPlay.settings.setAutostart(checked);
|
||||
}
|
||||
}
|
||||
@ -98,7 +98,7 @@ Item {
|
||||
headline: qsTr("Send anonymous crash reports and statistics")
|
||||
description: qsTr("Help us make ScreenPlay faster and more stable. All collected data is purely anonymous and only used for development purposes! We use <a href=\"https://sentry.io\">sentry.io</a> to collect and analyze this data. A <b>big thanks to them</b> for providing us with free premium support for open source projects!")
|
||||
isChecked: ScreenPlay.settings.anonymousTelemetry
|
||||
onCheckboxChanged: {
|
||||
onCheckboxChanged: (checked) => {
|
||||
ScreenPlay.settings.setAnonymousTelemetry(checked);
|
||||
}
|
||||
}
|
||||
@ -121,10 +121,8 @@ Item {
|
||||
folderDialogSaveLocation.open();
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
FolderDialog {
|
||||
id: folderDialogSaveLocation
|
||||
|
||||
selectFolder: true
|
||||
folder: ScreenPlay.globalVariables.localStoragePath
|
||||
onAccepted: {
|
||||
ScreenPlay.settings.setLocalStoragePath(folderDialogSaveLocation.fileUrls[0]);
|
||||
@ -262,7 +260,7 @@ Item {
|
||||
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground")
|
||||
description: qsTr("We disable the video rendering (not the audio!) for the best performance. If you have problem you can disable this behaviour here. Wallpaper restart required!")
|
||||
isChecked: ScreenPlay.settings.checkWallpaperVisible
|
||||
onCheckboxChanged: {
|
||||
onCheckboxChanged: (checked) =>{
|
||||
ScreenPlay.settings.setCheckWallpaperVisible(checked);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlay 1.0
|
||||
|
||||
Item {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
|
||||
Page {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Workshop 1.0
|
||||
|
||||
Rectangle {
|
||||
@ -36,7 +36,7 @@ Rectangle {
|
||||
id: bgImage
|
||||
|
||||
height: bgImage.sourceSize.height
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
//fillMode: Image.PreserveAspectCrop
|
||||
opacity: 0
|
||||
source: root.backgroundImage
|
||||
|
||||
@ -75,15 +75,13 @@ Rectangle {
|
||||
|
||||
}
|
||||
|
||||
MaskedBlur {
|
||||
FastBlur {
|
||||
id: blur
|
||||
|
||||
anchors.fill: bgImage
|
||||
source: bgImage
|
||||
maskSource: maskSource
|
||||
radius: 16
|
||||
cached: true
|
||||
samples: 24
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Controls.Material 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Controls.Material 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Controls
|
||||
|
||||
Item {
|
||||
id: screenPlayItem
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.11
|
||||
import QtWebEngine 1.8
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Controls.Material 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts 1.12
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Controls.Material 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts 1.12
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Controls.Material 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts 1.12
|
||||
import Workshop 1.0
|
||||
import ScreenPlay 1.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Workshop 1.0 as SP
|
||||
|
||||
Item {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import Workshop 1.0
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls.Material.impl 2.12
|
||||
|
@ -584,7 +584,7 @@ bool CreateImportVideo::createWallpaperVideo()
|
||||
if (tmpOut.contains("Conversion failed!")) {
|
||||
emit createWallpaperStateChanged(ImportVideoState::ConvertingVideoError);
|
||||
}
|
||||
const auto tmpList = tmpOut.split(QRegExp("\\s+"), Qt::SplitBehaviorFlags::SkipEmptyParts);
|
||||
const auto tmpList = tmpOut.split(QRegularExpression("\\s+"), Qt::SplitBehaviorFlags::SkipEmptyParts);
|
||||
|
||||
if (tmpList.length() > 2) {
|
||||
bool ok = false;
|
||||
|
@ -14,7 +14,7 @@ namespace ScreenPlay {
|
||||
ScreenPlay::GlobalVariables::GlobalVariables(QObject* parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
setLocalSettingsPath(QUrl { QStandardPaths::writableLocation(QStandardPaths::DataLocation) });
|
||||
setLocalSettingsPath(QUrl { QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) });
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <memory>
|
||||
|
||||
|
@ -217,13 +217,15 @@ public slots:
|
||||
QFile settingsPlist(homePath + "/Library/LaunchAgents/" + plistFileName);
|
||||
if (settingsPlist.exists()) {
|
||||
if(!settingsPlist.remove()){
|
||||
qCritical() << "Unable to remove: " << settingsPlist;
|
||||
qCritical() << "Unable to remove: " << settingsPlist.fileName();
|
||||
}
|
||||
}
|
||||
|
||||
settingsPlist.open(QIODevice::WriteOnly | QIODevice::Truncate);
|
||||
QTextStream out(&settingsPlist);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
out.setCodec("UTF-8");
|
||||
#endif
|
||||
out << settingsPlistContent;
|
||||
settingsPlist.flush();
|
||||
settingsPlist.close();
|
||||
|
@ -63,7 +63,9 @@ bool Util::writeJsonObjectToFile(const QString& absoluteFilePath, const QJsonObj
|
||||
}
|
||||
|
||||
QTextStream out(&configTmp);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
out.setCodec("UTF-8");
|
||||
#endif
|
||||
out << QJsonDocument(object).toJson();
|
||||
|
||||
configTmp.close();
|
||||
@ -253,7 +255,9 @@ bool Util::writeSettings(const QJsonObject& obj, const QString& absolutePath)
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
out.setCodec("UTF-8");
|
||||
#endif
|
||||
QJsonDocument doc(obj);
|
||||
|
||||
out << doc.toJson();
|
||||
@ -274,8 +278,9 @@ bool Util::writeFile(const QString& text, const QString& absolutePath)
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
out.setCodec("UTF-8");
|
||||
|
||||
#endif
|
||||
out << text;
|
||||
|
||||
file.close();
|
||||
@ -295,7 +300,9 @@ bool Util::writeFileFromQrc(const QString& qrcPath, const QString& absolutePath)
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
out.setCodec("UTF-8");
|
||||
#endif
|
||||
|
||||
QFile qrc(qrcPath);
|
||||
qrc.open(QIODevice::ReadOnly);
|
||||
|
Binary file not shown.
@ -1,5 +1,7 @@
|
||||
#include "shaderlibrary.h"
|
||||
|
||||
#include <QFile>
|
||||
|
||||
/*!
|
||||
\module ScreenPlayShader
|
||||
\title ScreenPlayShader
|
||||
|
@ -61,7 +61,9 @@ bool writeJsonObjectToFile(const QString& absoluteFilePath, const QJsonObject& o
|
||||
}
|
||||
|
||||
QTextStream out(&configTmp);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
out.setCodec("UTF-8");
|
||||
#endif
|
||||
out << QJsonDocument(object).toJson();
|
||||
|
||||
configTmp.close();
|
||||
|
@ -21,9 +21,9 @@ set(src main.cpp src/basewindow.cpp)
|
||||
set(headers src/basewindow.h)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
qt_add_resources(resources SPWResources.qrc)
|
||||
qt6_add_resources (resources SPWResources.qrc)
|
||||
else()
|
||||
qtquick_compiler_add_resources(resources SPWResources.qrc)
|
||||
qt6_add_resources (resources SPWResources.qrc)
|
||||
endif()
|
||||
|
||||
add_executable(${PROJECT_NAME} ${src} ${headers} ${src_plattform} ${headers_plattform} ${resources})
|
||||
@ -51,6 +51,7 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
Widgets
|
||||
WebSockets
|
||||
Svg
|
||||
Multimedia
|
||||
WebEngineCore
|
||||
WebEngineQuick
|
||||
WebChannel
|
||||
@ -63,6 +64,7 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::WebSockets
|
||||
Qt${QT_VERSION_MAJOR}::Svg
|
||||
Qt6::Multimedia
|
||||
Qt6::WebEngineCore
|
||||
Qt6::WebEngineQuick)
|
||||
else()
|
||||
|
21
ScreenPlayWallpaper/MultimediaView.qml
Normal file
21
ScreenPlayWallpaper/MultimediaView.qml
Normal file
@ -0,0 +1,21 @@
|
||||
import QtQuick 2.0
|
||||
import QtMultimedia
|
||||
|
||||
VideoOutput {
|
||||
id:root
|
||||
MediaPlayer {
|
||||
id: mediaPlayer
|
||||
videoOutput: root
|
||||
//volume: Wallpaper.volume
|
||||
//source: Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
|
||||
source: Qt.resolvedUrl("C:/Users/Eli/Videos/videoplayback.webm")
|
||||
Component.onCompleted: mediaPlayer.play()
|
||||
//loops: true
|
||||
onErrorOccurred: function(error, errorString) {
|
||||
if (MediaPlayer.NoError !== error) {
|
||||
console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString)
|
||||
root.fatalError()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -8,5 +8,6 @@
|
||||
<file>index.html</file>
|
||||
<file>GifWallpaper.qml</file>
|
||||
<file>WebsiteWallpaper.qml</file>
|
||||
<file>MultimediaView.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -19,7 +19,7 @@ Rectangle {
|
||||
//Image
|
||||
property real imgOpacity: 0.75
|
||||
|
||||
signal requestFadeIn()
|
||||
signal requestFadeIn
|
||||
|
||||
anchors.fill: parent
|
||||
color: Material.color(Material.Grey, Material.Shade800)
|
||||
@ -28,15 +28,15 @@ Rectangle {
|
||||
Component.onCompleted: root.requestFadeIn()
|
||||
|
||||
MouseArea {
|
||||
// setPosition()
|
||||
|
||||
// setPosition()
|
||||
id: ma
|
||||
|
||||
function setPosition() {
|
||||
attractor.pointX = mouseX - 25;
|
||||
attractor.pointY = mouseY - 25;
|
||||
mouseDot.x = mouseX - mouseDot.center;
|
||||
mouseDot.y = mouseY - mouseDot.center;
|
||||
attractor.pointX = mouseX - 25
|
||||
attractor.pointY = mouseY - 25
|
||||
mouseDot.x = mouseX - mouseDot.center
|
||||
mouseDot.y = mouseY - mouseDot.center
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
@ -44,13 +44,14 @@ Rectangle {
|
||||
propagateComposedEvents: true
|
||||
hoverEnabled: true
|
||||
Component.onCompleted: {
|
||||
attractor.pointX = parent.width * 0.5;
|
||||
attractor.pointY = parent.height * 0.5;
|
||||
attractor.pointX = parent.width * 0.5
|
||||
attractor.pointY = parent.height * 0.5
|
||||
}
|
||||
onPositionChanged: {
|
||||
setPosition();
|
||||
setPosition()
|
||||
}
|
||||
onClicked: {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +105,6 @@ Rectangle {
|
||||
magnitudeVariation: 25
|
||||
angleVariation: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ImageParticle {
|
||||
@ -132,7 +132,6 @@ Rectangle {
|
||||
bottom: txtButtonConter.top
|
||||
bottomMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -152,7 +151,6 @@ Rectangle {
|
||||
bottom: name.top
|
||||
bottomMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -181,10 +179,10 @@ Rectangle {
|
||||
highlighted: true
|
||||
text: qsTr("Click me! - 1")
|
||||
onClicked: {
|
||||
focus = false;
|
||||
focus = true;
|
||||
print("Button Clicked!");
|
||||
txtButtonConter.counter = txtButtonConter.counter - 1;
|
||||
focus = false
|
||||
focus = true
|
||||
print("Button Clicked!")
|
||||
txtButtonConter.counter = txtButtonConter.counter - 1
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,10 +190,10 @@ Rectangle {
|
||||
highlighted: true
|
||||
text: qsTr("Exit Wallpaper")
|
||||
onClicked: {
|
||||
focus = false;
|
||||
focus = true;
|
||||
print("Exit Wallpaper");
|
||||
Wallpaper.terminate();
|
||||
focus = false
|
||||
focus = true
|
||||
print("Exit Wallpaper")
|
||||
Wallpaper.terminate()
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,24 +202,32 @@ Rectangle {
|
||||
focusPolicy: Qt.ClickFocus
|
||||
text: qsTr("Click me! +1")
|
||||
onClicked: {
|
||||
print("Button Clicked!");
|
||||
txtButtonConter.counter = txtButtonConter.counter + 1;
|
||||
print("Button Clicked!")
|
||||
txtButtonConter.counter = txtButtonConter.counter + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// WebView {
|
||||
// width: 1000
|
||||
// height: 400
|
||||
// url: "https://screen-play.app"
|
||||
|
||||
WebView {
|
||||
// anchors {
|
||||
// horizontalCenter: parent.horizontalCenter
|
||||
// bottom: parent.bottom
|
||||
// bottomMargin: 50
|
||||
// }
|
||||
|
||||
// }
|
||||
MultimediaView {
|
||||
width: 1000
|
||||
height: 400
|
||||
url: "https://screen-play.app"
|
||||
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 50
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ Rectangle {
|
||||
function init() {
|
||||
switch (Wallpaper.type) {
|
||||
case InstalledType.VideoWallpaper:
|
||||
loader.source = "qrc:/WebView.qml";
|
||||
loader.source = "qrc:/MultimediaView.qml";
|
||||
break;
|
||||
case InstalledType.HTMLWallpaper:
|
||||
loader.setSource("qrc:/WebView.qml", {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4 as QQC
|
||||
import QtQuick.Window 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.wallpapers.image 2.0 as Wallpaper
|
||||
import org.kde.kcm 1.1 as KCM
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.11
|
||||
import QtGraphicalEffects 1.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Window 2.0
|
||||
import Qt.WebSockets 1.15
|
||||
import QtWebEngine 1.8
|
||||
|
@ -3,7 +3,12 @@
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
#include <QtGlobal>
|
||||
#include <QtWebEngine/QtWebEngine>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QtWebEngine>
|
||||
#else
|
||||
#include <QtWebEngineQuick>
|
||||
#endif
|
||||
|
||||
|
||||
#include "ScreenPlayUtil/util.h"
|
||||
|
||||
@ -19,7 +24,13 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QtWebEngine::initialize();
|
||||
#else
|
||||
|
||||
QtWebEngineQuick::initialize();
|
||||
|
||||
#endif
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|
@ -32,7 +32,6 @@ BaseWindow::BaseWindow(
|
||||
, m_debugMode(debugMode)
|
||||
, m_sdk(std::make_unique<ScreenPlaySDK>(appID, type))
|
||||
{
|
||||
qInfo() << "parent";
|
||||
QApplication::instance()->installEventFilter(this);
|
||||
|
||||
qRegisterMetaType<ScreenPlay::InstalledType::InstalledType>();
|
||||
|
@ -175,6 +175,13 @@ WinWindow::WinWindow(
|
||||
connect(this, &BaseWindow::reloadQML, this, [this]() {
|
||||
clearComponentCache();
|
||||
});
|
||||
connect(
|
||||
&m_window, &QQuickView::statusChanged,
|
||||
this, [](auto status) {
|
||||
if (status == QQuickView::Status::Error)
|
||||
QCoreApplication::exit(-1);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
connect(guiAppInst, &QApplication::screenAdded, this, &WinWindow::configureWindowGeometry);
|
||||
connect(guiAppInst, &QApplication::screenRemoved, this, &WinWindow::configureWindowGeometry);
|
||||
connect(guiAppInst, &QApplication::primaryScreenChanged, this, &WinWindow::configureWindowGeometry);
|
||||
@ -470,8 +477,7 @@ void WinWindow::configureWindowGeometry()
|
||||
setWidth(m_window.width());
|
||||
setHeight(m_window.height());
|
||||
|
||||
// Instead of setting "renderType: Text.NativeRendering" every time
|
||||
// we can set it here once :)
|
||||
// Instead of setting "renderType: Text.NativeRendering" every time we can set it here once
|
||||
m_window.setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering);
|
||||
m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView);
|
||||
m_window.setSource(QUrl("qrc:/Wallpaper.qml"));
|
||||
|
Loading…
Reference in New Issue
Block a user