mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-10-06 09:17:07 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ed54cf44f1
0
Content/wallpaper_interactive/Readme.md
Normal file
0
Content/wallpaper_interactive/Readme.md
Normal file
16
Content/wallpaper_interactive/main.qml
Normal file
16
Content/wallpaper_interactive/main.qml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Controls.Material
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
color: "#333333"
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Button {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: "Click me!"
|
||||||
|
}
|
||||||
|
}
|
BIN
Content/wallpaper_interactive/preview.png
Normal file
BIN
Content/wallpaper_interactive/preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 KiB |
11
Content/wallpaper_interactive/project.json
Normal file
11
Content/wallpaper_interactive/project.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"description": "interactive",
|
||||||
|
"file": "main.qml",
|
||||||
|
"preview": "preview.png",
|
||||||
|
"tags": [
|
||||||
|
"interactive"
|
||||||
|
],
|
||||||
|
"title": "QML interactive",
|
||||||
|
"type": "qmlWallpaper",
|
||||||
|
"visibility": "public"
|
||||||
|
}
|
@ -152,6 +152,7 @@ set(RESOURCES
|
|||||||
assets/icons/icon_installed.svg
|
assets/icons/icon_installed.svg
|
||||||
assets/icons/icon_launch.svg
|
assets/icons/icon_launch.svg
|
||||||
assets/icons/icon_minimize.svg
|
assets/icons/icon_minimize.svg
|
||||||
|
assets/icons/icon_contains_audio.svg
|
||||||
assets/icons/icon_movie.svg
|
assets/icons/icon_movie.svg
|
||||||
assets/icons/icon_new_releases.svg
|
assets/icons/icon_new_releases.svg
|
||||||
assets/icons/icon_open_in_new.svg
|
assets/icons/icon_open_in_new.svg
|
||||||
|
11
ScreenPlay/assets/icons/icon_contains_audio.svg
Normal file
11
ScreenPlay/assets/icons/icon_contains_audio.svg
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<g transform="matrix(2.21067,0,0,2.21067,-2.52809,-2.52809)">
|
||||||
|
<g>
|
||||||
|
<g id="volume">
|
||||||
|
<path d="M3,9L7,9L12,4L12,20L7,15L3,15L3,9ZM21,12C21,16.283 18.008,19.868 14,20.777L14,18.71C16.891,17.85 19,15.171 19,12C19,8.829 16.891,6.151 14,5.29L14,3.223C18.008,4.133 21,7.717 21,12ZM17,12C17,14.05 15.766,15.812 14,16.584L14,7.416C15.766,8.188 17,9.95 17,12Z" style="fill-rule:nonzero;"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 907 B |
@ -59,6 +59,7 @@ public:
|
|||||||
SearchType,
|
SearchType,
|
||||||
LastModified,
|
LastModified,
|
||||||
IsNew,
|
IsNew,
|
||||||
|
ContainsAudio,
|
||||||
};
|
};
|
||||||
Q_ENUM(ScreenPlayItem)
|
Q_ENUM(ScreenPlayItem)
|
||||||
|
|
||||||
|
@ -229,6 +229,7 @@ Item {
|
|||||||
customTitle: m_title
|
customTitle: m_title
|
||||||
type: m_type
|
type: m_type
|
||||||
isNew: m_isNew
|
isNew: m_isNew
|
||||||
|
containsAudio: m_containsAudio
|
||||||
screenId: m_folderName
|
screenId: m_folderName
|
||||||
absoluteStoragePath: m_absoluteStoragePath
|
absoluteStoragePath: m_absoluteStoragePath
|
||||||
publishedFileID: m_publishedFileID
|
publishedFileID: m_publishedFileID
|
||||||
|
@ -18,6 +18,7 @@ Item {
|
|||||||
property int itemIndex
|
property int itemIndex
|
||||||
property bool isScrolling: false
|
property bool isScrolling: false
|
||||||
property bool isNew: false
|
property bool isNew: false
|
||||||
|
property bool containsAudio: false
|
||||||
|
|
||||||
signal openContextMenu(point position)
|
signal openContextMenu(point position)
|
||||||
|
|
||||||
@ -157,6 +158,24 @@ Item {
|
|||||||
absoluteStoragePath: m_absoluteStoragePath
|
absoluteStoragePath: m_absoluteStoragePath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: icnAudio
|
||||||
|
|
||||||
|
width: 20
|
||||||
|
height: 20
|
||||||
|
opacity: 0.25
|
||||||
|
visible: root.containsAudio
|
||||||
|
source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_contains_audio.svg"
|
||||||
|
sourceSize: Qt.size(20, 20)
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: icnType.right
|
||||||
|
margins: 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: icnType
|
id: icnType
|
||||||
|
|
||||||
@ -259,6 +278,13 @@ Item {
|
|||||||
to: 0.8
|
to: 0.8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OpacityAnimator {
|
||||||
|
target: icnAudio
|
||||||
|
duration: 80
|
||||||
|
from: 0.25
|
||||||
|
to: 0.8
|
||||||
|
}
|
||||||
|
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
target: effect
|
target: effect
|
||||||
duration: 80
|
duration: 80
|
||||||
@ -291,6 +317,13 @@ Item {
|
|||||||
to: 0.25
|
to: 0.25
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OpacityAnimator {
|
||||||
|
target: icnAudio
|
||||||
|
duration: 80
|
||||||
|
from: 0.8
|
||||||
|
to: 0.25
|
||||||
|
}
|
||||||
|
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
target: effect
|
target: effect
|
||||||
duration: 80
|
duration: 80
|
||||||
|
@ -236,6 +236,18 @@ Item {
|
|||||||
anchors.margins: 20
|
anchors.margins: 20
|
||||||
spacing: 20
|
spacing: 20
|
||||||
|
|
||||||
|
SettingBool {
|
||||||
|
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground.")
|
||||||
|
description: qsTr("Limitations: This setting is Windows only, currently only works if you have exactly one monitor connected, and is limited to wallpapers with no audio. Wallpaper restart is required, when changing this setting!")
|
||||||
|
isChecked: App.settings.checkWallpaperVisible
|
||||||
|
onCheckboxChanged: function (checked) {
|
||||||
|
App.settings.setCheckWallpaperVisible(checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsHorizontalSeperator {
|
||||||
|
}
|
||||||
|
|
||||||
SettingsComboBox {
|
SettingsComboBox {
|
||||||
id: cbVideoFillMode
|
id: cbVideoFillMode
|
||||||
|
|
||||||
|
@ -154,6 +154,8 @@ QVariant InstalledListModel::data(const QModelIndex& index, int role) const
|
|||||||
return m_screenPlayFiles.at(row).tags;
|
return m_screenPlayFiles.at(row).tags;
|
||||||
case static_cast<int>(ScreenPlayItem::IsNew):
|
case static_cast<int>(ScreenPlayItem::IsNew):
|
||||||
return m_screenPlayFiles.at(row).isNew;
|
return m_screenPlayFiles.at(row).isNew;
|
||||||
|
case static_cast<int>(ScreenPlayItem::ContainsAudio):
|
||||||
|
return m_screenPlayFiles.at(row).containsAudio;
|
||||||
case static_cast<int>(ScreenPlayItem::LastModified):
|
case static_cast<int>(ScreenPlayItem::LastModified):
|
||||||
return m_screenPlayFiles.at(row).lastModified;
|
return m_screenPlayFiles.at(row).lastModified;
|
||||||
case static_cast<int>(ScreenPlayItem::SearchType):
|
case static_cast<int>(ScreenPlayItem::SearchType):
|
||||||
@ -181,6 +183,7 @@ QHash<int, QByteArray> InstalledListModel::roleNames() const
|
|||||||
{ static_cast<int>(ScreenPlayItem::Tags), "m_tags" },
|
{ static_cast<int>(ScreenPlayItem::Tags), "m_tags" },
|
||||||
{ static_cast<int>(ScreenPlayItem::SearchType), "m_searchType" },
|
{ static_cast<int>(ScreenPlayItem::SearchType), "m_searchType" },
|
||||||
{ static_cast<int>(ScreenPlayItem::IsNew), "m_isNew" },
|
{ static_cast<int>(ScreenPlayItem::IsNew), "m_isNew" },
|
||||||
|
{ static_cast<int>(ScreenPlayItem::ContainsAudio), "m_containsAudio" },
|
||||||
{ static_cast<int>(ScreenPlayItem::LastModified), "m_lastModified" }
|
{ static_cast<int>(ScreenPlayItem::LastModified), "m_lastModified" }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -259,6 +262,7 @@ QVariantMap InstalledListModel::get(const QString& folderName) const
|
|||||||
map.insert("m_absoluteStoragePath", QUrl::fromLocalFile(item.projectJsonFilePath.dir().path()));
|
map.insert("m_absoluteStoragePath", QUrl::fromLocalFile(item.projectJsonFilePath.dir().path()));
|
||||||
map.insert("m_publishedFileID", item.publishedFileID);
|
map.insert("m_publishedFileID", item.publishedFileID);
|
||||||
map.insert("m_isNew", item.isNew);
|
map.insert("m_isNew", item.isNew);
|
||||||
|
map.insert("m_containsAudio", item.containsAudio);
|
||||||
map.insert("m_lastModified", item.lastModified);
|
map.insert("m_lastModified", item.lastModified);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ struct ProjectFile {
|
|||||||
InstalledType::InstalledType type = InstalledType::InstalledType::Unknown;
|
InstalledType::InstalledType type = InstalledType::InstalledType::Unknown;
|
||||||
SearchType::SearchType searchType = SearchType::SearchType::All;
|
SearchType::SearchType searchType = SearchType::SearchType::All;
|
||||||
bool isNew = false;
|
bool isNew = false;
|
||||||
|
bool containsAudio = false;
|
||||||
QDateTime lastModified;
|
QDateTime lastModified;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -101,6 +101,11 @@ bool ProjectFile::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == ScreenPlay::InstalledType::InstalledType::VideoWallpaper){
|
||||||
|
QFileInfo audioFile(folder.absolutePath() + "/audio.mp3");
|
||||||
|
containsAudio = audioFile.exists();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool ProjectFile::isValid()
|
bool ProjectFile::isValid()
|
||||||
|
@ -47,6 +47,7 @@ int main(int argc, char* argv[])
|
|||||||
QString exampleContentPath = QString(SCREENPLAY_SOURCE_DIR) + "/Content";
|
QString exampleContentPath = QString(SCREENPLAY_SOURCE_DIR) + "/Content";
|
||||||
QStringList contentFolder = {
|
QStringList contentFolder = {
|
||||||
"/wallpaper_video_nebula",
|
"/wallpaper_video_nebula",
|
||||||
|
"/wallpaper_interactive",
|
||||||
"/wallpaper_landscape",
|
"/wallpaper_landscape",
|
||||||
"/wallpaper_particles"
|
"/wallpaper_particles"
|
||||||
};
|
};
|
||||||
|
@ -75,6 +75,15 @@ Item {
|
|||||||
mediaPlayer.position = currentTime * mediaPlayer.duration;
|
mediaPlayer.position = currentTime * mediaPlayer.duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onVisualsPausedChanged(visualsPaused) {
|
||||||
|
if(!Wallpaper.isPlaying)
|
||||||
|
return
|
||||||
|
if(visualsPaused)
|
||||||
|
mediaPlayer.pause()
|
||||||
|
else
|
||||||
|
mediaPlayer.play()
|
||||||
|
}
|
||||||
|
|
||||||
target: Wallpaper
|
target: Wallpaper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,15 @@ ScreenPlay::WallpaperExitCode BaseWindow::setup()
|
|||||||
setType(projectFile.type);
|
setType(projectFile.type);
|
||||||
setProjectSourceFile(projectFile.file);
|
setProjectSourceFile(projectFile.file);
|
||||||
|
|
||||||
|
// We do not yet have implemented continue playing the audio.mp3 yet
|
||||||
|
// so disable the checkWallpaperVisible for now
|
||||||
|
if(checkWallpaperVisible()){
|
||||||
|
if(projectFile.containsAudio){
|
||||||
|
qInfo() << "Disable wallpaper visible check, because it contains audio.";
|
||||||
|
setCheckWallpaperVisible(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_type == ScreenPlay::InstalledType::InstalledType::WebsiteWallpaper) {
|
if (m_type == ScreenPlay::InstalledType::InstalledType::WebsiteWallpaper) {
|
||||||
setProjectSourceFileAbsolute(projectFile.url);
|
setProjectSourceFileAbsolute(projectFile.url);
|
||||||
} else {
|
} else {
|
||||||
|
@ -148,8 +148,9 @@ ScreenPlay::WallpaperExitCode WinWindow::start()
|
|||||||
|
|
||||||
configureWindowGeometry();
|
configureWindowGeometry();
|
||||||
|
|
||||||
// We do not support autopause for multi monitor wallpaper
|
// We do not support autopause for multi monitor wallpaper and
|
||||||
if (this->activeScreensList().length() == 1) {
|
// wallpaper than contain audio, see BaseWindow::setup().
|
||||||
|
if (activeScreensList().length() == 1) {
|
||||||
if (checkWallpaperVisible()) {
|
if (checkWallpaperVisible()) {
|
||||||
m_checkForFullScreenWindowTimer.start(10);
|
m_checkForFullScreenWindowTimer.start(10);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
## Tools
|
## Tools
|
||||||
|
|
||||||
This folder contains serveral python tools to help with development. Depending on your os you have to change the python command to ```python```, ```python3``` or ```python3.9```
|
This folder contains serveral python tools to help with development. Depending on your os you have to change the python command to ```python```, ```python3``. Download python dependencies first:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
cd Tools
|
||||||
|
python -m pip install -r requirements.txt
|
||||||
|
```
|
||||||
#### setup.py
|
#### setup.py
|
||||||
- Installs third party c++ dependencies for all platforms
|
- Installs third party c++ dependencies for all platforms
|
||||||
- ```python3 setup.py -u=xxx -p=xxx```
|
- ```python3 setup.py```
|
||||||
#### build.py
|
#### build.py
|
||||||
- Build ScreenPlay locally
|
- Build ScreenPlay locally
|
||||||
- ```python3 build.py -t=release```
|
- ```python3 build.py -t=release```
|
||||||
|
Loading…
Reference in New Issue
Block a user