mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-14 22:42:34 +02:00
Merge remote-tracking branch 'origin/161-refactor-screenplaywallpaper-to-no-longer-inherit-from-basewindow' into 161-refactor-screenplaywallpaper-to-no-longer-inherit-from-basewindow
This commit is contained in:
commit
c74ea74459
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -99,6 +99,30 @@
|
|||||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper",
|
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper",
|
||||||
"type": "cppdbg"
|
"type": "cppdbg"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ScreenPlayWidget Debug",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "cppvsdbg", // Must be set otherwise VSCode does not know we want to debug c++
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"environment": [],
|
||||||
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
|
"windows": {
|
||||||
|
"environment": [
|
||||||
|
{
|
||||||
|
"name": "Path",
|
||||||
|
"value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug/bin/ScreenPlayWidget.exe"
|
||||||
|
},
|
||||||
|
"osx": {
|
||||||
|
"MIMode": "lldb",
|
||||||
|
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_Debug/bin/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget",
|
||||||
|
"type": "cppdbg"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -5,8 +5,15 @@ Item {
|
|||||||
implicitWidth: 300
|
implicitWidth: 300
|
||||||
implicitHeight: 200
|
implicitHeight: 200
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: background
|
||||||
|
anchors.fill:parent
|
||||||
|
opacity: 0.9
|
||||||
|
color: "#333333"
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: name
|
id: text
|
||||||
text: qsTr("My Widget 🚀")
|
text: qsTr("My Widget 🚀")
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,6 @@ bool ProjectFile::init()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Required:
|
// Required:
|
||||||
if (!obj.contains("description"))
|
|
||||||
return false;
|
|
||||||
description = obj.value("description").toString();
|
|
||||||
|
|
||||||
if (!obj.contains("file"))
|
if (!obj.contains("file"))
|
||||||
return false;
|
return false;
|
||||||
file = obj.value("file").toString();
|
file = obj.value("file").toString();
|
||||||
@ -38,7 +34,17 @@ bool ProjectFile::init()
|
|||||||
if (!obj.contains("type"))
|
if (!obj.contains("type"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
auto typeParsed = ScreenPlayUtil::getInstalledTypeFromString(obj.value("type").toString());
|
||||||
|
if (!typeParsed) {
|
||||||
|
qWarning() << "Type could not parsed from: " << *typeParsed;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
type = typeParsed.value();
|
||||||
|
|
||||||
// Optional:
|
// Optional:
|
||||||
|
if (!obj.contains("description"))
|
||||||
|
description = obj.value("description").toString();
|
||||||
|
|
||||||
if (obj.contains("previewGIF"))
|
if (obj.contains("previewGIF"))
|
||||||
previewGIF = obj.value("previewGIF").toString();
|
previewGIF = obj.value("previewGIF").toString();
|
||||||
|
|
||||||
@ -51,9 +57,7 @@ bool ProjectFile::init()
|
|||||||
if (obj.contains("previewThumbnail")) {
|
if (obj.contains("previewThumbnail")) {
|
||||||
preview = obj.value("previewThumbnail").toString();
|
preview = obj.value("previewThumbnail").toString();
|
||||||
} else {
|
} else {
|
||||||
if (!obj.contains("preview")) {
|
if (obj.contains("preview"))
|
||||||
return false;
|
|
||||||
}
|
|
||||||
preview = obj.value("preview").toString();
|
preview = obj.value("preview").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,13 +72,7 @@ bool ProjectFile::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto typeParsed = ScreenPlayUtil::getInstalledTypeFromString(obj.value("type").toString());
|
|
||||||
if (!typeParsed) {
|
|
||||||
qWarning() << "Type could not parsed from: " << *typeParsed;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
type = typeParsed.value();
|
|
||||||
if (type == InstalledType::InstalledType::GifWallpaper) {
|
if (type == InstalledType::InstalledType::GifWallpaper) {
|
||||||
preview = previewGIF;
|
preview = previewGIF;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user