1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Fix more qml enums

This commit is contained in:
Elias Steurer 2023-12-01 18:43:55 +01:00
parent 276a917ebd
commit befdccd306
7 changed files with 16 additions and 17 deletions

View File

@ -242,7 +242,7 @@ Item {
// call popup when we are in the closing animtion.
if (contextMenu.visible || contextMenu.opened)
return;
if (delegate.type === InstalledType.GodotWallpaper) {
if (delegate.type === ContentTypes.InstalledType.GodotWallpaper) {
contextMenu.godotItem = editGodotWallpaperComp.createObject();
contextMenu.insertItem(0, contextMenu.godotItem);
}
@ -260,7 +260,7 @@ Item {
MenuItem {
text: qsTr("Edit Wallpaper")
objectName: "editWallpaper"
enabled: contextMenu.type === InstalledType.GodotWallpaper
enabled: contextMenu.type === ContentTypes.InstalledType.GodotWallpaper
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_edit.svg"
onClicked: {
App.util.openGodotEditor(contextMenu.absoluteStoragePath);

View File

@ -12,7 +12,7 @@ Item {
property string customTitle
property string screenId
property url absoluteStoragePath
property int type: InstalledType.Unknown
property int type: ContentTypes.InstalledType.Unknown
// Must be var to make it work wit 64bit ints
property var publishedFileID: 0
property int itemIndex

View File

@ -6,7 +6,7 @@ Item {
property string absoluteStoragePath
property string sourceImage
property string sourceImageGIF
property var type: InstalledType.Unknown
property var type: ContentTypes.InstalledType.Unknown
function enter() {
if (root.sourceImageGIF != "")

View File

@ -17,7 +17,7 @@ Item {
property string previewImage
property string appID
property var installedType: InstalledType.QMLWallpaper
property var installedType: ContentTypes.InstalledType.QMLWallpaper
property bool monitorWithoutContentSelectable: true
property bool hasContent: appID !== ""
property int fontSize: 10

View File

@ -6,7 +6,6 @@ import QtQuick.Layouts
import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
Util.Popup {
@ -80,7 +79,7 @@ Util.Popup {
availableWidth: width - 20
availableHeight: 150
onRequestProjectSettings: function (index, installedType, appID) {
if (installedType === InstalledType.VideoWallpaper) {
if (installedType === Util.ContentTypes.InstalledType.VideoWallpaper) {
videoControlWrapper.state = "visible";
customPropertiesGridView.visible = false;
const wallpaper = App.screenPlayManager.getWallpaperByAppID(appID);

View File

@ -13,8 +13,8 @@ Rectangle {
function start() {
fadeInImageSetup();
switch (Wallpaper.type) {
case InstalledType.VideoWallpaper:
if (Wallpaper.videoCodec === VideoCodec.Unknown) {
case ContentTypes.InstalledType.VideoWallpaper:
if (Wallpaper.videoCodec === Video.VideoCodec.Unknown) {
Wallpaper.terminate();
}
@ -30,20 +30,20 @@ Rectangle {
loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml";
}
break;
case InstalledType.HTMLWallpaper:
case ContentTypes.InstalledType.HTMLWallpaper:
loader.setSource("qrc:/qml/ScreenPlayWallpaper/qml/WebsiteWallpaper.qml", {
"url": Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
});
break;
case InstalledType.QMLWallpaper:
case ContentTypes.InstalledType.QMLWallpaper:
loader.source = Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute);
break;
case InstalledType.WebsiteWallpaper:
case ContentTypes.InstalledType.WebsiteWallpaper:
loader.setSource("qrc:/qml/ScreenPlayWallpaper/qml/WebsiteWallpaper.qml", {
"url": Wallpaper.projectSourceFileAbsolute
});
break;
case InstalledType.GifWallpaper:
case ContentTypes.InstalledType.GifWallpaper:
loader.setSource("qrc:/qml/ScreenPlayWallpaper/qml/GifWallpaper.qml", {
"source": Qt.resolvedUrl(Wallpaper.projectSourceFileAbsolute)
});
@ -170,7 +170,7 @@ Rectangle {
function onReloadVideo(oldType) {
// We need to check if the old type
// was also Video not get called twice
if (oldType === InstalledType.VideoWallpaper)
if (oldType === ContentTypes.InstalledType.VideoWallpaper)
return;
loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml";
}
@ -183,7 +183,7 @@ Rectangle {
//asynchronous: true
onStatusChanged: {
if (loader.status === Loader.Ready) {
if (Wallpaper.type === InstalledType.QMLWallpaper) {
if (Wallpaper.type === ContentTypes.InstalledType.QMLWallpaper) {
root.fadeIn();
}
}

View File

@ -77,10 +77,10 @@ Item {
asynchronous: true
Component.onCompleted: {
switch (Widget.type) {
case InstalledType.QMLWidget:
case ContentTypes.InstalledType.QMLWidget:
loader.source = Qt.resolvedUrl(Widget.projectSourceFileAbsolute);
break;
case InstalledType.HTMLWidget:
case ContentTypes.InstalledType.HTMLWidget:
loader.sourceComponent = webViewComponent;
break;
}