mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
Merge branch '161-refactor-screenplaywallpaper-to-no-longer-inherit-from-basewindow' into 'master'
Resolve "Refactor ScreenPlayWallpaper to no longer inherit from BaseWindow" Closes #161 See merge request kelteseth/ScreenPlay!101
This commit is contained in:
commit
b6f5fc91ad
1
.gitignore
vendored
1
.gitignore
vendored
@ -258,3 +258,4 @@ cython_debug/
|
||||
/Tools/Steam/ContentBuilder/builder_osx/**
|
||||
/tmp_steam_config/**
|
||||
/Tools/Steam/ContentBuilder/output/**
|
||||
/.vscode/settings.json
|
||||
|
@ -14,7 +14,7 @@ stages:
|
||||
# Otherwise libglib2 needs interaction
|
||||
- export DEBIAN_FRONTEND=noninteractive
|
||||
- apt update -y
|
||||
- apt install curl wget zip unzip tar git pkg-config libxcb-* libfontconfig-dev apt-transport-https ca-certificates gnupg software-properties-common python3 python3-pip build-essential libgl1-mesa-dev mesa-common-dev lld ninja-build libxkbcommon-* -y
|
||||
- apt install curl wget zip unzip tar git pkg-config libxcb-* libfontconfig-dev apt-transport-https ca-certificates gnupg software-properties-common python3 python3-pip build-essential libgl1-mesa-dev mesa-common-dev lld ninja-build libxkbcommon-* libx11-dev xserver-xorg-dev xorg-dev -y
|
||||
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||
- echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||
- apt update -y
|
||||
|
149
.vscode/launch.json
vendored
149
.vscode/launch.json
vendored
@ -5,49 +5,148 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "MacOS (lldb) Debug",
|
||||
"type": "cppdbg",
|
||||
"name": "ScreenPlay Debug",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay",
|
||||
"args": [],
|
||||
"type": "cppvsdbg", // Must be set otherwise VSCode does not know we want to debug c++
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "lldb"
|
||||
},
|
||||
{
|
||||
|
||||
"name": "Windows Debug ScreenPlay",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug/bin/ScreenPlay.exe",
|
||||
"args": [],
|
||||
"preLaunchTask": "CMake: build",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"visualizerFile": "${workspaceFolder}/.vscode/qt.natvis.xml",
|
||||
"showDisplayString": true,
|
||||
"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\\;"
|
||||
"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\\;"
|
||||
}
|
||||
],
|
||||
"visualizerFile": "${workspaceFolder}/.vscode/qt.natvis.xml"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Windows RelWithDebInfo ScreenPlay",
|
||||
"type": "cppvsdbg",
|
||||
"name": "ScreenPlay RelWithDebInfo",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_RelWithDebInfo/bin/ScreenPlay.exe",
|
||||
"args": [],
|
||||
"preLaunchTask": "CMake: build",
|
||||
"type": "cppvsdbg", // Must be set otherwise VSCode does not know we want to debug c++
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"visualizerFile": "${workspaceFolder}/.vscode/qt.natvis.xml",
|
||||
"showDisplayString": true,
|
||||
"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\\;"
|
||||
"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\\;"
|
||||
}
|
||||
],
|
||||
"visualizerFile": "${workspaceFolder}/.vscode/qt.natvis.xml"
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_RelWithDebInfo/bin/ScreenPlay.exe"
|
||||
},
|
||||
"osx": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ScreenPlayWallpaper 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.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;"
|
||||
}
|
||||
],
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlayWallpaper.exe"
|
||||
},
|
||||
"osx": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ScreenPlayWallpaper RelWithDebInfo",
|
||||
"request": "launch",
|
||||
"type": "cppvsdbg", // Must be set otherwise VSCode does not know we want to debug c++
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"visualizerFile": "${workspaceFolder}/.vscode/qt.natvis.xml",
|
||||
"showDisplayString": true,
|
||||
"windows": {
|
||||
"environment": [
|
||||
{
|
||||
"name": "Path",
|
||||
"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\\;"
|
||||
}
|
||||
],
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_RelWithDebInfo/bin/ScreenPlayWallpaper.exe"
|
||||
},
|
||||
"osx": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"visualizerFile": "${workspaceFolder}/.vscode/qt.natvis.xml",
|
||||
"showDisplayString": true,
|
||||
"windows": {
|
||||
"environment": [
|
||||
{
|
||||
"name": "Path",
|
||||
"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\\;"
|
||||
}
|
||||
],
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlayWidget.exe"
|
||||
},
|
||||
"osx": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
120
.vscode/tasks.json
vendored
120
.vscode/tasks.json
vendored
@ -12,6 +12,126 @@
|
||||
"group": "build",
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template build task"
|
||||
},
|
||||
{
|
||||
"type": "process",
|
||||
"label": "Format Cpp files",
|
||||
"command": "python3",
|
||||
"windows": {
|
||||
"command": "python"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools"
|
||||
},
|
||||
"args": [
|
||||
"clang_format.py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "process",
|
||||
"label": "Format CMake files",
|
||||
"command": "python3",
|
||||
"windows": {
|
||||
"command": "python"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools"
|
||||
},
|
||||
"args": [
|
||||
"cmake_format.py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "process",
|
||||
"label": "Format Qml files",
|
||||
"command": "python3",
|
||||
"windows": {
|
||||
"command": "python"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools"
|
||||
},
|
||||
"args": [
|
||||
"qml_format.py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "process",
|
||||
"label": "Run setup.py",
|
||||
"command": "python3",
|
||||
"windows": {
|
||||
"command": "python"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools"
|
||||
},
|
||||
"args": [
|
||||
"setup.py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "process",
|
||||
"label": "Export ScreenPlay release, with deploy and steam enabled",
|
||||
"command": "python3",
|
||||
"windows": {
|
||||
"command": "python"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools"
|
||||
},
|
||||
"osx": {
|
||||
"args": [
|
||||
"build.py",
|
||||
"-type=release",
|
||||
"-deploy-version",
|
||||
"-steam",
|
||||
"-architecture=arm64"
|
||||
]
|
||||
},
|
||||
"args": [
|
||||
"build.py",
|
||||
"-type=release",
|
||||
"-deploy-version",
|
||||
"-steam"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "process",
|
||||
"label": "Update Qt *.ts translations",
|
||||
"command": "python3",
|
||||
"windows": {
|
||||
"command": "python"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools"
|
||||
},
|
||||
"args": [
|
||||
"update_translations.py"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -3,8 +3,7 @@ project(CMake)
|
||||
set(FILES
|
||||
CopyRecursive.cmake
|
||||
CreateIFWInstaller.cmake
|
||||
FetchContentThirdParty.cmake
|
||||
QtUpdateTranslations.cmake)
|
||||
FetchContentThirdParty.cmake)
|
||||
|
||||
add_custom_target(
|
||||
${PROJECT_NAME}
|
||||
|
@ -1,16 +0,0 @@
|
||||
find_program(LUPDATE_EXECUTABLE lupdate)
|
||||
find_program(LRELEASE_EXECUTABLE lrelease)
|
||||
|
||||
# Updates all ts files and generates .qm
|
||||
# Absolute paths are needed!
|
||||
# qt_update_translations("${CMAKE_CURRENT_SOURCE_DIR}/qml" "${L10N_LIST}")
|
||||
# The second argument (list) __must__ be passed as string!
|
||||
function(qt_update_translations SOURCE_PATH TS_FILES)
|
||||
|
||||
foreach(_ts_file ${TS_FILES})
|
||||
message(STATUS "Update Translation: ${_ts_file}")
|
||||
execute_process(COMMAND ${LUPDATE_EXECUTABLE} -noobsolete -locations none -recursive ${SOURCE_PATH} -ts ${_ts_file} OUTPUT_QUIET)
|
||||
execute_process(COMMAND ${LRELEASE_EXECUTABLE} ${_ts_file} OUTPUT_QUIET)
|
||||
endforeach()
|
||||
|
||||
endfunction()
|
@ -19,7 +19,7 @@
|
||||
},
|
||||
"environment" : {
|
||||
"qt_path": "${sourceDir}/../aqt",
|
||||
"qt_version": "6.4.2",
|
||||
"qt_version": "6.5.0",
|
||||
"VCToolsVersion": "14.34.31933",
|
||||
"WindowsSDKVersion" : "10.0.22621.0",
|
||||
"VCArch": "x64",
|
||||
@ -46,24 +46,24 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-debug-qt-6.4.2",
|
||||
"name": "windows-debug-qt-6.5.0",
|
||||
"inherits": "default-windows",
|
||||
"displayName": "MSVC K3000 Qt 6.4.2 Debug",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug",
|
||||
"displayName": "MSVC SP Qt 6.5.0 Debug",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug",
|
||||
"environment": {
|
||||
"qt_version": "6.4.2"
|
||||
"qt_version": "6.5.0"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-debug-qt-6.4.2",
|
||||
"name": "windows-relwithdebinfo-qt-6.5.0",
|
||||
"inherits": "default-windows",
|
||||
"displayName": "MSVC K3000 Qt 6.4.2 RelWithDebInfo",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_MSVC_RelWithDebInfo",
|
||||
"displayName": "MSVC SP Qt 6.5.0 RelWithDebInfo",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_MSVC_RelWithDebInfo",
|
||||
"environment": {
|
||||
"qt_version": "6.4.2"
|
||||
"qt_version": "6.5.0"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
@ -74,7 +74,7 @@
|
||||
"displayName": "ScreenPlay 64bit Debug Linux",
|
||||
"description": "Linux only!",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
@ -96,12 +96,21 @@
|
||||
"VCPKG_TARGET_TRIPLET": "x64-linux"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-relwithdebinfo",
|
||||
"displayName": "ScreenPlay 64bit RelWithDebInfo Linux",
|
||||
"inherits":"linux-debug",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "osx-debug",
|
||||
"displayName": "ScreenPlay 64bit Debug osx",
|
||||
"description": "Osx only!",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.3.2_Clang",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
@ -118,9 +127,18 @@
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_PREFIX_PATH": "$env{qt_path}/6.3.2/macos",
|
||||
"CMAKE_PREFIX_PATH": "$env{qt_path}/6.5.0/macos",
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "osx-relwithdebinfo",
|
||||
"displayName": "ScreenPlay 64bit RelWithDebInfo osx",
|
||||
"inherits": "osx-debug",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
@ -14,12 +14,14 @@
|
||||
2. Python 3.11+ and select `Add to Path` during the installation. [Download](https://www.python.org/downloads/)
|
||||
3. Optional if you do not have tools like `git` or `cmake` installed, we recommend `Chocolatey`:
|
||||
1. Chocolatey via Powershell (Administrator) [Download](https://chocolatey.org/install)
|
||||
2. Run `choco.exe install git cmake -y`
|
||||
2. Run `choco.exe install git vscode cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y`
|
||||
|
||||
## Linux
|
||||
1. Install dependencies for Debian/Ubuntu:
|
||||
``` bash
|
||||
sudo apt install build-essential git gpg ffmpeg mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar cmake pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common python3 python3-pip libgl1-mesa-dev lld ninja-build qml-module-qt-websockets qtwebengine5-* -y
|
||||
# Only needed if we want x11 support
|
||||
sudo apt-get install libx11-dev xserver-xorg-dev xorg-dev
|
||||
```
|
||||
|
||||
## MacOS
|
||||
@ -27,29 +29,42 @@ sudo apt install build-essential git gpg ffmpeg mesa-common-dev libxkbcommon-* l
|
||||
1. Install [brew](https://brew.sh) that is needed by some third party vcpkg packages. Do not forget to add brew to your path as outlined at the on of the installation!
|
||||
- `brew install pkg-config git llvm cmake`
|
||||
|
||||
# Setup QtCreator and compile ScreenPlay
|
||||
1. Clone ScreenPlay
|
||||
# Download ScreenPlay and dependencies
|
||||
``` bash
|
||||
git clone --recursive https://gitlab.com/kelteseth/ScreenPlay.git ScreenPlay/ScreenPlay
|
||||
cd ScreenPlay
|
||||
```
|
||||
1. Start the following script to download _all_ needed dependencies automatically.
|
||||
Downloading dependencies is 100% automated. Simply run the `setup.py` script
|
||||
``` bash
|
||||
cd Tools
|
||||
# Windows defaults to python, linux and macOS uses python3
|
||||
python -m pip install -r requirements.txt
|
||||
# This scrit will:
|
||||
# 1. Downloads `Qt` and `QtCreator`
|
||||
# 2. Create a `vcpkg` folder for dependencies
|
||||
# 3. Compiles the dependencies
|
||||
# 4. Downloads ffmpeg
|
||||
python setup.py
|
||||
```
|
||||
1. This will:
|
||||
1. Download `Qt` and `QtCreator`
|
||||
2. Create a `vcpkg` folder for dependencies
|
||||
3. Compile the dependencies
|
||||
4. Download ffmpeg
|
||||
2. Open QtCreator or VSCode
|
||||
Now you can either use VSCode or QtCreator:
|
||||
# Option 1 (Recommended): Setup VSCode and compile ScreenPlay
|
||||
1. Open VSCode
|
||||
1. Install these extentions:
|
||||
1. [C/C++ for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
|
||||
1. [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
|
||||
2. Press: `CTRL` + `SHIFT` + `P` for every command:
|
||||
1. `CMake: Select Configure Preset`. Select one of the listed presets like `MSVC SP Qt 6.4.2 Debug`
|
||||
2. `CMake: Configure`
|
||||
4. Press `F7` to Compile and `F5` to run!
|
||||
|
||||
⚠️ Do not forget to switch you CMake build target when switching run targets! For example you need to select the `debug` run target when you compile in `debug` mode!
|
||||
# Option 2: Setup QtCreator and compile ScreenPlay
|
||||
1. Open QtCreator at:
|
||||
1. Windows: `..\aqt\Tools\QtCreator\bin\qtcreator.exe`
|
||||
2. Linux: `../aqt/Tools/QtCreator/bin/qtcreator`
|
||||
3. MacOS: `../aqt/Qt Creator`
|
||||
3. Select the imported temporary kit like `ScreenPlay 64bit Debug Windows MSVC 2022 Community`
|
||||
4. Compile!
|
||||
2. Select the imported temporary kit like `MSVC SP Qt 6.4.2 Debug`
|
||||
3. Press `CTRL` + `B` to Compile and `F5` to run!
|
||||
|
||||
# Developer docs
|
||||
We use qdoc to generate documentation. Qt6 is the minimum version qdoc, because of vastly improved c++ parsing support.
|
||||
|
661
Docs/Legal/agpl-3.0-only.txt
Normal file
661
Docs/Legal/agpl-3.0-only.txt
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
@ -2,70 +2,125 @@
|
||||
# C:\Qt\6.1.0\msvc2019_64\bin\qdoc.exe config.qdocconf
|
||||
# in this directory. You can shift + right click in this explorer
|
||||
# window and select "Open PowerShell Window here" for this.
|
||||
|
||||
include(C:\Qt\6.1.0\msvc2019_64\doc\global\qt-cpp-defines.qdocconf)
|
||||
include(C:\Qt\6.1.0\msvc2019_64\doc\global\compat.qdocconf)
|
||||
include(C:\Qt\6.1.0\msvc2019_64\doc\global\fileextensions.qdocconf)
|
||||
QT_VER = 6.4.1
|
||||
QT_VERSION = 6.4.1
|
||||
include(C:\Qt\6.4.1\msvc2019_64\doc\global\qt-cpp-defines.qdocconf)
|
||||
include(C:\Qt\6.4.1\msvc2019_64\doc\global\compat.qdocconf)
|
||||
include(C:\Qt\6.4.1\msvc2019_64\doc\global\fileextensions.qdocconf)
|
||||
include(C:\Qt\6.4.1\msvc2019_64\doc\global\macros.qdocconf)
|
||||
|
||||
descripton = ScreenPlay is an open source cross plattform app for displaying Wallpaper, Widgets and AppDrawer.
|
||||
language = Cpp
|
||||
project = ScreenPlay
|
||||
|
||||
# Source
|
||||
sourcedirs += ../ScreenPlay/src/
|
||||
sourcedirs += ../ScreenPlay/
|
||||
sourcedirs += ../ScreenPlay/inc/public/ScreenPlay/
|
||||
sourcedirs += ../ScreenPlay/src/
|
||||
|
||||
sourcedirs += ../ScreenPlaySDK/
|
||||
sourcedirs += ../ScreenPlaySysInfo/
|
||||
sourcedirs += ../ScreenPlayWallpaper/src/
|
||||
sourcedirs += ../ScreenPlayWallpaper/
|
||||
sourcedirs += ../ScreenPlayWidget/src/
|
||||
sourcedirs += ../ScreenPlayWidget/
|
||||
sourcedirs += ../ScreenPlaySDK/inc/public/ScreenPlaySDK/
|
||||
sourcedirs += ../ScreenPlaySDK/src/
|
||||
|
||||
sourcedirs += ../ScreenPlayShader/
|
||||
sourcedirs += ../ScreenPlayShader/src/
|
||||
|
||||
sourcedirs += ../ScreenPlaySysInfo/
|
||||
sourcedirs += ../ScreenPlaySysInfo/src/
|
||||
|
||||
sourcedirs += ../ScreenPlayUtil/
|
||||
sourcedirs += ../ScreenPlayUtil/inc/public/ScreenPlayUtil/
|
||||
sourcedirs += ../ScreenPlayUtil/src/
|
||||
|
||||
sourcedirs += ../ScreenPlayWallpaper/
|
||||
sourcedirs += ../ScreenPlayWallpaper/src/
|
||||
|
||||
sourcedirs += ../ScreenPlayWeather/
|
||||
sourcedirs += ../ScreenPlayWeather/src/
|
||||
|
||||
sourcedirs += ../ScreenPlayWidget/
|
||||
sourcedirs += ../ScreenPlayWidget/src/
|
||||
|
||||
sourcedirs += ../ScreenPlayWorkshop/
|
||||
sourcedirs += ../ScreenPlayWorkshop/src/
|
||||
|
||||
# Header
|
||||
headerdirs += ../ScreenPlay/src/
|
||||
headerdirs += ../ScreenPlay/
|
||||
headerdirs += ../ScreenPlay/inc/public/ScreenPlay/
|
||||
headerdirs += ../ScreenPlay/src/
|
||||
|
||||
headerdirs += ../ScreenPlaySDK/
|
||||
headerdirs += ../ScreenPlaySDK/inc/
|
||||
headerdirs += ../ScreenPlaySysInfo/
|
||||
headerdirs += ../ScreenPlayWallpaper/src/
|
||||
headerdirs += ../ScreenPlayWallpaper/
|
||||
headerdirs += ../ScreenPlayWidget/src/
|
||||
headerdirs += ../ScreenPlayWidget/
|
||||
headerdirs += ../ScreenPlaySDK/inc/public/ScreenPlaySDK/
|
||||
headerdirs += ../ScreenPlaySDK/src/
|
||||
|
||||
headerdirs += ../ScreenPlayShader/
|
||||
headerdirs += ../ScreenPlayUtil/inc/
|
||||
headerdirs += ../ScreenPlayShader/src/
|
||||
|
||||
headerdirs += ../ScreenPlaySysInfo/
|
||||
headerdirs += ../ScreenPlaySysInfo/src/
|
||||
|
||||
headerdirs += ../ScreenPlayUtil/
|
||||
headerdirs += ../ScreenPlayUtil/inc/public/ScreenPlayUtil/
|
||||
headerdirs += ../ScreenPlayUtil/src/
|
||||
|
||||
headerdirs += ../ScreenPlayWallpaper/
|
||||
headerdirs += ../ScreenPlayWallpaper/src/
|
||||
|
||||
headerdirs += ../ScreenPlayWeather/
|
||||
headerdirs += ../ScreenPlayWeather/src/
|
||||
|
||||
headerdirs += ../ScreenPlayWidget/
|
||||
headerdirs += ../ScreenPlayWidget/src/
|
||||
|
||||
headerdirs += ../ScreenPlayWorkshop/
|
||||
headerdirs += ../ScreenPlayWorkshop/src/
|
||||
|
||||
# Include
|
||||
includepaths += ../ScreenPlay/src/
|
||||
includepaths += ../ScreenPlay/
|
||||
includepaths += ../ScreenPlay/inc/public/ScreenPlay/
|
||||
includepaths += ../ScreenPlay/src/
|
||||
|
||||
includepaths += ../ScreenPlaySDK/
|
||||
includepaths += ../ScreenPlaySDK/inc/public/ScreenPlaySDK/
|
||||
includepaths += ../ScreenPlaySDK/src/
|
||||
includepaths += ../ScreenPlaySysInfo/
|
||||
includepaths += ../ScreenPlayWallpaper/src/
|
||||
includepaths += ../ScreenPlayWallpaper/
|
||||
includepaths += ../ScreenPlayWidget/src/
|
||||
includepaths += ../ScreenPlayWidget/
|
||||
|
||||
includepaths += ../ScreenPlayShader/
|
||||
includepaths += ../ScreenPlayShader/src/
|
||||
|
||||
includepaths += ../ScreenPlaySysInfo/
|
||||
includepaths += ../ScreenPlaySysInfo/src/
|
||||
|
||||
includepaths += ../ScreenPlayUtil/
|
||||
includepaths += ../ScreenPlayUtil/inc/public/ScreenPlayUtil/
|
||||
includepaths += ../ScreenPlayUtil/src/
|
||||
|
||||
includepaths += ../ScreenPlayWallpaper/
|
||||
includepaths += ../ScreenPlayWallpaper/src/
|
||||
|
||||
includepaths += ../ScreenPlayWeather/
|
||||
includepaths += ../ScreenPlayWeather/src/
|
||||
|
||||
includepaths += ../ScreenPlayWidget/
|
||||
includepaths += ../ScreenPlayWidget/src/
|
||||
|
||||
includepaths += ../ScreenPlayWorkshop/
|
||||
includepaths += ../ScreenPlayWorkshop/src/
|
||||
|
||||
|
||||
# qt
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtCore/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtGui/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtQml/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtWebEngine/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtNetwork/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtQuick/
|
||||
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtQuickControls2/
|
||||
|
||||
|
||||
QT_INSTALL_HEADERS = C:/Qt/6.4.1/msvc2019_64/include/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtCore/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtGui/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtQml/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtWebEngine/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtNetwork/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtQuick/
|
||||
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtQuickControls2/
|
||||
|
||||
# Images
|
||||
imagedirs = ./images
|
||||
|
||||
|
||||
# what kind of sources should be processed
|
||||
sources.fileextensions += "*.qdoc *.cpp *.qml"
|
||||
|
||||
|
7
Docs/css/bootstrap.min.css
vendored
7
Docs/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
6
Docs/js/bootstrap.bundle.min.js
vendored
6
Docs/js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -191,6 +191,7 @@ set(RESOURCES
|
||||
assets/images/scale_window_indicator.png
|
||||
assets/images/steam_offline.png
|
||||
assets/images/trayIcon_windows.png
|
||||
assets/images/trayIcon_osx.png
|
||||
assets/images/Window.svg
|
||||
assets/licenses/Apache2.txt
|
||||
assets/licenses/OFL.txt
|
||||
@ -219,7 +220,6 @@ set(RESOURCES
|
||||
assets/startinfo/vscode.png
|
||||
assets/wizards/example_html.png
|
||||
assets/wizards/example_qml.png
|
||||
assets/wizards/QmlProject.qmlproject
|
||||
assets/wizards/License_All_Rights_Reserved_1.0.txt
|
||||
assets/wizards/License_Apache_2.0.txt
|
||||
assets/wizards/License_CC0_1.0.txt
|
||||
@ -227,6 +227,7 @@ set(RESOURCES
|
||||
assets/wizards/License_CC_Attribution-ShareAlike_4.0.txt
|
||||
assets/wizards/License_CC_Attribution_4.0.txt
|
||||
assets/wizards/License_GPL_3.0.txt
|
||||
assets/wizards/QmlProject.qmlproject
|
||||
assets/WorkshopPreview.html
|
||||
legal/DataProtection.txt
|
||||
legal/gpl-3.0.txt
|
||||
@ -260,6 +261,7 @@ find_package(
|
||||
Widgets
|
||||
WebSockets
|
||||
Svg
|
||||
Xml
|
||||
LinguistTools
|
||||
Test)
|
||||
|
||||
@ -283,6 +285,7 @@ qt_add_qml_module(
|
||||
${HEADER}
|
||||
RESOURCES
|
||||
${RESOURCES})
|
||||
|
||||
target_link_libraries(
|
||||
ScreenPlayApp
|
||||
PUBLIC ScreenPlaySDK
|
||||
@ -294,6 +297,7 @@ target_link_libraries(
|
||||
Qt6::WebSockets
|
||||
Qt6::Svg
|
||||
Qt6::QuickControls2
|
||||
Qt6::Xml
|
||||
ScreenPlayUtil
|
||||
ScreenPlayUtilplugin
|
||||
QArchive
|
||||
@ -323,14 +327,6 @@ else()
|
||||
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations")
|
||||
endif()
|
||||
|
||||
# qt_add_lupdate does not work for some reason. Lets do it manually:
|
||||
find_program(LUPDATE_EXECUTABLE lupdate)
|
||||
foreach(_ts_file ${TS_FILES})
|
||||
message(STATUS "Update Translation: ${_ts_file}")
|
||||
execute_process(COMMAND ${LUPDATE_EXECUTABLE} -noobsolete -locations none -recursive ${CMAKE_CURRENT_SOURCE_DIR}/qml -ts
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${_ts_file} OUTPUT_QUIET)
|
||||
endforeach()
|
||||
|
||||
qt_add_lrelease(${PROJECT_NAME} TS_FILES ${TS_FILES})
|
||||
|
||||
target_include_directories(
|
||||
|
BIN
ScreenPlay/assets/images/trayIcon_osx.png
Normal file
BIN
ScreenPlay/assets/images/trayIcon_osx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -87,105 +87,19 @@ public slots:
|
||||
QString version() const;
|
||||
void showDockIcon(const bool show);
|
||||
void exit();
|
||||
|
||||
QPointF cursorPos() { return QCursor::pos(); }
|
||||
|
||||
void setGlobalVariables(GlobalVariables* globalVariables)
|
||||
{
|
||||
if (m_globalVariables.get() == globalVariables)
|
||||
return;
|
||||
|
||||
m_globalVariables.reset(globalVariables);
|
||||
emit globalVariablesChanged(m_globalVariables.get());
|
||||
}
|
||||
void setScreenPlayManager(ScreenPlayManager* screenPlayManager)
|
||||
{
|
||||
if (m_screenPlayManager.get() == screenPlayManager)
|
||||
return;
|
||||
|
||||
m_screenPlayManager.reset(screenPlayManager);
|
||||
emit screenPlayManagerChanged(m_screenPlayManager.get());
|
||||
}
|
||||
|
||||
void setCreate(Create* create)
|
||||
{
|
||||
if (m_create.get() == create)
|
||||
return;
|
||||
|
||||
m_create.reset(create);
|
||||
emit createChanged(m_create.get());
|
||||
}
|
||||
|
||||
void setUtil(Util* util)
|
||||
{
|
||||
if (m_util.get() == util)
|
||||
return;
|
||||
|
||||
m_util.reset(util);
|
||||
emit utilChanged(m_util.get());
|
||||
}
|
||||
|
||||
void setSettings(Settings* settings)
|
||||
{
|
||||
if (m_settings.get() == settings)
|
||||
return;
|
||||
|
||||
m_settings.reset(settings);
|
||||
emit settingsChanged(m_settings.get());
|
||||
}
|
||||
|
||||
void setInstalledListModel(InstalledListModel* installedListModel)
|
||||
{
|
||||
if (m_installedListModel.get() == installedListModel)
|
||||
return;
|
||||
|
||||
m_installedListModel.reset(installedListModel);
|
||||
emit installedListModelChanged(m_installedListModel.get());
|
||||
}
|
||||
void setMonitorListModel(MonitorListModel* monitorListModel)
|
||||
{
|
||||
if (m_monitorListModel.get() == monitorListModel)
|
||||
return;
|
||||
|
||||
m_monitorListModel.reset(monitorListModel);
|
||||
emit monitorListModelChanged(m_monitorListModel.get());
|
||||
}
|
||||
|
||||
void setProfileListModel(ProfileListModel* profileListModel)
|
||||
{
|
||||
if (m_profileListModel.get() == profileListModel)
|
||||
return;
|
||||
|
||||
m_profileListModel.reset(profileListModel);
|
||||
emit profileListModelChanged(m_profileListModel.get());
|
||||
}
|
||||
|
||||
void setInstalledListFilter(InstalledListFilter* installedListFilter)
|
||||
{
|
||||
if (m_installedListFilter.get() == installedListFilter)
|
||||
return;
|
||||
|
||||
m_installedListFilter.reset(installedListFilter);
|
||||
emit installedListFilterChanged(m_installedListFilter.get());
|
||||
}
|
||||
|
||||
void setMainWindowEngine(QQmlApplicationEngine* mainWindowEngine)
|
||||
{
|
||||
if (m_mainWindowEngine.get() == mainWindowEngine)
|
||||
return;
|
||||
|
||||
m_mainWindowEngine.reset(mainWindowEngine);
|
||||
emit mainWindowEngineChanged(m_mainWindowEngine.get());
|
||||
}
|
||||
|
||||
void setWizards(Wizards* wizards)
|
||||
{
|
||||
if (m_wizards.get() == wizards)
|
||||
return;
|
||||
|
||||
m_wizards.reset(wizards);
|
||||
emit wizardsChanged(m_wizards.get());
|
||||
}
|
||||
void setGlobalVariables(GlobalVariables* globalVariables);
|
||||
void setScreenPlayManager(ScreenPlayManager* screenPlayManager);
|
||||
void setCreate(Create* create);
|
||||
void setUtil(Util* util);
|
||||
void setSettings(Settings* settings);
|
||||
void setInstalledListModel(InstalledListModel* installedListModel);
|
||||
void setMonitorListModel(MonitorListModel* monitorListModel);
|
||||
void setProfileListModel(ProfileListModel* profileListModel);
|
||||
void setInstalledListFilter(InstalledListFilter* installedListFilter);
|
||||
void setMainWindowEngine(QQmlApplicationEngine* mainWindowEngine);
|
||||
void setWizards(Wizards* wizards);
|
||||
|
||||
private:
|
||||
bool setupKDE();
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
Type,
|
||||
Preview,
|
||||
PreviewGIF,
|
||||
FolderId,
|
||||
FolderName,
|
||||
FileId,
|
||||
AbsoluteStoragePath,
|
||||
PublishedFileID,
|
||||
@ -71,7 +71,7 @@ public slots:
|
||||
QVariantMap get(const QString& folderName) const;
|
||||
|
||||
void loadInstalledContent();
|
||||
void append(const QJsonObject&, const QString&, const bool isNew, const QDateTime& lastModified);
|
||||
void append(const QString& projectJsonFilePath);
|
||||
void reset();
|
||||
void init();
|
||||
void deinstallItemAt(const QString& absoluteStoragePath);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QApplication>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
#include <QProcess>
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
|
@ -2,11 +2,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
#include <QDomNodeList>
|
||||
#include <QFile>
|
||||
#include <QFontDatabase>
|
||||
#include <QGuiApplication>
|
||||
#include <QIODevice>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
@ -184,6 +187,76 @@ public slots:
|
||||
const QString homePath = QDir::homePath();
|
||||
QFile settingsPlist(homePath + "/Library/LaunchAgents/" + plistFileName);
|
||||
if (settingsPlist.exists()) {
|
||||
QDomDocument doc;
|
||||
if (!doc.setContent(&settingsPlist)) {
|
||||
settingsPlist.close();
|
||||
return;
|
||||
}
|
||||
settingsPlist.close();
|
||||
|
||||
QDomElement root = doc.firstChildElement();
|
||||
QDomNodeList dictList = root.elementsByTagName("dict");
|
||||
if (dictList.size() > 1 && dictList.size() < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if autostart and corresponding path is set and abort if so. This is needed since osx 13.0 Ventura
|
||||
// because it displays an annoying message every time we change the file.
|
||||
bool isCorrectPath = false;
|
||||
bool isAutostartEnabled = false;
|
||||
QDomNode dictNode = dictList.at(0);
|
||||
if (dictNode.isElement()) {
|
||||
QDomElement dictElement = dictNode.toElement();
|
||||
QDomNodeList keyList = dictElement.elementsByTagName("key");
|
||||
for (int j = 0; j < keyList.size(); j++) {
|
||||
QDomNode keyNode = keyList.at(j);
|
||||
if (keyNode.isElement()) {
|
||||
QDomElement keyElement = keyNode.toElement();
|
||||
if (keyElement.text() == "ProgramArguments") {
|
||||
QDomNode valueNode = keyNode.nextSibling();
|
||||
if (valueNode.isElement()) {
|
||||
QDomElement valueElement = valueNode.toElement();
|
||||
QDomNodeList stringList = valueElement.elementsByTagName("string");
|
||||
if (!stringList.isEmpty()) {
|
||||
QDomNode stringNode = stringList.at(0);
|
||||
if (stringNode.isElement()) {
|
||||
QDomElement stringElement = stringNode.toElement();
|
||||
const QString path = stringElement.text();
|
||||
if (path == screenPlayPath) {
|
||||
isCorrectPath = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dictNode.isElement()) {
|
||||
QDomElement dictElement = dictNode.toElement();
|
||||
QDomNodeList keyList = dictElement.elementsByTagName("key");
|
||||
for (int j = 0; j < keyList.size(); j++) {
|
||||
QDomNode keyNode = keyList.at(j);
|
||||
if (keyNode.isElement()) {
|
||||
QDomElement keyElement = keyNode.toElement();
|
||||
if (keyElement.text() == "RunAtLoad") {
|
||||
QDomNode valueNode = keyNode.nextSibling();
|
||||
if (valueNode.isElement()) {
|
||||
QDomElement valueElement = valueNode.toElement();
|
||||
if (valueElement.tagName() == "true") {
|
||||
isAutostartEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing to do. Autostart has the same value and the path is also correct.
|
||||
if (isAutostartEnabled == autostart && isCorrectPath)
|
||||
return;
|
||||
|
||||
if (!settingsPlist.remove()) {
|
||||
qCritical() << "Unable to remove: " << settingsPlist.fileName();
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
@ -121,7 +120,6 @@ public slots:
|
||||
emit debugMessagesChanged(m_debugMessages);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
QString m_debugMessages {};
|
||||
QFuture<void> m_requestAllLicensesFuture;
|
||||
|
@ -1,9 +1,10 @@
|
||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
|
||||
#include "ScreenPlay/app.h"
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDebug>
|
||||
#include <QGuiApplication>
|
||||
#include <QStyleFactory>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <sentry.h>
|
||||
@ -17,12 +18,12 @@ Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
// https://bugreports.qt.io/browse/QTBUG-72028
|
||||
qputenv("QT_QPA_PLATFORM", "windows:darkmode=2");
|
||||
|
||||
#if !defined(Q_OS_LINUX)
|
||||
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
|
||||
#endif
|
||||
|
||||
QApplication qtGuiApp(argc, argv);
|
||||
QGuiApplication qtGuiApp(argc, argv);
|
||||
ScreenPlay::App app;
|
||||
|
||||
if (app.m_isAnotherScreenPlayInstanceRunning) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import QtCore as QCore
|
||||
import QtQml
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
@ -8,7 +10,6 @@ import ScreenPlay
|
||||
import Settings
|
||||
import ScreenPlayUtil as Util
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Qt.labs.settings 1.0 as Labs
|
||||
import "qml/Monitors" as Monitors
|
||||
import "qml/Installed" as Installed
|
||||
import "qml/Navigation" as Navigation
|
||||
@ -20,40 +21,35 @@ ApplicationWindow {
|
||||
function setTheme(theme) {
|
||||
switch (theme) {
|
||||
case Settings.System:
|
||||
root.Material.theme = Material.System
|
||||
break
|
||||
root.Material.theme = Material.System;
|
||||
break;
|
||||
case Settings.Dark:
|
||||
root.Material.theme = Material.Dark
|
||||
break
|
||||
root.Material.theme = Material.Dark;
|
||||
break;
|
||||
case Settings.Light:
|
||||
root.Material.theme = Material.Light
|
||||
break
|
||||
root.Material.theme = Material.Light;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function switchPage(name) {
|
||||
if (nav.currentNavigationName === name) {
|
||||
if (name === "Installed")
|
||||
App.installedListModel.reset()
|
||||
App.installedListModel.reset();
|
||||
}
|
||||
|
||||
if (name === "Installed") {
|
||||
stackView.replace(
|
||||
"qrc:/qml/ScreenPlayApp/qml/Installed/Installed.qml", {
|
||||
stackView.replace("qrc:/qml/ScreenPlayApp/qml/Installed/Installed.qml", {
|
||||
"sidebar": sidebar
|
||||
})
|
||||
return
|
||||
});
|
||||
return;
|
||||
}
|
||||
stackView.replace(
|
||||
"qrc:/qml/ScreenPlayApp/qml/" + name + "/" + name + ".qml",
|
||||
{
|
||||
stackView.replace("qrc:/qml/ScreenPlayApp/qml/" + name + "/" + name + ".qml", {
|
||||
"modalSource": content
|
||||
})
|
||||
sidebar.state = "inactive"
|
||||
});
|
||||
sidebar.state = "inactive";
|
||||
}
|
||||
|
||||
color: Material.theme === Material.Dark ? Qt.darker(
|
||||
Material.background) : Material.background
|
||||
color: Material.theme === Material.Dark ? Qt.darker(Material.background) : Material.background
|
||||
// Set visible if the -silent parameter was not set (see app.cpp end of constructor).
|
||||
visible: false
|
||||
width: 1400
|
||||
@ -67,31 +63,26 @@ ApplicationWindow {
|
||||
Material.accent: Material.color(Material.Orange)
|
||||
onVisibilityChanged: {
|
||||
if (root.visibility === 2)
|
||||
App.installedListModel.reset()
|
||||
App.installedListModel.reset();
|
||||
}
|
||||
onClosing: (close) => {
|
||||
close.accepted = false
|
||||
|
||||
if (App.screenPlayManager.activeWallpaperCounter === 0
|
||||
&& App.screenPlayManager.activeWidgetsCounter === 0) {
|
||||
Qt.quit()
|
||||
onClosing: close => {
|
||||
close.accepted = false;
|
||||
if (App.screenPlayManager.activeWallpaperCounter === 0 && App.screenPlayManager.activeWidgetsCounter === 0) {
|
||||
App.exit();
|
||||
}
|
||||
|
||||
const alwaysMinimize = settings.value("alwaysMinimize", null)
|
||||
const alwaysMinimize = settings.value("alwaysMinimize", null);
|
||||
if (alwaysMinimize === null) {
|
||||
console.error("Unable to retreive alwaysMinimize setting")
|
||||
console.error("Unable to retreive alwaysMinimize setting");
|
||||
}
|
||||
|
||||
if (alwaysMinimize === "true") {
|
||||
root.hide()
|
||||
root.hide();
|
||||
App.showDockIcon(false);
|
||||
return
|
||||
return;
|
||||
}
|
||||
exitDialog.open();
|
||||
}
|
||||
|
||||
exitDialog.open()
|
||||
}
|
||||
|
||||
Labs.Settings {
|
||||
QCore.Settings {
|
||||
id: settings
|
||||
}
|
||||
|
||||
@ -102,13 +93,13 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
setTheme(App.settings.theme)
|
||||
setTheme(App.settings.theme);
|
||||
stackView.push("qrc:/qml/ScreenPlayApp/qml/Installed/Installed.qml", {
|
||||
"sidebar": sidebar
|
||||
})
|
||||
});
|
||||
if (!App.settings.silentStart) {
|
||||
App.showDockIcon(true)
|
||||
root.show()
|
||||
App.showDockIcon(true);
|
||||
root.show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +130,7 @@ ApplicationWindow {
|
||||
|
||||
Connections {
|
||||
function onThemeChanged(theme) {
|
||||
setTheme(theme)
|
||||
setTheme(theme);
|
||||
}
|
||||
|
||||
target: App.settings
|
||||
@ -147,7 +138,7 @@ ApplicationWindow {
|
||||
|
||||
Connections {
|
||||
function onRequestNavigation(nav) {
|
||||
switchPage(nav)
|
||||
switchPage(nav);
|
||||
}
|
||||
|
||||
target: App.util
|
||||
@ -155,8 +146,8 @@ ApplicationWindow {
|
||||
|
||||
Connections {
|
||||
function onRequestRaise() {
|
||||
App.showDockIcon(true)
|
||||
root.show()
|
||||
App.showDockIcon(true);
|
||||
root.show();
|
||||
}
|
||||
|
||||
target: App.screenPlayManager
|
||||
@ -166,7 +157,6 @@ ApplicationWindow {
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
StackView {
|
||||
id: stackView
|
||||
objectName: "stackView"
|
||||
@ -215,16 +205,16 @@ ApplicationWindow {
|
||||
Connections {
|
||||
function onSetSidebarActive(active) {
|
||||
if (active)
|
||||
sidebar.state = "active"
|
||||
sidebar.state = "active";
|
||||
else
|
||||
sidebar.state = "inactive"
|
||||
sidebar.state = "inactive";
|
||||
}
|
||||
|
||||
function onSetNavigationItem(pos) {
|
||||
if (pos === 0)
|
||||
nav.onPageChanged("Create")
|
||||
nav.onPageChanged("Create");
|
||||
else
|
||||
nav.onPageChanged("Workshop")
|
||||
nav.onPageChanged("Workshop");
|
||||
}
|
||||
|
||||
target: stackView.currentItem
|
||||
@ -253,8 +243,8 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
onChangePage: function (name) {
|
||||
monitors.close()
|
||||
switchPage(name)
|
||||
monitors.close();
|
||||
switchPage(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
|
||||
Button {
|
||||
text: qsTr("News")
|
||||
onClicked: Qt.openUrlExternally("https://screen-play.app/blog/")
|
||||
@ -54,8 +53,7 @@ Item {
|
||||
|
||||
Button {
|
||||
text: qsTr("Wiki")
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://kelteseth.gitlab.io/ScreenPlayDocs/")
|
||||
onClicked: Qt.openUrlExternally("https://kelteseth.gitlab.io/ScreenPlayDocs/")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_help_center.svg"
|
||||
icon.width: 14
|
||||
icon.height: 14
|
||||
@ -64,8 +62,7 @@ Item {
|
||||
|
||||
Button {
|
||||
text: qsTr("Forum")
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://forum.screen-play.app/")
|
||||
onClicked: Qt.openUrlExternally("https://forum.screen-play.app/")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_forum.svg"
|
||||
icon.width: 14
|
||||
icon.height: 14
|
||||
@ -74,8 +71,7 @@ Item {
|
||||
|
||||
Button {
|
||||
text: qsTr("Reddit")
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://www.reddit.com/r/ScreenPlayApp/")
|
||||
onClicked: Qt.openUrlExternally("https://www.reddit.com/r/ScreenPlayApp/")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/brand_reddit.svg"
|
||||
icon.width: 14
|
||||
icon.height: 14
|
||||
@ -84,8 +80,7 @@ Item {
|
||||
|
||||
Button {
|
||||
text: qsTr("Issue Tracker")
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://gitlab.com/kelteseth/ScreenPlay/-/issues")
|
||||
onClicked: Qt.openUrlExternally("https://gitlab.com/kelteseth/ScreenPlay/-/issues")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_report_problem.svg"
|
||||
icon.width: 14
|
||||
icon.height: 14
|
||||
@ -94,8 +89,7 @@ Item {
|
||||
|
||||
Button {
|
||||
text: qsTr("Contribute")
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://gitlab.com/kelteseth/ScreenPlay#general-contributing")
|
||||
onClicked: Qt.openUrlExternally("https://gitlab.com/kelteseth/ScreenPlay#general-contributing")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_supervisor_account.svg"
|
||||
icon.width: 14
|
||||
icon.height: 14
|
||||
@ -115,7 +109,6 @@ Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ TabButton {
|
||||
right: txt.left
|
||||
verticalCenter: txt.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -63,12 +62,9 @@ TabButton {
|
||||
topMargin: 15
|
||||
right: parent.right
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
background: Item {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ Item {
|
||||
name: "description"
|
||||
elementName: "description"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
header: Item {
|
||||
@ -82,9 +81,7 @@ Item {
|
||||
topMargin: 30
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
@ -112,9 +109,7 @@ Item {
|
||||
PropertyAnimation {
|
||||
duration: 250
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LinearGradient {
|
||||
@ -132,9 +127,7 @@ Item {
|
||||
position: 0
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -153,7 +146,6 @@ Item {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -173,7 +165,6 @@ Item {
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@ -184,7 +175,6 @@ Item {
|
||||
onEntered: delegate.state = "hover"
|
||||
onExited: delegate.state = ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
transitions: [
|
||||
@ -198,7 +188,6 @@ Item {
|
||||
from: 1
|
||||
to: 1.05
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "hover"
|
||||
@ -210,7 +199,6 @@ Item {
|
||||
from: 1.05
|
||||
to: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -219,7 +207,5 @@ Item {
|
||||
snapMode: ScrollBar.SnapOnRelease
|
||||
policy: ScrollBar.AlwaysOn
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Particles
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlayApp
|
||||
@ -30,7 +29,6 @@ Item {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -81,7 +79,6 @@ Item {
|
||||
duration: 400
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pushExit: Transition {
|
||||
@ -100,15 +97,12 @@ Item {
|
||||
duration: 400
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: 6
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -120,7 +114,6 @@ Item {
|
||||
anchors.topMargin: wizardContentWrapper.anchors.margins
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
@ -142,11 +135,8 @@ Item {
|
||||
wizardContentWrapper.anchors.left = sidebar.right;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Particles
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlayApp
|
||||
@ -38,15 +37,15 @@ Rectangle {
|
||||
id: loaderConnections
|
||||
|
||||
function onWizardStarted() {
|
||||
root.expanded = false
|
||||
root.expanded = false;
|
||||
}
|
||||
|
||||
function onWizardExited() {
|
||||
root.expanded = true
|
||||
stackView.clear(StackView.PushTransition)
|
||||
stackView.push("qrc:/qml/ScreenPlayApp/qml/Create/StartInfo.qml")
|
||||
listView.currentIndex = 0
|
||||
App.util.setNavigationActive(true)
|
||||
root.expanded = true;
|
||||
stackView.clear(StackView.PushTransition);
|
||||
stackView.push("qrc:/qml/ScreenPlayApp/qml/Create/StartInfo.qml");
|
||||
listView.currentIndex = 0;
|
||||
App.util.setNavigationActive(true);
|
||||
}
|
||||
|
||||
ignoreUnknownSignals: true
|
||||
@ -153,9 +152,9 @@ Rectangle {
|
||||
highlighted: ListView.isCurrentItem
|
||||
text: headline
|
||||
onClicked: {
|
||||
listView.currentIndex = index
|
||||
const item = stackView.push(source)
|
||||
loaderConnections.target = item
|
||||
listView.currentIndex = index;
|
||||
const item = stackView.push(source);
|
||||
loaderConnections.target = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Particles
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlayApp
|
||||
@ -24,7 +23,6 @@ Item {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -41,7 +39,6 @@ Item {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GridView {
|
||||
@ -218,7 +215,6 @@ Item {
|
||||
description: ""
|
||||
category: "Resources"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delegate: StartInfoLinkImage {
|
||||
@ -232,7 +228,5 @@ Item {
|
||||
width: gridView.cellWidth
|
||||
height: gridView.cellHeight
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Particles
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import ScreenPlayApp
|
||||
@ -49,9 +48,7 @@ Item {
|
||||
position: 1
|
||||
color: "#00000000"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -68,7 +65,6 @@ Item {
|
||||
margins: 15
|
||||
bottomMargin: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -85,7 +81,6 @@ Item {
|
||||
bottom: parent.bottom
|
||||
margins: 15
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -109,9 +104,7 @@ Item {
|
||||
fill: parent
|
||||
margins: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@ -126,7 +119,6 @@ Item {
|
||||
layer.effect: ElevationEffect {
|
||||
elevation: 4
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
transitions: [
|
||||
@ -140,7 +132,6 @@ Item {
|
||||
from: 1
|
||||
to: 1.05
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "hover"
|
||||
@ -152,7 +143,6 @@ Item {
|
||||
from: 1.05
|
||||
to: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ Item {
|
||||
right: wrapper.right
|
||||
topMargin: 3
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -53,7 +52,6 @@ Item {
|
||||
radius: 4
|
||||
width: {
|
||||
// Add small margin left and right
|
||||
|
||||
if (parent.width < 1200)
|
||||
return parent.width - 20;
|
||||
else
|
||||
@ -86,9 +84,7 @@ Item {
|
||||
App.util.setNavigation("Create");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -105,7 +101,6 @@ Item {
|
||||
target: effect
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "in"
|
||||
@ -125,7 +120,6 @@ Item {
|
||||
target: effect
|
||||
opacity: 0.4
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "error"
|
||||
@ -146,7 +140,6 @@ Item {
|
||||
opacity: 1
|
||||
z: 1
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "success"
|
||||
@ -167,7 +160,6 @@ Item {
|
||||
opacity: 0
|
||||
z: 0
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
@ -206,13 +198,9 @@ Item {
|
||||
property: "opacity"
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "in"
|
||||
@ -244,11 +232,8 @@ Item {
|
||||
property: "opacity"
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "in"
|
||||
@ -265,9 +250,7 @@ Item {
|
||||
PauseAnimation {
|
||||
duration: 50
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -97,7 +97,6 @@ WizardPage {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
source: root.file
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -113,7 +112,6 @@ WizardPage {
|
||||
fileDialog.nameFilters: ["Gif (*.gif)"]
|
||||
onFileChanged: root.file = file
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@ -162,11 +160,7 @@ WizardPage {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ WizardPage {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("Created By")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.TextField {
|
||||
@ -83,7 +82,6 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -99,7 +97,5 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import ScreenPlayApp
|
||||
import ScreenPlay
|
||||
import ScreenPlayUtil as Util
|
||||
@ -52,7 +51,6 @@ WizardPage {
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.ImageSelector {
|
||||
@ -60,7 +58,6 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@ -104,11 +101,7 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,15 +23,15 @@ Item {
|
||||
|
||||
CreateWallpaperInit {
|
||||
onNext: function (filePath, codec) {
|
||||
startConvert(filePath, codec)
|
||||
startConvert(filePath, codec);
|
||||
}
|
||||
|
||||
function startConvert(filePath, codec) {
|
||||
root.wizardStarted()
|
||||
swipeView.currentIndex = 1
|
||||
createWallpaperVideoImportConvert.codec = codec
|
||||
createWallpaperVideoImportConvert.filePath = filePath
|
||||
App.create.createWallpaperStart(filePath, codec, quality)
|
||||
root.wizardStarted();
|
||||
swipeView.currentIndex = 1;
|
||||
createWallpaperVideoImportConvert.codec = codec;
|
||||
createWallpaperVideoImportConvert.filePath = filePath;
|
||||
App.create.createWallpaperStart(filePath, codec, quality);
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +41,7 @@ Item {
|
||||
onAbort: root.wizardExited()
|
||||
}
|
||||
|
||||
CreateWallpaperResult {}
|
||||
CreateWallpaperResult {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import ScreenPlayApp
|
||||
import ScreenPlay
|
||||
import ScreenPlay.Create
|
||||
import ScreenPlayUtil as Util
|
||||
|
||||
Item {
|
||||
id: root
|
||||
objectName: "createWallpaperInit"
|
||||
@ -62,7 +63,6 @@ Item {
|
||||
// text: "AV1 (NVidia 3000, AMD 6000 or newer). ULTRA SLOW ENCODING!"
|
||||
// value: Create.AV1
|
||||
// }
|
||||
|
||||
id: comboBoxCodec
|
||||
|
||||
Layout.preferredWidth: 400
|
||||
@ -84,11 +84,8 @@ Item {
|
||||
value: Create.VP8
|
||||
}
|
||||
// Import works but the QWebEngine cannot display AV1 :(
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.Slider {
|
||||
@ -104,9 +101,7 @@ Item {
|
||||
to: 0
|
||||
stepSize: 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -124,7 +119,6 @@ Item {
|
||||
bottom: parent.bottom
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -150,7 +144,5 @@ Item {
|
||||
bottom: parent.bottom
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlayApp
|
||||
import ScreenPlay
|
||||
@ -28,7 +27,6 @@ Item {
|
||||
topMargin: 30
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -66,7 +64,6 @@ Item {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@ -80,9 +77,7 @@ Item {
|
||||
snapMode: ScrollBar.SnapOnRelease
|
||||
policy: ScrollBar.AlwaysOn
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Menu {
|
||||
@ -94,7 +89,6 @@ Item {
|
||||
App.util.copyToClipboard(txtFFMPEGDebug.text);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -114,7 +108,6 @@ Item {
|
||||
bottom: parent.bottom
|
||||
margins: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -125,7 +118,6 @@ Item {
|
||||
target: txtFFMPEGDebug
|
||||
text: "Error!"
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "success"
|
||||
@ -134,7 +126,6 @@ Item {
|
||||
target: txtFFMPEGDebug
|
||||
text: "Success!"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -21,84 +21,81 @@ Item {
|
||||
signal save
|
||||
|
||||
function cleanup() {
|
||||
App.create.cancel()
|
||||
App.create.cancel();
|
||||
}
|
||||
|
||||
function basename(str) {
|
||||
let filenameWithExtentions = (str.slice(str.lastIndexOf("/") + 1))
|
||||
let filename = filenameWithExtentions.split('.').slice(0, -1).join('.')
|
||||
return filename
|
||||
let filenameWithExtentions = (str.slice(str.lastIndexOf("/") + 1));
|
||||
let filename = filenameWithExtentions.split('.').slice(0, -1).join('.');
|
||||
return filename;
|
||||
}
|
||||
|
||||
function checkCanSave() {
|
||||
if (canSave && conversionFinishedSuccessful)
|
||||
btnSave.enabled = true
|
||||
btnSave.enabled = true;
|
||||
else
|
||||
btnSave.enabled = false
|
||||
btnSave.enabled = false;
|
||||
}
|
||||
|
||||
onCanSaveChanged: root.checkCanSave()
|
||||
onFilePathChanged: {
|
||||
textFieldName.text = basename(filePath)
|
||||
textFieldName.text = basename(filePath);
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onCreateWallpaperStateChanged(state) {
|
||||
switch (state) {
|
||||
case ImportVideoState.ConvertingPreviewImage:
|
||||
txtConvert.text = qsTr("Generating preview image...")
|
||||
break
|
||||
txtConvert.text = qsTr("Generating preview image...");
|
||||
break;
|
||||
case ImportVideoState.ConvertingPreviewThumbnailImage:
|
||||
txtConvert.text = qsTr("Generating preview thumbnail image...")
|
||||
break
|
||||
txtConvert.text = qsTr("Generating preview thumbnail image...");
|
||||
break;
|
||||
case ImportVideoState.ConvertingPreviewImageFinished:
|
||||
imgPreview.source = "file:///" + App.create.workingDir + "/preview.jpg"
|
||||
imgPreview.visible = true
|
||||
break
|
||||
imgPreview.source = "file:///" + App.create.workingDir + "/preview.jpg";
|
||||
imgPreview.visible = true;
|
||||
break;
|
||||
case ImportVideoState.ConvertingPreviewVideo:
|
||||
txtConvert.text = qsTr("Generating 5 second preview video...")
|
||||
break
|
||||
txtConvert.text = qsTr("Generating 5 second preview video...");
|
||||
break;
|
||||
case ImportVideoState.ConvertingPreviewGif:
|
||||
txtConvert.text = qsTr("Generating preview gif...")
|
||||
break
|
||||
txtConvert.text = qsTr("Generating preview gif...");
|
||||
break;
|
||||
case ImportVideoState.ConvertingPreviewGifFinished:
|
||||
gifPreview.source = "file:///" + App.create.workingDir + "/preview.gif"
|
||||
imgPreview.visible = false
|
||||
gifPreview.visible = true
|
||||
gifPreview.playing = true
|
||||
break
|
||||
gifPreview.source = "file:///" + App.create.workingDir + "/preview.gif";
|
||||
imgPreview.visible = false;
|
||||
gifPreview.visible = true;
|
||||
gifPreview.playing = true;
|
||||
break;
|
||||
case ImportVideoState.ConvertingAudio:
|
||||
txtConvert.text = qsTr("Converting Audio...")
|
||||
break
|
||||
txtConvert.text = qsTr("Converting Audio...");
|
||||
break;
|
||||
case ImportVideoState.ConvertingVideo:
|
||||
txtConvert.text = qsTr(
|
||||
"Converting Video... This can take some time!")
|
||||
break
|
||||
txtConvert.text = qsTr("Converting Video... This can take some time!");
|
||||
break;
|
||||
case ImportVideoState.ConvertingVideoError:
|
||||
txtConvert.text = qsTr("Converting Video ERROR!")
|
||||
break
|
||||
txtConvert.text = qsTr("Converting Video ERROR!");
|
||||
break;
|
||||
case ImportVideoState.AnalyseVideoError:
|
||||
txtConvert.text = qsTr("Analyse Video ERROR!")
|
||||
break
|
||||
txtConvert.text = qsTr("Analyse Video ERROR!");
|
||||
break;
|
||||
case ImportVideoState.Finished:
|
||||
txtConvert.text = ""
|
||||
conversionFinishedSuccessful = true
|
||||
busyIndicator.running = false
|
||||
txtConvert.text = "";
|
||||
conversionFinishedSuccessful = true;
|
||||
busyIndicator.running = false;
|
||||
btnExit.enabled = false;
|
||||
root.checkCanSave()
|
||||
break
|
||||
root.checkCanSave();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onProgressChanged(progress) {
|
||||
var percentage = Math.floor(progress * 100)
|
||||
var percentage = Math.floor(progress * 100);
|
||||
if (percentage > 100 || progress > 0.95)
|
||||
percentage = 100
|
||||
|
||||
percentage = 100;
|
||||
if (percentage === NaN)
|
||||
print(progress, percentage)
|
||||
|
||||
txtConvertNumber.text = percentage + "%"
|
||||
print(progress, percentage);
|
||||
txtConvertNumber.text = percentage + "%";
|
||||
}
|
||||
|
||||
target: App.create
|
||||
@ -278,9 +275,9 @@ Item {
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: {
|
||||
if (textFieldName.text.length >= 3)
|
||||
canSave = true
|
||||
canSave = true;
|
||||
else
|
||||
canSave = false
|
||||
canSave = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -330,8 +327,8 @@ Item {
|
||||
highlighted: true
|
||||
font.family: App.settings.font
|
||||
onClicked: {
|
||||
root.abort()
|
||||
App.create.cancel()
|
||||
root.abort();
|
||||
App.create.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,14 +342,9 @@ Item {
|
||||
font.family: App.settings.font
|
||||
onClicked: {
|
||||
if (conversionFinishedSuccessful) {
|
||||
btnSave.enabled = false
|
||||
App.create.saveWallpaper(
|
||||
textFieldName.text,
|
||||
textFieldDescription.text, root.filePath,
|
||||
previewSelector.imageSource,
|
||||
textFieldYoutubeURL.text, codec,
|
||||
textFieldTags.getTags())
|
||||
savePopup.open()
|
||||
btnSave.enabled = false;
|
||||
App.create.saveWallpaper(textFieldName.text, textFieldDescription.text, root.filePath, previewSelector.imageSource, textFieldYoutubeURL.text, codec, textFieldTags.getTags());
|
||||
savePopup.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -388,9 +380,9 @@ Item {
|
||||
|
||||
interval: 1000 + Math.random() * 1000
|
||||
onTriggered: {
|
||||
savePopup.close()
|
||||
App.util.setNavigationActive(true)
|
||||
App.util.setNavigation("Installed")
|
||||
savePopup.close();
|
||||
App.util.setNavigationActive(true);
|
||||
App.util.setNavigation("Installed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ Item {
|
||||
|
||||
ImportWebmInit {
|
||||
onNext: function (filePath) {
|
||||
root.wizardStarted()
|
||||
swipeView.currentIndex = 1
|
||||
createWallpaperVideoImportConvert.filePath = filePath
|
||||
App.util.setNavigationActive(false)
|
||||
App.create.createWallpaperStart(filePath)
|
||||
root.wizardStarted();
|
||||
swipeView.currentIndex = 1;
|
||||
createWallpaperVideoImportConvert.filePath = filePath;
|
||||
App.util.setNavigationActive(false);
|
||||
App.create.createWallpaperStart(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,8 +16,8 @@ Item {
|
||||
property bool canSave: false
|
||||
property string filePath
|
||||
|
||||
signal exit()
|
||||
signal save()
|
||||
signal exit
|
||||
signal save
|
||||
|
||||
function basename(str) {
|
||||
let filenameWithExtentions = (str.slice(str.lastIndexOf("/") + 1));
|
||||
@ -91,10 +91,8 @@ Item {
|
||||
var percentage = Math.floor(progress * 100);
|
||||
if (percentage > 100 || progress > 0.95)
|
||||
percentage = 100;
|
||||
|
||||
if (percentage === NaN)
|
||||
print(progress, percentage);
|
||||
|
||||
txtConvertNumber.text = percentage + "%";
|
||||
}
|
||||
|
||||
@ -112,7 +110,6 @@ Item {
|
||||
margins: 40
|
||||
bottomMargin: 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -182,9 +179,7 @@ Item {
|
||||
position: 1
|
||||
color: "#00000000"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
@ -206,7 +201,6 @@ Item {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 40
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -222,9 +216,7 @@ Item {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.ImageSelector {
|
||||
@ -238,9 +230,7 @@ Item {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -306,7 +296,6 @@ Item {
|
||||
width: parent.width
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Row {
|
||||
@ -352,9 +341,7 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Popup {
|
||||
@ -391,7 +378,5 @@ Item {
|
||||
root.exit();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -107,32 +107,10 @@ Item {
|
||||
fill: parent
|
||||
margins: 40
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: wrapper.width * 0.33
|
||||
|
||||
StartInfoLinkImage {
|
||||
text: "Handbreak"
|
||||
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/handbreak.png"
|
||||
link: "https://handbrake.fr/"
|
||||
description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes,"
|
||||
category: "Tools"
|
||||
width: 300
|
||||
height: parent.height
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -153,7 +131,6 @@ Item {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -178,7 +155,5 @@ Item {
|
||||
bottom: parent.bottom
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ Item {
|
||||
|
||||
Importh264Init {
|
||||
onNext: function (filePath) {
|
||||
root.wizardStarted()
|
||||
swipeView.currentIndex = 1
|
||||
createWallpaperVideoImportConvert.filePath = filePath
|
||||
App.util.setNavigationActive(false)
|
||||
App.create.importH264(filePath)
|
||||
root.wizardStarted();
|
||||
swipeView.currentIndex = 1;
|
||||
createWallpaperVideoImportConvert.filePath = filePath;
|
||||
App.util.setNavigationActive(false);
|
||||
App.create.importH264(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,8 +16,8 @@ Item {
|
||||
property bool canSave: false
|
||||
property string filePath
|
||||
|
||||
signal exit()
|
||||
signal save()
|
||||
signal exit
|
||||
signal save
|
||||
|
||||
function basename(str) {
|
||||
let filenameWithExtentions = (str.slice(str.lastIndexOf("/") + 1));
|
||||
@ -91,10 +91,8 @@ Item {
|
||||
var percentage = Math.floor(progress * 100);
|
||||
if (percentage > 100 || progress > 0.95)
|
||||
percentage = 100;
|
||||
|
||||
if (percentage === NaN)
|
||||
print(progress, percentage);
|
||||
|
||||
txtConvertNumber.text = percentage + "%";
|
||||
}
|
||||
|
||||
@ -112,7 +110,6 @@ Item {
|
||||
margins: 40
|
||||
bottomMargin: 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -182,9 +179,7 @@ Item {
|
||||
position: 1
|
||||
color: "#00000000"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
@ -206,7 +201,6 @@ Item {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 40
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -222,9 +216,7 @@ Item {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.ImageSelector {
|
||||
@ -238,9 +230,7 @@ Item {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -306,7 +296,6 @@ Item {
|
||||
width: parent.width
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Row {
|
||||
@ -352,9 +341,7 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Popup {
|
||||
@ -391,7 +378,5 @@ Item {
|
||||
root.exit();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,22 +60,19 @@ Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
onExited: {
|
||||
bg.color = Qt.darker(Material.backgroundColor)
|
||||
bg.color = Qt.darker(Material.backgroundColor);
|
||||
}
|
||||
onEntered: {
|
||||
bg.color = Qt.darker(Qt.darker(
|
||||
Material.backgroundColor))
|
||||
drag.accept(Qt.LinkAction)
|
||||
bg.color = Qt.darker(Qt.darker(Material.backgroundColor));
|
||||
drag.accept(Qt.LinkAction);
|
||||
}
|
||||
onDropped: {
|
||||
let file = App.util.toLocal(drop.urls[0])
|
||||
bg.color = Qt.darker(Qt.darker(
|
||||
Material.backgroundColor))
|
||||
let file = App.util.toLocal(drop.urls[0]);
|
||||
bg.color = Qt.darker(Qt.darker(Material.backgroundColor));
|
||||
if (file.endsWith(".mp4"))
|
||||
root.next(drop.urls[0])
|
||||
root.next(drop.urls[0]);
|
||||
else
|
||||
txtFile.text = qsTr(
|
||||
"Invalid file type. Must be valid h264 (*.mp4)!")
|
||||
txtFile.text = qsTr("Invalid file type. Must be valid h264 (*.mp4)!");
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -127,8 +124,7 @@ Item {
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
font.family: App.settings.font
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
|
||||
onClicked: Qt.openUrlExternally("https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
|
||||
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
@ -142,7 +138,7 @@ Item {
|
||||
highlighted: true
|
||||
font.family: App.settings.font
|
||||
onClicked: {
|
||||
fileDialogImportVideo.open()
|
||||
fileDialogImportVideo.open();
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
@ -150,7 +146,7 @@ Item {
|
||||
|
||||
nameFilters: ["Video files (*.mp4)"]
|
||||
onAccepted: {
|
||||
root.next(fileDialogImportVideo.currentFile)
|
||||
root.next(fileDialogImportVideo.currentFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,6 @@ WizardPage {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("Created By")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.TextField {
|
||||
@ -83,7 +82,6 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -99,7 +97,5 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import ScreenPlayApp
|
||||
import ScreenPlay
|
||||
import ScreenPlayUtil as Util
|
||||
@ -52,7 +51,6 @@ WizardPage {
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.ImageSelector {
|
||||
@ -60,7 +58,6 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@ -104,11 +101,7 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ WizardPage {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("Created By")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Util.TextField {
|
||||
@ -99,7 +98,5 @@ WizardPage {
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,11 +15,11 @@ FocusScope {
|
||||
property alias savePopup: savePopup
|
||||
property bool ready: false
|
||||
|
||||
signal wizardStarted()
|
||||
signal wizardExited()
|
||||
signal saveClicked()
|
||||
signal saveFinished()
|
||||
signal cancelClicked()
|
||||
signal wizardStarted
|
||||
signal wizardExited
|
||||
signal saveClicked
|
||||
signal saveFinished
|
||||
signal cancelClicked
|
||||
|
||||
ScrollView {
|
||||
contentWidth: width
|
||||
@ -45,9 +45,7 @@ FocusScope {
|
||||
top: parent.top
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
@ -80,7 +78,6 @@ FocusScope {
|
||||
savePopup.open();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Popup {
|
||||
@ -108,7 +105,6 @@ FocusScope {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 30
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Timer {
|
||||
@ -120,7 +116,5 @@ FocusScope {
|
||||
root.wizardExited();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ Rectangle {
|
||||
implicitWidth: 1366
|
||||
implicitHeight: 768
|
||||
|
||||
|
||||
Text {
|
||||
id: name
|
||||
text: qsTr("My ScreenPlay Wallpaper 🚀")
|
||||
|
@ -5,8 +5,15 @@ Item {
|
||||
implicitWidth: 300
|
||||
implicitHeight: 200
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
opacity: 0.9
|
||||
color: "#333333"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: name
|
||||
id: text
|
||||
text: qsTr("My Widget 🚀")
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls.Material
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls.Material.impl
|
||||
import Qt.labs.platform 1.1 as Labs
|
||||
import QtCore as QCore
|
||||
import ScreenPlayApp
|
||||
import ScreenPlay
|
||||
import ScreenPlay.Enums.InstalledType
|
||||
@ -25,24 +25,24 @@ Item {
|
||||
|
||||
function checkIsContentInstalled() {
|
||||
if (App.installedListModel.count === 0) {
|
||||
loaderHelp.active = true
|
||||
gridView.footerItem.isVisible = true
|
||||
gridView.visible = false
|
||||
navWrapper.visible = false
|
||||
loaderHelp.active = true;
|
||||
gridView.footerItem.isVisible = true;
|
||||
gridView.visible = false;
|
||||
navWrapper.visible = false;
|
||||
} else {
|
||||
loaderHelp.active = false
|
||||
gridView.footerItem.isVisible = false
|
||||
refresh = false
|
||||
gridView.contentY = -82
|
||||
gridView.visible = true
|
||||
navWrapper.visible = true
|
||||
loaderHelp.active = false;
|
||||
gridView.footerItem.isVisible = false;
|
||||
refresh = false;
|
||||
gridView.contentY = -82;
|
||||
gridView.visible = true;
|
||||
navWrapper.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
navWrapper.state = "in"
|
||||
App.installedListFilter.sortBySearchType(SearchType.All)
|
||||
checkIsContentInstalled()
|
||||
navWrapper.state = "in";
|
||||
App.installedListFilter.sortBySearchType(SearchType.All);
|
||||
checkIsContentInstalled();
|
||||
}
|
||||
|
||||
Action {
|
||||
@ -52,12 +52,12 @@ Item {
|
||||
|
||||
Connections {
|
||||
function onInstalledLoadingFinished() {
|
||||
checkIsContentInstalled()
|
||||
checkIsContentInstalled();
|
||||
}
|
||||
|
||||
function onCountChanged(count) {
|
||||
if (count === 0)
|
||||
checkIsContentInstalled()
|
||||
checkIsContentInstalled();
|
||||
}
|
||||
|
||||
target: App.installedListModel
|
||||
@ -72,7 +72,7 @@ Item {
|
||||
|
||||
Connections {
|
||||
function onSortChanged() {
|
||||
gridView.positionViewAtBeginning()
|
||||
gridView.positionViewAtBeginning();
|
||||
}
|
||||
|
||||
target: App.installedListFilter
|
||||
@ -129,12 +129,12 @@ Item {
|
||||
}
|
||||
onContentYChanged: {
|
||||
if (contentY <= -180)
|
||||
gridView.headerItem.isVisible = true
|
||||
gridView.headerItem.isVisible = true;
|
||||
else
|
||||
gridView.headerItem.isVisible = false
|
||||
gridView.headerItem.isVisible = false;
|
||||
//Pull to refresh
|
||||
if (contentY <= -180 && !refresh && !isDragging)
|
||||
App.installedListModel.reset()
|
||||
App.installedListModel.reset();
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -151,11 +151,11 @@ Item {
|
||||
opacity: 0
|
||||
onIsVisibleChanged: {
|
||||
if (isVisible) {
|
||||
txtHeader.color = Material.accent
|
||||
txtHeader.text = qsTr("Refreshing!")
|
||||
txtHeader.color = Material.accent;
|
||||
txtHeader.text = qsTr("Refreshing!");
|
||||
} else {
|
||||
txtHeader.color = "gray"
|
||||
txtHeader.text = qsTr("Pull to refresh!")
|
||||
txtHeader.color = "gray";
|
||||
txtHeader.text = qsTr("Pull to refresh!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ Item {
|
||||
interval: 150
|
||||
running: true
|
||||
onTriggered: {
|
||||
animFadeIn.start()
|
||||
animFadeIn.start();
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ Item {
|
||||
interval: 400
|
||||
running: true
|
||||
onTriggered: {
|
||||
animFadeInTxtFooter.start()
|
||||
animFadeInTxtFooter.start();
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,23 +229,22 @@ Item {
|
||||
customTitle: m_title
|
||||
type: m_type
|
||||
isNew: m_isNew
|
||||
screenId: m_folderId
|
||||
screenId: m_folderName
|
||||
absoluteStoragePath: m_absoluteStoragePath
|
||||
publishedFileID: m_publishedFileID
|
||||
itemIndex: index
|
||||
isScrolling: gridView.isScrolling
|
||||
onOpenContextMenu: function (position) {
|
||||
// Set the menu to the current item informations
|
||||
contextMenu.publishedFileID = delegate.publishedFileID
|
||||
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath
|
||||
contextMenu.fileName = delegate.customTitle
|
||||
const pos = delegate.mapToItem(root, position.x, position.y)
|
||||
contextMenu.publishedFileID = delegate.publishedFileID;
|
||||
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath;
|
||||
contextMenu.fileName = delegate.customTitle;
|
||||
const pos = delegate.mapToItem(root, position.x, position.y);
|
||||
// Disable duplicate opening. The can happen if we
|
||||
// call popup when we are in the closing animtion.
|
||||
if (contextMenu.visible || contextMenu.opened)
|
||||
return
|
||||
|
||||
contextMenu.popup(pos.x, pos.y)
|
||||
return;
|
||||
contextMenu.popup(pos.x, pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
@ -267,7 +266,7 @@ Item {
|
||||
objectName: "openFolder"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_folder_open.svg"
|
||||
onClicked: {
|
||||
App.util.openFolderInExplorer(contextMenu.absoluteStoragePath)
|
||||
App.util.openFolderInExplorer(contextMenu.absoluteStoragePath);
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,13 +275,10 @@ Item {
|
||||
objectName: enabled ? "removeItem" : "removeWorkshopItem"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_import_export_.svg"
|
||||
onClicked: {
|
||||
exportFileDialog.absoluteStoragePath = contextMenu.absoluteStoragePath
|
||||
let urlFileName = Labs.StandardPaths.writableLocation(
|
||||
Labs.StandardPaths.DesktopLocation) + "/"
|
||||
+ contextMenu.fileName + ".screenplay"
|
||||
|
||||
exportFileDialog.currentFile = urlFileName
|
||||
exportFileDialog.open()
|
||||
exportFileDialog.absoluteStoragePath = contextMenu.absoluteStoragePath;
|
||||
let urlFileName = QCore.StandardPaths.writableLocation(QCore.StandardPaths.DesktopLocation) + "/" + contextMenu.fileName + ".screenplay";
|
||||
exportFileDialog.currentFile = urlFileName;
|
||||
exportFileDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,21 +286,18 @@ Item {
|
||||
text: enabled ? qsTr("Remove Item") : qsTr("Remove via Workshop")
|
||||
objectName: enabled ? "removeItem" : "removeWorkshopItem"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_delete.svg"
|
||||
enabled: contextMenu.publishedFileID === 0
|
||||
|| !App.settings.steamVersion
|
||||
enabled: contextMenu.publishedFileID === 0 || !App.settings.steamVersion
|
||||
onClicked: {
|
||||
deleteDialog.open()
|
||||
deleteDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("Open Workshop Page")
|
||||
enabled: contextMenu.publishedFileID !== 0
|
||||
&& App.settings.steamVersion
|
||||
enabled: contextMenu.publishedFileID !== 0 && App.settings.steamVersion
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(
|
||||
"steam://url/CommunityFilePage/" + contextMenu.publishedFileID)
|
||||
Qt.openUrlExternally("steam://url/CommunityFilePage/" + contextMenu.publishedFileID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -317,18 +310,17 @@ Item {
|
||||
modalSource: root.modalSource
|
||||
anchors.centerIn: Overlay.overlay
|
||||
onAccepted: {
|
||||
root.sidebar.clear()
|
||||
App.installedListModel.deinstallItemAt(
|
||||
contextMenu.absoluteStoragePath)
|
||||
root.sidebar.clear();
|
||||
App.installedListModel.deinstallItemAt(contextMenu.absoluteStoragePath);
|
||||
}
|
||||
}
|
||||
|
||||
Labs.FileDialog {
|
||||
FileDialog {
|
||||
id: exportFileDialog
|
||||
fileMode: FileDialog.SaveFile
|
||||
property string absoluteStoragePath
|
||||
onAccepted: {
|
||||
exportFileProgressDialog.open()
|
||||
exportFileProgressDialog.open();
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,9 +333,7 @@ Item {
|
||||
modalSource: root.modalSource
|
||||
closePolicy: Popup.NoAutoClose
|
||||
onOpened: {
|
||||
const success = App.util.exportProject(
|
||||
exportFileDialog.absoluteStoragePath,
|
||||
exportFileDialog.currentFile)
|
||||
const success = App.util.exportProject(exportFileDialog.absoluteStoragePath, exportFileDialog.currentFile);
|
||||
}
|
||||
onClosed: exportProgressBar.value = 0
|
||||
ColumnLayout {
|
||||
@ -368,10 +358,10 @@ Item {
|
||||
id: exportConnections
|
||||
target: App.util
|
||||
function onCompressionProgressChanged(file, proc, total, br, bt) {
|
||||
exportProgressBar.value = (br * 100 / bt)
|
||||
exportProgressBar.value = (br * 100 / bt);
|
||||
}
|
||||
function onCompressionFinished() {
|
||||
exportFileProgressDialog.close()
|
||||
exportFileProgressDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -391,31 +381,28 @@ Item {
|
||||
anchors.fill: parent
|
||||
property string filePath
|
||||
onEntered: function (drag) {
|
||||
dropPopup.open()
|
||||
dropPopup.open();
|
||||
}
|
||||
onDropped: function (drop) {
|
||||
dropPopup.close()
|
||||
dropArea.enabled = false
|
||||
|
||||
dropPopup.close();
|
||||
dropArea.enabled = false;
|
||||
if (drop.urls.length > 1) {
|
||||
importProjectErrorDialog.title = qsTr(
|
||||
"We only support adding one item at once.")
|
||||
importProjectErrorDialog.open()
|
||||
return
|
||||
importProjectErrorDialog.title = qsTr("We only support adding one item at once.");
|
||||
importProjectErrorDialog.open();
|
||||
return;
|
||||
}
|
||||
var file = "" // Convert url to string
|
||||
file = "" + drop.urls[0]
|
||||
var file = ""; // Convert url to string
|
||||
file = "" + drop.urls[0];
|
||||
if (!file.endsWith('.screenplay')) {
|
||||
importProjectErrorDialog.title = qsTr(
|
||||
"File type not supported. We only support '.screenplay' files.")
|
||||
importProjectErrorDialog.open()
|
||||
return
|
||||
importProjectErrorDialog.title = qsTr("File type not supported. We only support '.screenplay' files.");
|
||||
importProjectErrorDialog.open();
|
||||
return;
|
||||
}
|
||||
importDialog.open()
|
||||
dropArea.filePath = file
|
||||
importDialog.open();
|
||||
dropArea.filePath = file;
|
||||
}
|
||||
onExited: {
|
||||
dropPopup.close()
|
||||
dropPopup.close();
|
||||
}
|
||||
|
||||
Util.Dialog {
|
||||
@ -436,10 +423,9 @@ Item {
|
||||
closePolicy: Popup.NoAutoClose
|
||||
onClosed: importProgressBar.value = 0
|
||||
onOpened: {
|
||||
const success = App.util.importProject(dropArea.filePath,
|
||||
App.globalVariables.localStoragePath)
|
||||
print("finished", success)
|
||||
dropArea.filePath = ""
|
||||
const success = App.util.importProject(dropArea.filePath, App.globalVariables.localStoragePath);
|
||||
print("finished", success);
|
||||
dropArea.filePath = "";
|
||||
}
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
@ -461,10 +447,10 @@ Item {
|
||||
id: importConnections
|
||||
target: App.util
|
||||
function onExtractionProgressChanged(file, proc, total, br, bt) {
|
||||
importProgressBar.value = (br * 100 / bt)
|
||||
importProgressBar.value = (br * 100 / bt);
|
||||
}
|
||||
function onExtractionFinished() {
|
||||
importDialog.close()
|
||||
importDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -480,8 +466,8 @@ Item {
|
||||
modal: true
|
||||
onOpened: fileDropAnimation.state = "fileDrop"
|
||||
onClosed: {
|
||||
fileDropAnimation.state = ""
|
||||
dropArea.enabled = true
|
||||
fileDropAnimation.state = "";
|
||||
dropArea.enabled = true;
|
||||
}
|
||||
|
||||
Util.FileDropAnimation {
|
||||
|
@ -33,7 +33,8 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Util.MouseHoverBlocker {}
|
||||
Util.MouseHoverBlocker {
|
||||
}
|
||||
|
||||
Item {
|
||||
height: nav.height
|
||||
@ -47,7 +48,8 @@ Item {
|
||||
TabBar {
|
||||
height: parent.height
|
||||
|
||||
background: Item {}
|
||||
background: Item {
|
||||
}
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: 5
|
||||
@ -56,21 +58,12 @@ Item {
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
component CustomTabButton: TabButton {
|
||||
icon.height: 16
|
||||
icon.width: 16
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {}
|
||||
font.capitalization: Font.MixedCase
|
||||
}
|
||||
|
||||
CustomTabButton {
|
||||
text: qsTr("All")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_installed.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
App.installedListFilter.sortBySearchType(SearchType.All)
|
||||
setSidebarActive(false);
|
||||
App.installedListFilter.sortBySearchType(SearchType.All);
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,8 +71,8 @@ Item {
|
||||
text: qsTr("Scenes")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
App.installedListFilter.sortBySearchType(SearchType.Scene)
|
||||
setSidebarActive(false);
|
||||
App.installedListFilter.sortBySearchType(SearchType.Scene);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,9 +80,8 @@ Item {
|
||||
text: qsTr("Videos")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
App.installedListFilter.sortBySearchType(
|
||||
SearchType.Wallpaper)
|
||||
setSidebarActive(false);
|
||||
App.installedListFilter.sortBySearchType(SearchType.Wallpaper);
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,8 +89,8 @@ Item {
|
||||
text: qsTr("Widgets")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"
|
||||
onClicked: {
|
||||
setSidebarActive(false)
|
||||
App.installedListFilter.sortBySearchType(SearchType.Widget)
|
||||
setSidebarActive(false);
|
||||
App.installedListFilter.sortBySearchType(SearchType.Widget);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -127,10 +119,8 @@ Item {
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: (btnSortOrder.sortOrder === Qt.AscendingOrder) ? "Install Date Ascending" : "Install Date Descending"
|
||||
onClicked: {
|
||||
btnSortOrder.sortOrder
|
||||
= (btnSortOrder.sortOrder
|
||||
=== Qt.DescendingOrder) ? Qt.AscendingOrder : Qt.DescendingOrder
|
||||
App.installedListFilter.setSortOrder(btnSortOrder.sortOrder)
|
||||
btnSortOrder.sortOrder = (btnSortOrder.sortOrder === Qt.DescendingOrder) ? Qt.AscendingOrder : Qt.DescendingOrder;
|
||||
App.installedListFilter.setSortOrder(btnSortOrder.sortOrder);
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -142,6 +132,16 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
component CustomTabButton: TabButton {
|
||||
icon.height: 16
|
||||
icon.width: 16
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {
|
||||
}
|
||||
font.capitalization: Font.MixedCase
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "out"
|
||||
|
@ -70,8 +70,7 @@ Item {
|
||||
id: txtHeadline
|
||||
|
||||
y: 80
|
||||
text: App.settings.steamVersion ? qsTr("Get free Widgets and Wallpaper via the Steam Workshop") : qsTr(
|
||||
"Get content via our forum")
|
||||
text: App.settings.steamVersion ? qsTr("Get free Widgets and Wallpaper via the Steam Workshop") : qsTr("Get content via our forum")
|
||||
font.family: App.settings.font
|
||||
font.capitalization: Font.Capitalize
|
||||
wrapMode: Text.WordWrap
|
||||
@ -106,9 +105,9 @@ Item {
|
||||
|
||||
text: {
|
||||
if (App.settings.steamVersion) {
|
||||
return qsTr("Browse the Steam Workshop")
|
||||
return qsTr("Browse the Steam Workshop");
|
||||
} else {
|
||||
return qsTr("Open the ScreenPlay forum")
|
||||
return qsTr("Open the ScreenPlay forum");
|
||||
}
|
||||
}
|
||||
Material.background: Material.color(Material.Orange)
|
||||
@ -118,18 +117,18 @@ Item {
|
||||
height: implicitHeight + 10
|
||||
icon.source: {
|
||||
if (App.settings.steamVersion) {
|
||||
return "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
|
||||
return "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg";
|
||||
} else {
|
||||
return "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
|
||||
return "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg";
|
||||
}
|
||||
}
|
||||
icon.width: 18
|
||||
icon.height: 18
|
||||
onClicked: {
|
||||
if (App.settings.steamVersion) {
|
||||
App.util.setNavigation("Workshop")
|
||||
App.util.setNavigation("Workshop");
|
||||
} else {
|
||||
Qt.openUrlExternally("https://forum.screen-play.app/")
|
||||
Qt.openUrlExternally("https://forum.screen-play.app/");
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,7 +311,7 @@ Item {
|
||||
|
||||
ScriptAction {
|
||||
script: {
|
||||
animShake.start(2000, 1000, -1)
|
||||
animShake.start(2000, 1000, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,16 +25,16 @@ Item {
|
||||
height: 180
|
||||
onTypeChanged: {
|
||||
if (JSUtil.isWidget(type)) {
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"
|
||||
return
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg";
|
||||
return;
|
||||
}
|
||||
if (JSUtil.isScene(type)) {
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"
|
||||
return
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg";
|
||||
return;
|
||||
}
|
||||
if (JSUtil.isVideo(type)) {
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
|
||||
return
|
||||
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,11 +42,10 @@ Item {
|
||||
running: true
|
||||
onTriggered: showAnim.start()
|
||||
interval: {
|
||||
var itemIndexMax = itemIndex
|
||||
var itemIndexMax = itemIndex;
|
||||
if (itemIndex > 30)
|
||||
itemIndexMax = 3
|
||||
|
||||
5 * itemIndexMax * Math.random()
|
||||
itemIndexMax = 3;
|
||||
5 * itemIndexMax * Math.random();
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,20 +214,20 @@ Item {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onEntered: {
|
||||
root.state = "hover"
|
||||
screenPlayItemImage.state = "hover"
|
||||
screenPlayItemImage.enter()
|
||||
root.state = "hover";
|
||||
screenPlayItemImage.state = "hover";
|
||||
screenPlayItemImage.enter();
|
||||
}
|
||||
onExited: {
|
||||
root.state = ""
|
||||
screenPlayItemImage.state = "loaded"
|
||||
screenPlayItemImage.exit()
|
||||
root.state = "";
|
||||
screenPlayItemImage.state = "loaded";
|
||||
screenPlayItemImage.exit();
|
||||
}
|
||||
onClicked: function (mouse) {
|
||||
if (mouse.button === Qt.LeftButton)
|
||||
App.util.setSidebarItem(root.screenId, root.type)
|
||||
App.util.setSidebarItem(root.screenId, root.type);
|
||||
else if (mouse.button === Qt.RightButton)
|
||||
root.openContextMenu(Qt.point(mouseX, mouseY))
|
||||
root.openContextMenu(Qt.point(mouseX, mouseY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ Item {
|
||||
function enter() {
|
||||
if (root.sourceImageGIF != "")
|
||||
loader_imgGIFPreview.sourceComponent = component_imgGIFPreview;
|
||||
|
||||
}
|
||||
|
||||
function exit() {
|
||||
@ -33,7 +32,6 @@ Item {
|
||||
source: {
|
||||
if (root.sourceImage === "")
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png";
|
||||
|
||||
return root.screenPreview === "" ? "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png" : Qt.resolvedUrl(absoluteStoragePath + "/" + root.sourceImage);
|
||||
}
|
||||
onStatusChanged: {
|
||||
@ -57,7 +55,6 @@ Item {
|
||||
source: root.sourceImageGIF === "" ? "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png" : Qt.resolvedUrl(absoluteStoragePath + "/" + root.sourceImageGIF)
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loader {
|
||||
@ -79,7 +76,6 @@ Item {
|
||||
to: 1
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "hover"
|
||||
@ -92,7 +88,6 @@ Item {
|
||||
to: 0
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
},
|
||||
Transition {
|
||||
from: "loaded"
|
||||
@ -106,7 +101,6 @@ Item {
|
||||
to: 1
|
||||
easing.type: Easing.OutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -20,83 +20,70 @@ Item {
|
||||
|
||||
function indexOfValue(model, value) {
|
||||
for (var i = 0; i < model.length; i++) {
|
||||
let ourValue = model[i].value
|
||||
let ourValue = model[i].value;
|
||||
if (value === ourValue)
|
||||
return i
|
||||
return i;
|
||||
}
|
||||
return -1
|
||||
return -1;
|
||||
}
|
||||
|
||||
// This is used for removing wallpaper. We need to clear
|
||||
// the preview image/gif so we can release the file for deletion.
|
||||
function clear() {
|
||||
imagePreview.source = ""
|
||||
animatedImagePreview.source = ""
|
||||
txtHeadline.text = ""
|
||||
root.state = "inactive"
|
||||
imagePreview.source = "";
|
||||
animatedImagePreview.source = "";
|
||||
txtHeadline.text = "";
|
||||
root.state = "inactive";
|
||||
}
|
||||
|
||||
width: 400
|
||||
state: "inactive"
|
||||
property bool hasPreviewGif: false
|
||||
onContentFolderNameChanged: {
|
||||
txtHeadline.text = App.installedListModel.get(
|
||||
root.contentFolderName).m_title
|
||||
|
||||
const previewGiFilePath = Qt.resolvedUrl(
|
||||
App.globalVariables.localStoragePath + "/"
|
||||
+ root.contentFolderName + "/" + App.installedListModel.get(
|
||||
root.contentFolderName).m_previewGIF)
|
||||
|
||||
const previewImageFilePath = Qt.resolvedUrl(
|
||||
App.globalVariables.localStoragePath + "/"
|
||||
+ root.contentFolderName + "/" + App.installedListModel.get(
|
||||
root.contentFolderName).m_preview)
|
||||
|
||||
root.hasPreviewGif = App.util.fileExists(previewGiFilePath)
|
||||
|
||||
txtHeadline.text = App.installedListModel.get(root.contentFolderName).m_title;
|
||||
const previewGiFilePath = Qt.resolvedUrl(App.globalVariables.localStoragePath + "/" + root.contentFolderName + "/" + App.installedListModel.get(root.contentFolderName).m_previewGIF);
|
||||
const previewImageFilePath = Qt.resolvedUrl(App.globalVariables.localStoragePath + "/" + root.contentFolderName + "/" + App.installedListModel.get(root.contentFolderName).m_preview);
|
||||
root.hasPreviewGif = App.util.fileExists(previewGiFilePath);
|
||||
if (hasPreviewGif) {
|
||||
animatedImagePreview.source = previewGiFilePath
|
||||
animatedImagePreview.playing = true
|
||||
animatedImagePreview.source = previewGiFilePath;
|
||||
animatedImagePreview.playing = true;
|
||||
} else {
|
||||
imagePreview.source = previewImageFilePath
|
||||
imagePreview.source = previewImageFilePath;
|
||||
}
|
||||
|
||||
if (JSUtil.isWidget(root.type)
|
||||
|| (monitorSelection.activeMonitors.length > 0)) {
|
||||
btnSetWallpaper.enabled = true
|
||||
return
|
||||
if (JSUtil.isWidget(root.type) || (monitorSelection.activeMonitors.length > 0)) {
|
||||
btnSetWallpaper.enabled = true;
|
||||
return;
|
||||
}
|
||||
btnSetWallpaper.enabled = false
|
||||
btnSetWallpaper.enabled = false;
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onSetSidebarItem(folderName, type) {
|
||||
|
||||
// Toggle sidebar if clicked on the same content twice
|
||||
if (root.contentFolderName === folderName
|
||||
&& root.state !== "inactive") {
|
||||
root.state = "inactive"
|
||||
return
|
||||
if (root.contentFolderName === folderName && root.state !== "inactive") {
|
||||
root.state = "inactive";
|
||||
return;
|
||||
}
|
||||
root.contentFolderName = folderName
|
||||
root.type = type
|
||||
root.contentFolderName = folderName;
|
||||
root.type = type;
|
||||
if (JSUtil.isWallpaper(root.type)) {
|
||||
if (type === InstalledType.VideoWallpaper)
|
||||
root.state = "activeWallpaper"
|
||||
root.state = "activeWallpaper";
|
||||
else
|
||||
root.state = "activeScene"
|
||||
btnSetWallpaper.text = qsTr("Set Wallpaper")
|
||||
root.state = "activeScene";
|
||||
btnSetWallpaper.text = qsTr("Set Wallpaper");
|
||||
} else {
|
||||
root.state = "activeWidget"
|
||||
btnSetWallpaper.text = qsTr("Set Widget")
|
||||
root.state = "activeWidget";
|
||||
btnSetWallpaper.text = qsTr("Set Widget");
|
||||
}
|
||||
}
|
||||
|
||||
target: App.util
|
||||
}
|
||||
|
||||
Util.MouseHoverBlocker {}
|
||||
Util.MouseHoverBlocker {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
@ -350,9 +337,7 @@ Item {
|
||||
"text": qsTr("Scale-Down")
|
||||
}]
|
||||
Component.onCompleted: {
|
||||
cbVideoFillMode.currentIndex = root.indexOfValue(
|
||||
cbVideoFillMode.model,
|
||||
App.settings.videoFillMode)
|
||||
cbVideoFillMode.currentIndex = root.indexOfValue(cbVideoFillMode.model, App.settings.videoFillMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -361,47 +346,32 @@ Item {
|
||||
Button {
|
||||
id: btnSetWallpaper
|
||||
objectName: "btnSetWallpaper"
|
||||
enabled: JSUtil.isWidget(
|
||||
root.type) ? true : monitorSelection.isSelected
|
||||
enabled: JSUtil.isWidget(root.type) ? true : monitorSelection.isSelected
|
||||
Material.background: Material.accent
|
||||
Material.foreground: "white"
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_plus.svg"
|
||||
icon.color: "white"
|
||||
font.pointSize: 12
|
||||
onClicked: {
|
||||
const absoluteStoragePath = App.globalVariables.localStoragePath
|
||||
+ "/" + root.contentFolderName
|
||||
const previewImage = App.installedListModel.get(
|
||||
root.contentFolderName).m_preview
|
||||
const absoluteStoragePath = App.globalVariables.localStoragePath + "/" + root.contentFolderName;
|
||||
const previewImage = App.installedListModel.get(root.contentFolderName).m_preview;
|
||||
if (JSUtil.isWallpaper(root.type)) {
|
||||
let activeMonitors = monitorSelection.getActiveMonitors(
|
||||
)
|
||||
let activeMonitors = monitorSelection.getActiveMonitors();
|
||||
// TODO Alert user to choose a monitor
|
||||
if (activeMonitors.length === 0)
|
||||
return
|
||||
return;
|
||||
|
||||
// We only have sliderVolume if it is a VideoWallpaper
|
||||
let volume = 0
|
||||
let volume = 0;
|
||||
if (type === InstalledType.VideoWallpaper)
|
||||
volume = Math.round(
|
||||
sliderVolume.slider.value * 100) / 100
|
||||
|
||||
const screenFile = App.installedListModel.get(
|
||||
root.contentFolderName).m_file
|
||||
let success = App.screenPlayManager.createWallpaper(
|
||||
root.type, cbVideoFillMode.currentValue,
|
||||
absoluteStoragePath, previewImage, screenFile,
|
||||
activeMonitors, volume, 1, {}, true)
|
||||
volume = Math.round(sliderVolume.slider.value * 100) / 100;
|
||||
const screenFile = App.installedListModel.get(root.contentFolderName).m_file;
|
||||
let success = App.screenPlayManager.createWallpaper(root.type, cbVideoFillMode.currentValue, absoluteStoragePath, previewImage, screenFile, activeMonitors, volume, 1, {}, true);
|
||||
}
|
||||
if (JSUtil.isWidget(root.type))
|
||||
App.screenPlayManager.createWidget(type,
|
||||
Qt.point(0, 0),
|
||||
absoluteStoragePath,
|
||||
previewImage, {},
|
||||
true)
|
||||
|
||||
root.state = "inactive"
|
||||
monitorSelection.reset()
|
||||
App.screenPlayManager.createWidget(type, Qt.point(0, 0), absoluteStoragePath, previewImage, {}, true);
|
||||
root.state = "inactive";
|
||||
monitorSelection.reset();
|
||||
}
|
||||
|
||||
anchors {
|
||||
|
@ -19,7 +19,6 @@ ColumnLayout {
|
||||
let ourValue = model[i].value;
|
||||
if (value === ourValue)
|
||||
return i;
|
||||
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -44,7 +43,6 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Util.Slider {
|
||||
id: slCurrentVideoTime
|
||||
|
||||
@ -107,7 +105,6 @@ ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -119,7 +116,6 @@ ColumnLayout {
|
||||
opacity: 1
|
||||
anchors.topMargin: 20
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "hidden"
|
||||
@ -129,7 +125,6 @@ ColumnLayout {
|
||||
opacity: 0
|
||||
anchors.topMargin: -50
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
@ -144,7 +139,6 @@ ColumnLayout {
|
||||
easing.type: Easing.InOutQuart
|
||||
properties: "anchors.topMargin, opacity"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -20,9 +20,8 @@ Rectangle {
|
||||
property alias radius: root.radius
|
||||
|
||||
Component.onCompleted: {
|
||||
resize()
|
||||
selectOnly(0)
|
||||
|
||||
resize();
|
||||
selectOnly(0);
|
||||
}
|
||||
|
||||
signal requestProjectSettings(var index, var installedType, var appID)
|
||||
@ -30,87 +29,84 @@ Rectangle {
|
||||
function selectOnly(index) {
|
||||
for (var i = 0; i < rp.count; i++) {
|
||||
if (i === index) {
|
||||
rp.itemAt(i).isSelected = true
|
||||
continue
|
||||
rp.itemAt(i).isSelected = true;
|
||||
continue;
|
||||
}
|
||||
rp.itemAt(i).isSelected = false
|
||||
rp.itemAt(i).isSelected = false;
|
||||
}
|
||||
getActiveMonitors()
|
||||
getActiveMonitors();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
for (var i = 0; i < rp.count; i++) {
|
||||
rp.itemAt(i).isSelected = false
|
||||
rp.itemAt(i).isSelected = false;
|
||||
}
|
||||
rp.itemAt(0).isSelected = true
|
||||
getActiveMonitors()
|
||||
rp.itemAt(0).isSelected = true;
|
||||
getActiveMonitors();
|
||||
}
|
||||
|
||||
function getActiveMonitors() {
|
||||
root.activeMonitors = []
|
||||
root.activeMonitors = [];
|
||||
for (var i = 0; i < rp.count; i++) {
|
||||
if (rp.itemAt(i).isSelected)
|
||||
root.activeMonitors.push(rp.itemAt(i).index)
|
||||
root.activeMonitors.push(rp.itemAt(i).index);
|
||||
}
|
||||
// Must be called manually. When QML properties are getting altered in js the
|
||||
// property binding breaks
|
||||
root.activeMonitorsChanged()
|
||||
root.isSelected = root.activeMonitors.length > 0
|
||||
return root.activeMonitors
|
||||
root.activeMonitorsChanged();
|
||||
root.isSelected = root.activeMonitors.length > 0;
|
||||
return root.activeMonitors;
|
||||
}
|
||||
|
||||
function selectMonitorAt(index) {
|
||||
if (!multipleMonitorsSelectable)
|
||||
selectOnly(index)
|
||||
selectOnly(index);
|
||||
else
|
||||
rp.itemAt(index).isSelected = !rp.itemAt(index).isSelected
|
||||
getActiveMonitors()
|
||||
rp.itemAt(index).isSelected = !rp.itemAt(index).isSelected;
|
||||
getActiveMonitors();
|
||||
if (rp.itemAt(index).hasContent)
|
||||
root.requestProjectSettings(index, rp.itemAt(index).installedType,
|
||||
rp.itemAt(index).appID)
|
||||
root.requestProjectSettings(index, rp.itemAt(index).installedType, rp.itemAt(index).appID);
|
||||
}
|
||||
|
||||
function resize() {
|
||||
var absoluteDesktopSize = App.monitorListModel.absoluteDesktopSize()
|
||||
var isWidthGreaterThanHeight = false
|
||||
var windowsDelta = 0
|
||||
var absoluteDesktopSize = App.monitorListModel.absoluteDesktopSize();
|
||||
var isWidthGreaterThanHeight = false;
|
||||
var windowsDelta = 0;
|
||||
if (absoluteDesktopSize.width < absoluteDesktopSize.height) {
|
||||
windowsDelta = absoluteDesktopSize.width / absoluteDesktopSize.height
|
||||
isWidthGreaterThanHeight = false
|
||||
windowsDelta = absoluteDesktopSize.width / absoluteDesktopSize.height;
|
||||
isWidthGreaterThanHeight = false;
|
||||
} else {
|
||||
windowsDelta = absoluteDesktopSize.height / absoluteDesktopSize.width
|
||||
isWidthGreaterThanHeight = true
|
||||
windowsDelta = absoluteDesktopSize.height / absoluteDesktopSize.width;
|
||||
isWidthGreaterThanHeight = true;
|
||||
}
|
||||
if (rp.count === 1)
|
||||
availableWidth = availableWidth * 0.66
|
||||
|
||||
var dynamicHeight = availableWidth * windowsDelta
|
||||
var dynamicWidth = availableHeight * windowsDelta
|
||||
availableWidth = availableWidth * 0.66;
|
||||
var dynamicHeight = availableWidth * windowsDelta;
|
||||
var dynamicWidth = availableHeight * windowsDelta;
|
||||
// Delta (height/width)
|
||||
var monitorHeightRationDelta = 0
|
||||
var monitorWidthRationDelta = 0
|
||||
var monitorHeightRationDelta = 0;
|
||||
var monitorWidthRationDelta = 0;
|
||||
if (isWidthGreaterThanHeight) {
|
||||
monitorHeightRationDelta = dynamicHeight / absoluteDesktopSize.height
|
||||
monitorWidthRationDelta = availableWidth / absoluteDesktopSize.width
|
||||
monitorHeightRationDelta = dynamicHeight / absoluteDesktopSize.height;
|
||||
monitorWidthRationDelta = availableWidth / absoluteDesktopSize.width;
|
||||
} else {
|
||||
monitorHeightRationDelta = availableHeight / absoluteDesktopSize.height
|
||||
monitorWidthRationDelta = dynamicWidth / absoluteDesktopSize.width
|
||||
monitorHeightRationDelta = availableHeight / absoluteDesktopSize.height;
|
||||
monitorWidthRationDelta = dynamicWidth / absoluteDesktopSize.width;
|
||||
}
|
||||
for (var i = 0; i < rp.count; i++) {
|
||||
rp.itemAt(i).index = i
|
||||
rp.itemAt(i).height = rp.itemAt(i).height * monitorHeightRationDelta
|
||||
rp.itemAt(i).width = rp.itemAt(i).width * monitorWidthRationDelta
|
||||
rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta
|
||||
rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta
|
||||
rp.contentWidth += rp.itemAt(i).width
|
||||
rp.contentHeight += rp.itemAt(i).height
|
||||
rp.itemAt(i).index = i;
|
||||
rp.itemAt(i).height = rp.itemAt(i).height * monitorHeightRationDelta;
|
||||
rp.itemAt(i).width = rp.itemAt(i).width * monitorWidthRationDelta;
|
||||
rp.itemAt(i).x = rp.itemAt(i).x * monitorWidthRationDelta;
|
||||
rp.itemAt(i).y = rp.itemAt(i).y * monitorHeightRationDelta;
|
||||
rp.contentWidth += rp.itemAt(i).width;
|
||||
rp.contentHeight += rp.itemAt(i).height;
|
||||
}
|
||||
rp.contentWidth += 200
|
||||
rp.contentHeight += 200
|
||||
rp.contentWidth += 200;
|
||||
rp.contentHeight += 200;
|
||||
}
|
||||
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(
|
||||
Material.background)
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
height: availableHeight
|
||||
width: parent.width
|
||||
clip: true
|
||||
@ -118,7 +114,7 @@ Rectangle {
|
||||
|
||||
Connections {
|
||||
function onMonitorReloadCompleted() {
|
||||
resize()
|
||||
resize();
|
||||
}
|
||||
|
||||
target: App.monitorListModel
|
||||
@ -150,7 +146,7 @@ Rectangle {
|
||||
installedType: m_installedType
|
||||
monitorWithoutContentSelectable: root.monitorWithoutContentSelectable
|
||||
onMonitorSelected: function (index) {
|
||||
root.selectMonitorAt(index)
|
||||
root.selectMonitorAt(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ Item {
|
||||
|
||||
property rect geometry
|
||||
onGeometryChanged: {
|
||||
root.width = geometry.width
|
||||
root.height = geometry.height
|
||||
root.x = geometry.x
|
||||
root.y = geometry.y
|
||||
root.width = geometry.width;
|
||||
root.height = geometry.height;
|
||||
root.x = geometry.x;
|
||||
root.y = geometry.y;
|
||||
}
|
||||
|
||||
property string previewImage
|
||||
@ -51,7 +51,6 @@ Item {
|
||||
top: wrapper.bottom
|
||||
topMargin: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -83,14 +82,12 @@ Item {
|
||||
onClicked: {
|
||||
if (monitorWithoutContentSelectable) {
|
||||
monitorSelected(index);
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (root.hasContent && !root.monitorWithoutContentSelectable)
|
||||
monitorSelected(index);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -101,7 +98,6 @@ Item {
|
||||
target: wrapper
|
||||
border.color: "#373737"
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "selected"
|
||||
@ -110,7 +106,6 @@ Item {
|
||||
target: wrapper
|
||||
border.color: "#F28E0D"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
@ -125,7 +120,6 @@ Item {
|
||||
easing.type: Easing.InOutQuart
|
||||
property: "border.color"
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -18,12 +18,12 @@ Util.Popup {
|
||||
width: 1000
|
||||
height: 500
|
||||
onOpened: {
|
||||
monitorSelection.selectMonitorAt(0)
|
||||
monitorSelection.selectMonitorAt(0);
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onRequestToggleWallpaperConfiguration() {
|
||||
root.open()
|
||||
root.open();
|
||||
}
|
||||
|
||||
target: App.util
|
||||
@ -81,21 +81,18 @@ Util.Popup {
|
||||
availableHeight: 150
|
||||
onRequestProjectSettings: function (index, installedType, appID) {
|
||||
if (installedType === InstalledType.VideoWallpaper) {
|
||||
videoControlWrapper.state = "visible"
|
||||
customPropertiesGridView.visible = false
|
||||
const wallpaper = App.screenPlayManager.getWallpaperByAppID(
|
||||
appID)
|
||||
videoControlWrapper.wallpaper = wallpaper
|
||||
videoControlWrapper.state = "visible";
|
||||
customPropertiesGridView.visible = false;
|
||||
const wallpaper = App.screenPlayManager.getWallpaperByAppID(appID);
|
||||
videoControlWrapper.wallpaper = wallpaper;
|
||||
} else {
|
||||
videoControlWrapper.state = "hidden"
|
||||
customPropertiesGridView.visible = true
|
||||
if (!App.screenPlayManager.requestProjectSettingsAtMonitorIndex(
|
||||
index)) {
|
||||
console.warn("Unable to get requested settings from index: ",
|
||||
index)
|
||||
videoControlWrapper.state = "hidden";
|
||||
customPropertiesGridView.visible = true;
|
||||
if (!App.screenPlayManager.requestProjectSettingsAtMonitorIndex(index)) {
|
||||
console.warn("Unable to get requested settings from index: ", index);
|
||||
}
|
||||
}
|
||||
activeMonitorIndex = index
|
||||
activeMonitorIndex = index;
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -107,7 +104,7 @@ Util.Popup {
|
||||
|
||||
Connections {
|
||||
function onProjectSettingsListModelResult(listModel) {
|
||||
customPropertiesGridView.projectSettingsListmodelRef = listModel
|
||||
customPropertiesGridView.projectSettingsListmodelRef = listModel;
|
||||
}
|
||||
|
||||
target: App.screenPlayManager
|
||||
@ -130,39 +127,32 @@ Util.Popup {
|
||||
highlighted: true
|
||||
text: qsTr("Remove selected")
|
||||
font.family: App.settings.font
|
||||
enabled: monitorSelection.activeMonitors.length == 1
|
||||
&& App.screenPlayManager.activeWallpaperCounter > 0
|
||||
enabled: monitorSelection.activeMonitors.length == 1 && App.screenPlayManager.activeWallpaperCounter > 0
|
||||
onClicked: {
|
||||
if (!App.screenPlayManager.removeWallpaperAt(
|
||||
monitorSelection.activeMonitors[0]))
|
||||
print("Unable to close singel wallpaper")
|
||||
if (!App.screenPlayManager.removeWallpaperAt(monitorSelection.activeMonitors[0]))
|
||||
print("Unable to close singel wallpaper");
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnRemoveAllWallpape
|
||||
|
||||
text: qsTr("Remove all ")
|
||||
+ App.screenPlayManager.activeWallpaperCounter + " " + qsTr(
|
||||
"Wallpapers")
|
||||
text: qsTr("Remove all ") + App.screenPlayManager.activeWallpaperCounter + " " + qsTr("Wallpapers")
|
||||
Material.background: Material.accent
|
||||
highlighted: true
|
||||
font.family: App.settings.font
|
||||
enabled: App.screenPlayManager.activeWallpaperCounter > 0
|
||||
onClicked: {
|
||||
if (!App.screenPlayManager.removeAllWallpapers())
|
||||
print("Unable to close all wallpaper!")
|
||||
|
||||
root.close()
|
||||
print("Unable to close all wallpaper!");
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnRemoveAllWidgets
|
||||
|
||||
text: qsTr("Remove all ")
|
||||
+ App.screenPlayManager.activeWidgetsCounter + " " + qsTr(
|
||||
"Widgets")
|
||||
text: qsTr("Remove all ") + App.screenPlayManager.activeWidgetsCounter + " " + qsTr("Widgets")
|
||||
Material.background: Material.accent
|
||||
Material.foreground: Material.primaryTextColor
|
||||
highlighted: true
|
||||
@ -170,17 +160,15 @@ Util.Popup {
|
||||
enabled: App.screenPlayManager.activeWidgetsCounter > 0
|
||||
onClicked: {
|
||||
if (!App.screenPlayManager.removeAllWidgets())
|
||||
print("Unable to close all widgets!")
|
||||
|
||||
root.close()
|
||||
print("Unable to close all widgets!");
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(
|
||||
Material.background)
|
||||
color: Material.theme === Material.Light ? Material.background : Qt.darker(Material.background)
|
||||
radius: 3
|
||||
clip: true
|
||||
|
||||
@ -262,7 +250,7 @@ Util.Popup {
|
||||
Connections {
|
||||
function onProfilesSaved() {
|
||||
if (root.opened)
|
||||
saveNotification.open()
|
||||
saveNotification.open();
|
||||
}
|
||||
|
||||
target: App.screenPlayManager
|
||||
|
@ -1,9 +1,9 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Qt.labs.platform 1.1
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import ScreenPlayApp
|
||||
import ScreenPlay
|
||||
|
||||
@ -35,7 +35,6 @@ Item {
|
||||
left: parent.left
|
||||
leftMargin: root.isHeadline ? 0 : 25
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item {
|
||||
@ -44,7 +43,6 @@ Item {
|
||||
Component.onCompleted: {
|
||||
if (root.isHeadline)
|
||||
return;
|
||||
|
||||
switch (root.value["type"]) {
|
||||
case "slider":
|
||||
loader.sourceComponent = compSlider;
|
||||
@ -64,7 +62,6 @@ Item {
|
||||
}
|
||||
if (root.value["text"])
|
||||
txtDescription.text = root.value["text"];
|
||||
|
||||
}
|
||||
|
||||
anchors {
|
||||
@ -86,7 +83,6 @@ Item {
|
||||
|
||||
target: loader.item
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component {
|
||||
@ -119,11 +115,8 @@ Item {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component {
|
||||
@ -148,7 +141,6 @@ Item {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -166,7 +158,6 @@ Item {
|
||||
rightMargin: 20
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
@ -174,8 +165,8 @@ Item {
|
||||
|
||||
title: qsTr("Please choose a color")
|
||||
onAccepted: {
|
||||
rctPreviewColor.color = colorDialog.color;
|
||||
let tmpColor = "'" + colorDialog.color.toString() + "'";
|
||||
rctPreviewColor.color = colorDialog.selectedColor;
|
||||
let tmpColor = "'" + colorDialog.selectedColor.toString() + "'";
|
||||
let obj = {
|
||||
"value": colorDialog.color,
|
||||
"type": "color"
|
||||
@ -184,9 +175,7 @@ Item {
|
||||
App.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, tmpColor);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component {
|
||||
@ -233,7 +222,6 @@ Item {
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -247,13 +235,8 @@ Item {
|
||||
right: parent.right
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ Rectangle {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
layer.effect: ElevationEffect {
|
||||
@ -70,7 +69,6 @@ Rectangle {
|
||||
duration: 250
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
states: [
|
||||
@ -82,7 +80,6 @@ Rectangle {
|
||||
anchors.bottomMargin: 10
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import Qt.labs.settings 1.0 as Labs
|
||||
import QtQml
|
||||
import QtCore as QCore
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
@ -9,7 +10,6 @@ import ScreenPlay
|
||||
import ScreenPlayUtil as Util
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
|
||||
/*!
|
||||
\qmltype exitDialog
|
||||
\brief exitDialog
|
||||
@ -18,12 +18,11 @@ import Qt5Compat.GraphicalEffects
|
||||
Util.Popup {
|
||||
id: root
|
||||
property ApplicationWindow applicationWindow
|
||||
contentHeight: 400
|
||||
contentWidth: 600
|
||||
contentItem: Item {
|
||||
contentItem: Pane {
|
||||
background: Item{}
|
||||
padding:20
|
||||
bottomPadding: 10
|
||||
ColumnLayout {
|
||||
anchors.margins: 20
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
|
||||
Text {
|
||||
@ -39,17 +38,25 @@ Util.Popup {
|
||||
|
||||
Image {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
source: "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_windows.png"
|
||||
source: {
|
||||
if (Qt.platform.os === "windows") {
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_windows.png"
|
||||
}
|
||||
if (Qt.platform.os === "osx") {
|
||||
return "qrc:/qml/ScreenPlayApp/assets/images/trayIcon_osx.png"
|
||||
}
|
||||
}
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
Text {
|
||||
text: {
|
||||
if (Qt.platform.os === "windows") {
|
||||
return qsTr("You can <b>quit</b> ScreenPlay via the bottom right Tray-Icon.")
|
||||
return qsTr("You can <b>quit</b> ScreenPlay via the bottom right Tray-Icon.");
|
||||
}
|
||||
if (Qt.platform.os === "osx") {
|
||||
return qsTr("You can <b>quit</b> ScreenPlay via the top right Tray-Icon.")
|
||||
return qsTr("You can <b>quit</b> ScreenPlay via the top right Tray-Icon.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,33 +69,35 @@ Util.Popup {
|
||||
color: Material.primaryTextColor
|
||||
}
|
||||
|
||||
Labs.Settings {
|
||||
QCore.Settings {
|
||||
id: settings
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
Button {
|
||||
text: qsTr("Quit ScreenPlay now")
|
||||
onClicked: Qt.quit()
|
||||
onClicked: App.exit();
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Minimize ScreenPlay")
|
||||
onClicked: {
|
||||
applicationWindow.hide()
|
||||
App.showDockIcon(false)
|
||||
root.close()
|
||||
applicationWindow.hide();
|
||||
App.showDockIcon(false);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
Button {
|
||||
highlighted: true
|
||||
text: qsTr("Always minimize ScreenPlay")
|
||||
onClicked: {
|
||||
settings.setValue("alwaysMinimize", true)
|
||||
settings.sync()
|
||||
App.showDockIcon(false)
|
||||
applicationWindow.hide()
|
||||
root.close()
|
||||
settings.setValue("alwaysMinimize", true);
|
||||
settings.sync();
|
||||
print(settings.value("alwaysMinimize"))
|
||||
App.showDockIcon(false);
|
||||
applicationWindow.hide();
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,31 +22,30 @@ Rectangle {
|
||||
signal changePage(string name)
|
||||
|
||||
function setActive(active) {
|
||||
navActive = active
|
||||
navActive = active;
|
||||
if (active)
|
||||
root.state = "enabled"
|
||||
root.state = "enabled";
|
||||
else
|
||||
root.state = "disabled"
|
||||
root.state = "disabled";
|
||||
}
|
||||
|
||||
function setNavigation(name) {
|
||||
var i = 0
|
||||
var i = 0;
|
||||
for (; i < navArray.length; i++) {
|
||||
if (navArray[i].name === name) {
|
||||
navArray[i].state = "active"
|
||||
root.currentNavigationName = name
|
||||
navArray[i].state = "active";
|
||||
root.currentNavigationName = name;
|
||||
} else {
|
||||
navArray[i].state = "inactive"
|
||||
navArray[i].state = "inactive";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPageChanged(name) {
|
||||
if (!navActive)
|
||||
return
|
||||
|
||||
root.changePage(name)
|
||||
setNavigation(name)
|
||||
return;
|
||||
root.changePage(name);
|
||||
setNavigation(name);
|
||||
}
|
||||
|
||||
implicitWidth: 1366
|
||||
@ -60,11 +59,11 @@ Rectangle {
|
||||
|
||||
Connections {
|
||||
function onRequestNavigationActive(isActive) {
|
||||
setActive(isActive)
|
||||
setActive(isActive);
|
||||
}
|
||||
|
||||
function onRequestNavigation(nav) {
|
||||
onPageChanged(nav)
|
||||
onPageChanged(nav);
|
||||
}
|
||||
|
||||
target: App.util
|
||||
@ -83,16 +82,6 @@ Rectangle {
|
||||
|
||||
spacing: 0
|
||||
|
||||
component CustomTabButton: TabButton {
|
||||
icon.height: 16
|
||||
icon.width: 16
|
||||
font.pointSize: 12
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {}
|
||||
font.capitalization: Font.MixedCase
|
||||
}
|
||||
|
||||
CustomTabButton {
|
||||
id: navCreate
|
||||
icon.height: 22
|
||||
@ -100,7 +89,7 @@ Rectangle {
|
||||
text: qsTr("Create")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_plus.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Create")
|
||||
root.onPageChanged("Create");
|
||||
}
|
||||
objectName: "createTab"
|
||||
}
|
||||
@ -111,7 +100,7 @@ Rectangle {
|
||||
text: qsTr("Workshop")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Workshop")
|
||||
root.onPageChanged("Workshop");
|
||||
}
|
||||
objectName: "workshopTab"
|
||||
}
|
||||
@ -121,7 +110,7 @@ Rectangle {
|
||||
text: qsTr("Installed") + " " + App.installedListModel.count
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_installed.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Installed")
|
||||
root.onPageChanged("Installed");
|
||||
}
|
||||
objectName: "installedTab"
|
||||
}
|
||||
@ -131,7 +120,7 @@ Rectangle {
|
||||
text: qsTr("Community")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Community")
|
||||
root.onPageChanged("Community");
|
||||
}
|
||||
objectName: "communityTab"
|
||||
}
|
||||
@ -141,20 +130,30 @@ Rectangle {
|
||||
text: qsTr("Settings")
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_settings.svg"
|
||||
onClicked: {
|
||||
root.onPageChanged("Settings")
|
||||
root.onPageChanged("Settings");
|
||||
}
|
||||
objectName: "settingsTab"
|
||||
}
|
||||
}
|
||||
|
||||
component CustomTabButton: TabButton {
|
||||
icon.height: 16
|
||||
icon.width: 16
|
||||
font.pointSize: 12
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
background: Item {
|
||||
}
|
||||
font.capitalization: Font.MixedCase
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: quickActionRowBackground
|
||||
anchors.centerIn: quickActionRow
|
||||
width: quickActionRow.width + 5
|
||||
height: quickActionRow.height - 16
|
||||
color: Material.theme === Material.Light ? Material.background : "#242424"
|
||||
border.color: Material.theme === Material.Light ? Material.iconDisabledColor : Qt.darker(
|
||||
Material.background)
|
||||
border.color: Material.theme === Material.Light ? Material.iconDisabledColor : Qt.darker(Material.background)
|
||||
border.width: 1
|
||||
radius: 3
|
||||
}
|
||||
@ -170,8 +169,7 @@ Rectangle {
|
||||
ToolButton {
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/font-awsome/patreon-brands.svg"
|
||||
text: qsTr("Support me on Patreon!")
|
||||
onClicked: Qt.openUrlExternally(
|
||||
"https://www.patreon.com/ScreenPlayApp")
|
||||
onClicked: Qt.openUrlExternally("https://www.patreon.com/ScreenPlayApp")
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,13 +182,12 @@ Rectangle {
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
property bool contentActive: App.screenPlayManager.activeWallpaperCounter > 0
|
||||
|| App.screenPlayManager.activeWidgetsCounter > 0
|
||||
property bool contentActive: App.screenPlayManager.activeWallpaperCounter > 0 || App.screenPlayManager.activeWidgetsCounter > 0
|
||||
|
||||
onContentActiveChanged: {
|
||||
if (!contentActive) {
|
||||
miMuteAll.soundEnabled = true
|
||||
miStopAll.isPlaying = true
|
||||
miMuteAll.soundEnabled = true;
|
||||
miStopAll.isPlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -206,12 +203,11 @@ Rectangle {
|
||||
property bool soundEnabled: true
|
||||
onSoundEnabledChanged: {
|
||||
if (miMuteAll.soundEnabled) {
|
||||
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "false")
|
||||
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "false");
|
||||
} else {
|
||||
miMuteAll.icon.source
|
||||
= "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume_mute.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "true")
|
||||
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume_mute.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("muted", "true");
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,13 +226,11 @@ Rectangle {
|
||||
property bool isPlaying: true
|
||||
onIsPlayingChanged: {
|
||||
if (miStopAll.isPlaying) {
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_pause.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying",
|
||||
"true")
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_pause.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying", "true");
|
||||
} else {
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_play.svg"
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying",
|
||||
"false")
|
||||
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_play.svg";
|
||||
App.screenPlayManager.setAllWallpaperValue("isPlaying", "false");
|
||||
}
|
||||
}
|
||||
hoverEnabled: true
|
||||
@ -252,10 +246,10 @@ Rectangle {
|
||||
icon.width: root.iconWidth
|
||||
icon.height: root.iconHeight
|
||||
onClicked: {
|
||||
App.screenPlayManager.removeAllWallpapers()
|
||||
App.screenPlayManager.removeAllWidgets()
|
||||
miStopAll.isPlaying = true
|
||||
miMuteAll.soundEnabled = true
|
||||
App.screenPlayManager.removeAllWallpapers();
|
||||
App.screenPlayManager.removeAllWidgets();
|
||||
miStopAll.isPlaying = true;
|
||||
miMuteAll.soundEnabled = true;
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
|
@ -19,11 +19,11 @@ Item {
|
||||
width: parent.width
|
||||
onAvailableChanged: {
|
||||
if (!available) {
|
||||
settingsBool.opacity = 0.5
|
||||
radioButton.enabled = false
|
||||
settingsBool.opacity = 0.5;
|
||||
radioButton.enabled = false;
|
||||
} else {
|
||||
settingsButton.opacity = 1
|
||||
radioButton.enabled = true
|
||||
settingsButton.opacity = 1;
|
||||
radioButton.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,12 +55,10 @@ Item {
|
||||
wrapMode: Text.WordWrap
|
||||
linkColor: Material.color(Material.Orange)
|
||||
onLinkActivated: function (link) {
|
||||
Qt.openUrlExternally(link)
|
||||
Qt.openUrlExternally(link);
|
||||
}
|
||||
|
||||
color: Material.theme === Material.Light ? Qt.lighter(
|
||||
Material.foreground) : Qt.darker(
|
||||
Material.foreground)
|
||||
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
|
||||
font.family: App.settings.font
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@ -82,9 +80,9 @@ Item {
|
||||
checked: settingsBool.isChecked
|
||||
onCheckedChanged: {
|
||||
if (radioButton.checkState === Qt.Checked)
|
||||
checkboxChanged(true)
|
||||
checkboxChanged(true);
|
||||
else
|
||||
checkboxChanged(false)
|
||||
checkboxChanged(false);
|
||||
}
|
||||
|
||||
anchors {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.platform
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
@ -17,11 +17,11 @@ Item {
|
||||
|
||||
function indexOfValue(model, value) {
|
||||
for (var i = 0; i < model.length; i++) {
|
||||
let ourValue = model[i].value
|
||||
let ourValue = model[i].value;
|
||||
if (value === ourValue)
|
||||
return i
|
||||
return i;
|
||||
}
|
||||
return -1
|
||||
return -1;
|
||||
}
|
||||
|
||||
Flickable {
|
||||
@ -69,11 +69,12 @@ Item {
|
||||
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
|
||||
isChecked: App.settings.autostart
|
||||
onCheckboxChanged: function (checked) {
|
||||
App.settings.setAutostart(checked)
|
||||
App.settings.setAutostart(checked);
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingBool {
|
||||
headline: qsTr("High priority Autostart")
|
||||
@ -81,11 +82,12 @@ Item {
|
||||
description: qsTr("This options grants ScreenPlay a higher autostart priority than other apps.")
|
||||
isChecked: App.settings.highPriorityStart
|
||||
onCheckboxChanged: {
|
||||
App.settings.setHighPriorityStart(checked)
|
||||
App.settings.setHighPriorityStart(checked);
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingBool {
|
||||
height: 70
|
||||
@ -93,33 +95,33 @@ Item {
|
||||
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: App.settings.anonymousTelemetry
|
||||
onCheckboxChanged: function (checked) {
|
||||
App.settings.setAnonymousTelemetry(checked)
|
||||
App.settings.setAnonymousTelemetry(checked);
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Set save location")
|
||||
buttonText: qsTr("Set location")
|
||||
description: {
|
||||
// Remove file:/// so the used does not get confused
|
||||
let path = App.globalVariables.localStoragePath + ""
|
||||
let path = App.globalVariables.localStoragePath + "";
|
||||
if (path.length === 0)
|
||||
return qsTr("Your storage path is empty!")
|
||||
return qsTr("Your storage path is empty!");
|
||||
else
|
||||
return path.replace('file:///', '')
|
||||
return path.replace('file:///', '');
|
||||
}
|
||||
onButtonPressed: {
|
||||
folderDialogSaveLocation.open()
|
||||
folderDialogSaveLocation.open();
|
||||
}
|
||||
|
||||
FolderDialog {
|
||||
id: folderDialogSaveLocation
|
||||
folder: App.globalVariables.localStoragePath
|
||||
currentFolder : App.globalVariables.localStoragePath
|
||||
onAccepted: {
|
||||
App.settings.setLocalStoragePath(
|
||||
folderDialogSaveLocation.currentFolder)
|
||||
App.settings.setLocalStoragePath(folderDialogSaveLocation.currentFolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -142,7 +144,8 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsComboBox {
|
||||
id: settingsLanguage
|
||||
@ -150,9 +153,7 @@ Item {
|
||||
headline: qsTr("Language")
|
||||
description: qsTr("Set the ScreenPlay UI Language")
|
||||
Component.onCompleted: {
|
||||
settingsLanguage.comboBox.currentIndex = root.indexOfValue(
|
||||
settingsLanguage.comboBox.model,
|
||||
App.settings.language)
|
||||
settingsLanguage.comboBox.currentIndex = root.indexOfValue(settingsLanguage.comboBox.model, App.settings.language);
|
||||
}
|
||||
|
||||
comboBox {
|
||||
@ -197,14 +198,14 @@ Item {
|
||||
"text": "Dutch"
|
||||
}]
|
||||
onActivated: {
|
||||
App.settings.setLanguage(
|
||||
settingsLanguage.comboBox.currentValue)
|
||||
App.settings.retranslateUI()
|
||||
App.settings.setLanguage(settingsLanguage.comboBox.currentValue);
|
||||
App.settings.retranslateUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsComboBox {
|
||||
id: settingsTheme
|
||||
@ -212,9 +213,7 @@ Item {
|
||||
headline: qsTr("Theme")
|
||||
description: qsTr("Switch dark/light theme")
|
||||
Component.onCompleted: {
|
||||
settingsTheme.comboBox.currentIndex = root.indexOfValue(
|
||||
settingsTheme.comboBox.model,
|
||||
App.settings.theme)
|
||||
settingsTheme.comboBox.currentIndex = root.indexOfValue(settingsTheme.comboBox.model, App.settings.theme);
|
||||
}
|
||||
|
||||
comboBox {
|
||||
@ -229,8 +228,7 @@ Item {
|
||||
"text": qsTr("Light")
|
||||
}]
|
||||
onActivated: {
|
||||
App.settings.setTheme(
|
||||
settingsTheme.comboBox.currentValue)
|
||||
App.settings.setTheme(settingsTheme.comboBox.currentValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -256,11 +254,12 @@ Item {
|
||||
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: App.settings.checkWallpaperVisible
|
||||
onCheckboxChanged: function (checked) {
|
||||
App.settings.setCheckWallpaperVisible(checked)
|
||||
App.settings.setCheckWallpaperVisible(checked);
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsComboBox {
|
||||
id: cbVideoFillMode
|
||||
@ -268,14 +267,11 @@ Item {
|
||||
headline: qsTr("Default Fill Mode")
|
||||
description: qsTr("Set this property to define how the video is scaled to fit the target area.")
|
||||
Component.onCompleted: {
|
||||
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(
|
||||
cbVideoFillMode.comboBox.model,
|
||||
App.settings.videoFillMode)
|
||||
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(cbVideoFillMode.comboBox.model, App.settings.videoFillMode);
|
||||
}
|
||||
|
||||
comboBox {
|
||||
onActivated: App.settings.setVideoFillMode(
|
||||
cbVideoFillMode.comboBox.currentValue)
|
||||
onActivated: App.settings.setVideoFillMode(cbVideoFillMode.comboBox.currentValue)
|
||||
model: [{
|
||||
"value": FillMode.Stretch,
|
||||
"text": qsTr("Stretch")
|
||||
@ -319,8 +315,7 @@ Item {
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: txtHeadline.paintedHeight + txtDescriptionAbout.paintedHeight
|
||||
+ wrapperLinks.childrenRect.height + 80
|
||||
height: txtHeadline.paintedHeight + txtDescriptionAbout.paintedHeight + wrapperLinks.childrenRect.height + 80
|
||||
|
||||
Text {
|
||||
id: txtHeadline
|
||||
@ -443,26 +438,27 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsButton {
|
||||
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_launch.svg"
|
||||
headline: qsTr("Version")
|
||||
description: App.settings.buildInfos
|
||||
buttonText: qsTr("Open Changelog")
|
||||
onButtonPressed: Qt.openUrlExternally(
|
||||
"https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
||||
onButtonPressed: Qt.openUrlExternally("https://gitlab.com/kelteseth/ScreenPlay/-/releases")
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Third Party Software")
|
||||
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
||||
buttonText: qsTr("Licenses")
|
||||
onButtonPressed: {
|
||||
App.util.requestAllLicenses()
|
||||
expanderCopyright.toggle()
|
||||
App.util.requestAllLicenses();
|
||||
expanderCopyright.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,21 +467,22 @@ Item {
|
||||
|
||||
Connections {
|
||||
function onAllLicenseLoaded(licensesText) {
|
||||
expanderCopyright.text = licensesText
|
||||
expanderCopyright.text = licensesText;
|
||||
}
|
||||
|
||||
target: App.util
|
||||
}
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Logs")
|
||||
description: qsTr("If your ScreenPlay missbehaves this is a good way to look for answers. This shows all logs and warning during runtime.")
|
||||
buttonText: qsTr("Show Logs")
|
||||
onButtonPressed: {
|
||||
expanderDebug.toggle()
|
||||
expanderDebug.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
@ -495,15 +492,16 @@ Item {
|
||||
text: App.util.debugMessages
|
||||
}
|
||||
|
||||
SettingsHorizontalSeperator {}
|
||||
SettingsHorizontalSeperator {
|
||||
}
|
||||
|
||||
SettingsButton {
|
||||
headline: qsTr("Data Protection")
|
||||
description: qsTr("We use you data very carefully to improve ScreenPlay. We do not sell or share this (anonymous) information with others!")
|
||||
buttonText: qsTr("Privacy")
|
||||
onButtonPressed: {
|
||||
App.util.requestDataProtection()
|
||||
expanderDataProtection.toggle()
|
||||
App.util.requestDataProtection();
|
||||
expanderDataProtection.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,7 +510,7 @@ Item {
|
||||
|
||||
Connections {
|
||||
function onAllDataProtectionLoaded(dataProtectionText) {
|
||||
expanderDataProtection.text = dataProtectionText
|
||||
expanderDataProtection.text = dataProtectionText;
|
||||
}
|
||||
|
||||
target: App.util
|
||||
|
@ -16,7 +16,7 @@ Item {
|
||||
property bool enabled: true
|
||||
property bool available: true
|
||||
|
||||
signal buttonPressed()
|
||||
signal buttonPressed
|
||||
|
||||
height: txtHeadline.paintedHeight + txtDescription.paintedHeight + 20
|
||||
width: parent.width
|
||||
@ -46,7 +46,6 @@ Item {
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -68,7 +67,6 @@ Item {
|
||||
right: btnSettings.left
|
||||
rightMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
@ -87,7 +85,5 @@ Item {
|
||||
rightMargin: 20
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ Control {
|
||||
left: parent.left
|
||||
leftMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -54,7 +53,6 @@ Control {
|
||||
right: comboBox.left
|
||||
rightMargin: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
@ -70,7 +68,5 @@ Control {
|
||||
rightMargin: 20
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ Item {
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
@ -55,7 +54,6 @@ Item {
|
||||
snapMode: ScrollBar.SnapOnRelease
|
||||
policy: ScrollBar.AlwaysOn
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Menu {
|
||||
@ -67,7 +65,6 @@ Item {
|
||||
App.util.copyToClipboard(txtExpander.text);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -78,7 +75,6 @@ Item {
|
||||
target: root
|
||||
height: 500
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "off"
|
||||
@ -87,7 +83,6 @@ Item {
|
||||
target: root
|
||||
height: 0
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
@ -101,7 +96,6 @@ Item {
|
||||
property: "height"
|
||||
duration: 250
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ Item {
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -63,7 +62,6 @@ Item {
|
||||
left: parent.left
|
||||
leftMargin: 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
@ -89,11 +87,8 @@ Item {
|
||||
left: parent.left
|
||||
leftMargin: 30
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
@ -111,7 +106,6 @@ Item {
|
||||
anchors.topMargin: 10
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "in"
|
||||
@ -127,7 +121,6 @@ Item {
|
||||
anchors.topMargin: 2
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
@ -142,7 +135,6 @@ Item {
|
||||
duration: 400
|
||||
easing.type: Easing.InOutQuart
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -23,7 +23,5 @@ Item {
|
||||
leftMargin: customMargin
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -14,12 +14,11 @@ Item {
|
||||
|
||||
Component.onCompleted: {
|
||||
if (App.settings.steamVersion) {
|
||||
workshopLoader.setSource(
|
||||
"qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshop.qml", {
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshop.qml", {
|
||||
"modalSource": modalSource
|
||||
})
|
||||
});
|
||||
} else {
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayWorkshop/qml/Forum.qml")
|
||||
workshopLoader.setSource("qrc:/qml/ScreenPlayWorkshop/qml/Forum.qml");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,6 @@
|
||||
Style=Material
|
||||
|
||||
[Material]
|
||||
Theme=Light
|
||||
Theme=System
|
||||
Accent=Orange
|
||||
Variant=Dense
|
||||
|
@ -5,15 +5,20 @@
|
||||
#include "ScreenPlayUtil/macutils.h"
|
||||
#endif
|
||||
|
||||
#include "app.h"
|
||||
#include "steam/steam_qt_enums_generated.h"
|
||||
#include <QGuiApplication>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QQuickStyle>
|
||||
#include <QVersionNumber>
|
||||
|
||||
namespace ScreenPlay {
|
||||
|
||||
/*!
|
||||
\module ScreenPlay
|
||||
|
||||
\title ScreenPlay
|
||||
|
||||
\brief Module for ScreenPlay.
|
||||
*/
|
||||
/*!
|
||||
@ -128,7 +133,7 @@ App::App()
|
||||
/*!
|
||||
\brief Used for initialization after the constructor. The sole purpose is to check if
|
||||
another ScreenPlay instance is running and then quit early. This is also because we cannot
|
||||
call QApplication::quit(); in the SDKConnector before the app.exec(); ( the Qt main event
|
||||
call QGuiApplication::quit(); in the SDKConnector before the app.exec(); ( the Qt main event
|
||||
loop ) has started.
|
||||
*/
|
||||
void App::init()
|
||||
@ -185,25 +190,25 @@ void App::init()
|
||||
// Init after we have the paths from settings
|
||||
m_installedListModel->init();
|
||||
|
||||
auto* guiApplication = QGuiApplication::instance();
|
||||
auto* guiAppInst = dynamic_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
|
||||
// Set visible if the -silent parameter was not set
|
||||
if (guiApplication->arguments().contains("-silent")) {
|
||||
if (guiAppInst->arguments().contains("-silent")) {
|
||||
qInfo() << "Starting in silent mode.";
|
||||
settings()->setSilentStart(true);
|
||||
}
|
||||
|
||||
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "App", this);
|
||||
m_mainWindowEngine->addImportPath(guiApplication->applicationDirPath() + "/qml");
|
||||
m_mainWindowEngine->addImportPath(guiAppInst->applicationDirPath() + "/qml");
|
||||
#if defined(Q_OS_OSX)
|
||||
QDir workingDir(guiApplication->applicationDirPath());
|
||||
QDir workingDir(guiAppInst->applicationDirPath());
|
||||
workingDir.cdUp();
|
||||
workingDir.cdUp();
|
||||
workingDir.cdUp();
|
||||
// OSX Development workaround:
|
||||
m_mainWindowEngine->addImportPath(workingDir.path() + "/qml");
|
||||
#endif
|
||||
guiApplication->addLibraryPath(guiApplication->applicationDirPath() + "/qml");
|
||||
guiAppInst->addLibraryPath(guiAppInst->applicationDirPath() + "/qml");
|
||||
|
||||
if (m_settings->desktopEnvironment() == Settings::DesktopEnvironment::KDE) {
|
||||
setupKDE();
|
||||
@ -223,12 +228,15 @@ QString App::version() const
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Calls QApplication quit() and can be used to do additional
|
||||
\brief Calls QGuiApplication quit() and can be used to do additional
|
||||
tasks before exiting.
|
||||
*/
|
||||
void App::exit()
|
||||
{
|
||||
QApplication::instance()->quit();
|
||||
m_screenPlayManager->removeAllWallpapers();
|
||||
m_screenPlayManager->removeAllWidgets();
|
||||
auto* guiAppInst = dynamic_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
guiAppInst->quit();
|
||||
}
|
||||
|
||||
bool App::isKDEInstalled()
|
||||
@ -344,4 +352,159 @@ void App::showDockIcon(const bool show)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
\property App::globalVariables
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setGlobalVariables(GlobalVariables* globalVariables)
|
||||
{
|
||||
if (m_globalVariables.get() == globalVariables)
|
||||
return;
|
||||
|
||||
m_globalVariables.reset(globalVariables);
|
||||
emit globalVariablesChanged(m_globalVariables.get());
|
||||
}
|
||||
|
||||
/*!
|
||||
\property App::screenPlayManager
|
||||
\brief Sets the screen play manager.
|
||||
*/
|
||||
void App::setScreenPlayManager(ScreenPlayManager* screenPlayManager)
|
||||
{
|
||||
if (m_screenPlayManager.get() == screenPlayManager)
|
||||
return;
|
||||
|
||||
m_screenPlayManager.reset(screenPlayManager);
|
||||
emit screenPlayManagerChanged(m_screenPlayManager.get());
|
||||
}
|
||||
/*!
|
||||
\property App::create
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setCreate(Create* create)
|
||||
{
|
||||
if (m_create.get() == create)
|
||||
return;
|
||||
|
||||
m_create.reset(create);
|
||||
emit createChanged(m_create.get());
|
||||
}
|
||||
/*!
|
||||
\property App::util
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setUtil(Util* util)
|
||||
{
|
||||
if (m_util.get() == util)
|
||||
return;
|
||||
|
||||
m_util.reset(util);
|
||||
emit utilChanged(m_util.get());
|
||||
}
|
||||
/*!
|
||||
\property App::settings
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setSettings(Settings* settings)
|
||||
{
|
||||
if (m_settings.get() == settings)
|
||||
return;
|
||||
|
||||
m_settings.reset(settings);
|
||||
emit settingsChanged(m_settings.get());
|
||||
}
|
||||
/*!
|
||||
\property App::installedListModel
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setInstalledListModel(InstalledListModel* installedListModel)
|
||||
{
|
||||
if (m_installedListModel.get() == installedListModel)
|
||||
return;
|
||||
|
||||
m_installedListModel.reset(installedListModel);
|
||||
emit installedListModelChanged(m_installedListModel.get());
|
||||
}
|
||||
/*!
|
||||
\property App::monitorListModel
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setMonitorListModel(MonitorListModel* monitorListModel)
|
||||
{
|
||||
if (m_monitorListModel.get() == monitorListModel)
|
||||
return;
|
||||
|
||||
m_monitorListModel.reset(monitorListModel);
|
||||
emit monitorListModelChanged(m_monitorListModel.get());
|
||||
}
|
||||
/*!
|
||||
\property App::profileListModel
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setProfileListModel(ProfileListModel* profileListModel)
|
||||
{
|
||||
if (m_profileListModel.get() == profileListModel)
|
||||
return;
|
||||
|
||||
m_profileListModel.reset(profileListModel);
|
||||
emit profileListModelChanged(m_profileListModel.get());
|
||||
}
|
||||
/*!
|
||||
\property App::installedListFilter
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setInstalledListFilter(InstalledListFilter* installedListFilter)
|
||||
{
|
||||
if (m_installedListFilter.get() == installedListFilter)
|
||||
return;
|
||||
|
||||
m_installedListFilter.reset(installedListFilter);
|
||||
emit installedListFilterChanged(m_installedListFilter.get());
|
||||
}
|
||||
/*!
|
||||
\property App::mainWindowEngine
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setMainWindowEngine(QQmlApplicationEngine* mainWindowEngine)
|
||||
{
|
||||
if (m_mainWindowEngine.get() == mainWindowEngine)
|
||||
return;
|
||||
|
||||
m_mainWindowEngine.reset(mainWindowEngine);
|
||||
emit mainWindowEngineChanged(m_mainWindowEngine.get());
|
||||
}
|
||||
/*!
|
||||
\property App::wizards
|
||||
\brief .
|
||||
|
||||
.
|
||||
*/
|
||||
void App::setWizards(Wizards* wizards)
|
||||
{
|
||||
if (m_wizards.get() == wizards)
|
||||
return;
|
||||
|
||||
m_wizards.reset(wizards);
|
||||
emit wizardsChanged(m_wizards.get());
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_app.cpp"
|
||||
|
@ -360,3 +360,5 @@ void Create::abortAndCleanup()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_create.cpp"
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "ScreenPlay/createimportvideo.h"
|
||||
#include "ScreenPlayUtil/util.h"
|
||||
#include <QGuiApplication>
|
||||
|
||||
namespace ScreenPlay {
|
||||
|
||||
@ -61,8 +62,8 @@ void CreateImportVideo::setupFFMPEG()
|
||||
m_ffprobeExecutable = "ffprobe";
|
||||
m_ffmpegExecutable = "ffmpeg";
|
||||
#else
|
||||
m_ffprobeExecutable = QApplication::applicationDirPath() + "/ffprobe" + ScreenPlayUtil::executableBinEnding();
|
||||
m_ffmpegExecutable = QApplication::applicationDirPath() + "/ffmpeg" + ScreenPlayUtil::executableBinEnding();
|
||||
m_ffprobeExecutable = QGuiApplication::applicationDirPath() + "/ffprobe" + ScreenPlayUtil::executableBinEnding();
|
||||
m_ffmpegExecutable = QGuiApplication::applicationDirPath() + "/ffmpeg" + ScreenPlayUtil::executableBinEnding();
|
||||
#endif
|
||||
|
||||
if (!QFileInfo::exists(m_ffprobeExecutable)) {
|
||||
@ -732,7 +733,7 @@ QString CreateImportVideo::waitForFinished(
|
||||
|
||||
m_process->setProcessChannelMode(processChannelMode);
|
||||
m_process->setArguments(args);
|
||||
m_process->setWorkingDirectory(QApplication::applicationDirPath());
|
||||
m_process->setWorkingDirectory(QGuiApplication::applicationDirPath());
|
||||
m_process->start();
|
||||
|
||||
qInfo() << m_process->workingDirectory() << m_process->program() << m_process->arguments();
|
||||
@ -765,3 +766,5 @@ QString CreateImportVideo::waitForFinished(
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_createimportvideo.cpp"
|
||||
|
@ -20,3 +20,5 @@ ScreenPlay::GlobalVariables::GlobalVariables(QObject* parent)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_globalvariables.cpp"
|
||||
|
@ -83,3 +83,5 @@ void InstalledListFilter::resetFilter()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_installedlistfilter.cpp"
|
||||
|
@ -55,7 +55,7 @@ void InstalledListModel::deinstallItemAt(const QString& absoluteStoragePath)
|
||||
QTimer::singleShot(1000, this, [this, absoluteStoragePath]() {
|
||||
int index = -1;
|
||||
for (int i = 0; i < m_screenPlayFiles.size(); ++i) {
|
||||
if (m_screenPlayFiles.at(i).m_absoluteStoragePath.toString() == absoluteStoragePath) {
|
||||
if (m_screenPlayFiles.at(i).projectJsonFilePath.absoluteFilePath() == absoluteStoragePath) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
@ -135,29 +135,29 @@ QVariant InstalledListModel::data(const QModelIndex& index, int role) const
|
||||
if (row < rowCount())
|
||||
switch (role) {
|
||||
case static_cast<int>(ScreenPlayItem::Title):
|
||||
return m_screenPlayFiles.at(row).m_title;
|
||||
return m_screenPlayFiles.at(row).title;
|
||||
case static_cast<int>(ScreenPlayItem::Preview):
|
||||
return m_screenPlayFiles.at(row).m_preview;
|
||||
return m_screenPlayFiles.at(row).preview;
|
||||
case static_cast<int>(ScreenPlayItem::PreviewGIF):
|
||||
return m_screenPlayFiles.at(row).m_previewGIF;
|
||||
return m_screenPlayFiles.at(row).previewGIF;
|
||||
case static_cast<int>(ScreenPlayItem::Type):
|
||||
return QVariant::fromValue(m_screenPlayFiles.at(row).m_type);
|
||||
case static_cast<int>(ScreenPlayItem::FolderId):
|
||||
return m_screenPlayFiles.at(row).m_folderId;
|
||||
return QVariant::fromValue(m_screenPlayFiles.at(row).type);
|
||||
case static_cast<int>(ScreenPlayItem::FolderName):
|
||||
return m_screenPlayFiles.at(row).folderName;
|
||||
case static_cast<int>(ScreenPlayItem::FileId):
|
||||
return m_screenPlayFiles.at(row).m_file;
|
||||
return m_screenPlayFiles.at(row).file;
|
||||
case static_cast<int>(ScreenPlayItem::AbsoluteStoragePath):
|
||||
return m_screenPlayFiles.at(row).m_absoluteStoragePath;
|
||||
return QUrl::fromLocalFile(m_screenPlayFiles.at(row).projectJsonFilePath.dir().path());
|
||||
case static_cast<int>(ScreenPlayItem::PublishedFileID):
|
||||
return m_screenPlayFiles.at(row).m_publishedFileID;
|
||||
return m_screenPlayFiles.at(row).publishedFileID;
|
||||
case static_cast<int>(ScreenPlayItem::Tags):
|
||||
return m_screenPlayFiles.at(row).m_tags;
|
||||
return m_screenPlayFiles.at(row).tags;
|
||||
case static_cast<int>(ScreenPlayItem::IsNew):
|
||||
return m_screenPlayFiles.at(row).m_isNew;
|
||||
return m_screenPlayFiles.at(row).isNew;
|
||||
case static_cast<int>(ScreenPlayItem::LastModified):
|
||||
return m_screenPlayFiles.at(row).m_lastModified;
|
||||
return m_screenPlayFiles.at(row).lastModified;
|
||||
case static_cast<int>(ScreenPlayItem::SearchType):
|
||||
return QVariant::fromValue(m_screenPlayFiles.at(row).m_searchType);
|
||||
return QVariant::fromValue(m_screenPlayFiles.at(row).searchType);
|
||||
}
|
||||
|
||||
qWarning() << "Unable to fetch value for row type:" << role;
|
||||
@ -174,7 +174,7 @@ QHash<int, QByteArray> InstalledListModel::roleNames() const
|
||||
{ static_cast<int>(ScreenPlayItem::Type), "m_type" },
|
||||
{ static_cast<int>(ScreenPlayItem::Preview), "m_preview" },
|
||||
{ static_cast<int>(ScreenPlayItem::PreviewGIF), "m_previewGIF" },
|
||||
{ static_cast<int>(ScreenPlayItem::FolderId), "m_folderId" },
|
||||
{ static_cast<int>(ScreenPlayItem::FolderName), "m_folderName" },
|
||||
{ static_cast<int>(ScreenPlayItem::FileId), "m_file" },
|
||||
{ static_cast<int>(ScreenPlayItem::AbsoluteStoragePath), "m_absoluteStoragePath" },
|
||||
{ static_cast<int>(ScreenPlayItem::PublishedFileID), "m_publishedFileID" },
|
||||
@ -188,10 +188,16 @@ QHash<int, QByteArray> InstalledListModel::roleNames() const
|
||||
/*!
|
||||
\brief Append an ProjectFile to the list.
|
||||
*/
|
||||
void InstalledListModel::append(const QJsonObject& obj, const QString& folderName, const bool isNew, const QDateTime& lastModified)
|
||||
void InstalledListModel::append(const QString& projectJsonFilePath)
|
||||
{
|
||||
beginInsertRows(QModelIndex(), m_screenPlayFiles.size(), m_screenPlayFiles.size());
|
||||
m_screenPlayFiles.append(ProjectFile(obj, folderName, m_globalVariables->localStoragePath(), isNew, lastModified));
|
||||
ProjectFile projectFile;
|
||||
projectFile.projectJsonFilePath = QFileInfo(projectJsonFilePath);
|
||||
if (!projectFile.init()) {
|
||||
qWarning() << "Invalid project at " << projectJsonFilePath;
|
||||
return;
|
||||
}
|
||||
m_screenPlayFiles.append(std::move(projectFile));
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
@ -211,34 +217,15 @@ void InstalledListModel::loadInstalledContent()
|
||||
QFileInfoList list = QDir(m_globalVariables->localStoragePath().toLocalFile()).entryInfoList(QDir::NoDotAndDotDot | QDir::AllDirs);
|
||||
int counter = 0;
|
||||
|
||||
for (const auto& item : list) {
|
||||
for (const QFileInfo& item : list) {
|
||||
const QString absoluteFilePath = m_globalVariables->localStoragePath().toLocalFile() + "/" + item.baseName() + "/project.json";
|
||||
|
||||
if (!QFile::exists(absoluteFilePath))
|
||||
continue;
|
||||
|
||||
bool isNew = false;
|
||||
|
||||
if (item.birthTime().date() == QDateTime::currentDateTime().date())
|
||||
isNew = true;
|
||||
|
||||
if (auto obj = ScreenPlayUtil::openJsonFileToObject(absoluteFilePath)) {
|
||||
|
||||
if (obj->isEmpty())
|
||||
continue;
|
||||
|
||||
if (!obj->contains("type"))
|
||||
continue;
|
||||
|
||||
if (ScreenPlayUtil::getAvailableTypes().contains(obj->value("type").toString())) {
|
||||
if (ScreenPlayUtil::getAvailableTypes().contains(obj->value("type").toString(), Qt::CaseInsensitive)) {
|
||||
append(*obj, item.baseName(), isNew, item.lastModified());
|
||||
}
|
||||
|
||||
append(absoluteFilePath);
|
||||
counter += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
setCount(counter);
|
||||
emit installedLoadingFinished();
|
||||
m_isLoading = false;
|
||||
@ -262,17 +249,17 @@ QVariantMap InstalledListModel::get(const QString& folderName) const
|
||||
}
|
||||
|
||||
for (const auto& item : m_screenPlayFiles) {
|
||||
if (item.m_folderId == folderName) {
|
||||
if (item.folderName == folderName) {
|
||||
QVariantMap map;
|
||||
map.insert("m_title", item.m_title);
|
||||
map.insert("m_preview", item.m_preview);
|
||||
map.insert("m_previewGIF", item.m_previewGIF);
|
||||
map.insert("m_file", item.m_file);
|
||||
map.insert("m_type", QVariant::fromValue(item.m_type));
|
||||
map.insert("m_absoluteStoragePath", item.m_absoluteStoragePath);
|
||||
map.insert("m_publishedFileID", item.m_publishedFileID);
|
||||
map.insert("m_isNew", item.m_isNew);
|
||||
map.insert("m_lastModified", item.m_lastModified);
|
||||
map.insert("m_title", item.title);
|
||||
map.insert("m_preview", item.preview);
|
||||
map.insert("m_previewGIF", item.previewGIF);
|
||||
map.insert("m_file", item.file);
|
||||
map.insert("m_type", QVariant::fromValue(item.type));
|
||||
map.insert("m_absoluteStoragePath", QUrl::fromLocalFile(item.projectJsonFilePath.dir().path()));
|
||||
map.insert("m_publishedFileID", item.publishedFileID);
|
||||
map.insert("m_isNew", item.isNew);
|
||||
map.insert("m_lastModified", item.lastModified);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@ -293,3 +280,5 @@ void InstalledListModel::reset()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_installedlistmodel.cpp"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
|
||||
#include "ScreenPlay/monitorlistmodel.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
namespace ScreenPlay {
|
||||
|
||||
/*!
|
||||
@ -27,9 +27,9 @@ MonitorListModel::MonitorListModel(QObject* parent)
|
||||
{
|
||||
loadMonitors();
|
||||
|
||||
auto* guiAppInst = dynamic_cast<QApplication*>(QApplication::instance());
|
||||
connect(guiAppInst, &QApplication::screenAdded, this, &MonitorListModel::screenAdded);
|
||||
connect(guiAppInst, &QApplication::screenRemoved, this, &MonitorListModel::screenRemoved);
|
||||
auto* guiAppInst = dynamic_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
connect(guiAppInst, &QGuiApplication::screenAdded, this, &MonitorListModel::screenAdded);
|
||||
connect(guiAppInst, &QGuiApplication::screenRemoved, this, &MonitorListModel::screenRemoved);
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -148,8 +148,8 @@ void MonitorListModel::loadMonitors()
|
||||
int offsetX = 0;
|
||||
int offsetY = 0;
|
||||
|
||||
for (int i = 0; i < QApplication::screens().count(); i++) {
|
||||
QScreen* screen = QApplication::screens().at(i);
|
||||
for (int i = 0; i < QGuiApplication::screens().count(); i++) {
|
||||
QScreen* screen = QGuiApplication::screens().at(i);
|
||||
if (screen->availableGeometry().x() < 0) {
|
||||
offsetX += (screen->availableGeometry().x() * -1);
|
||||
}
|
||||
@ -158,8 +158,8 @@ void MonitorListModel::loadMonitors()
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < QApplication::screens().count(); i++) {
|
||||
QScreen* screen = QApplication::screens().at(i);
|
||||
for (int i = 0; i < QGuiApplication::screens().count(); i++) {
|
||||
QScreen* screen = QGuiApplication::screens().at(i);
|
||||
|
||||
// Sometimes we get invalid monitors on Windows. I don't know why...
|
||||
if (screen->geometry().width() == 0 || screen->geometry().height() == 0)
|
||||
@ -222,8 +222,8 @@ void MonitorListModel::closeWallpaper(const QString& appID)
|
||||
*/
|
||||
QRect MonitorListModel::absoluteDesktopSize() const
|
||||
{
|
||||
auto* app = static_cast<QApplication*>(QGuiApplication::instance());
|
||||
return app->screens().at(0)->availableVirtualGeometry();
|
||||
auto* guiAppInst = dynamic_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
return guiAppInst->screens().at(0)->availableVirtualGeometry();
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -272,3 +272,5 @@ void MonitorListModel::reset()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_monitorlistmodel.cpp"
|
||||
|
@ -95,3 +95,5 @@ void ProfileListModel::append(const Profile& profile)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_profilelistmodel.cpp"
|
||||
|
@ -204,3 +204,5 @@ QHash<int, QByteArray> ProjectSettingsListModel::roleNames() const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_projectsettingslistmodel.cpp"
|
||||
|
@ -1,10 +1,9 @@
|
||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
|
||||
#include "ScreenPlay/screenplaymanager.h"
|
||||
#include "ScreenPlay/util.h"
|
||||
|
||||
#include <QScopeGuard>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
namespace ScreenPlay {
|
||||
|
||||
/*!
|
||||
@ -738,3 +737,5 @@ void ScreenPlayManager::setIsKDEConnected(bool isKDEConnected)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_screenplaymanager.cpp"
|
||||
|
@ -149,18 +149,19 @@ void ScreenPlayWallpaper::close()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_connection->close()) {
|
||||
m_isExiting = true;
|
||||
if (!m_connection->close()) {
|
||||
qCritical() << "Cannot close wallpaper!";
|
||||
return;
|
||||
}
|
||||
m_isExiting = true;
|
||||
}
|
||||
/*!
|
||||
\brief Prints the exit code if != 0.
|
||||
*/
|
||||
void ScreenPlayWallpaper::processExit(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
Q_UNUSED(exitStatus)
|
||||
if (exitCode != 0)
|
||||
qWarning() << "WARNING EXIT CODE: " << exitCode;
|
||||
qWarning() << "WARNING EXIT CODE: " << exitCode << exitStatus;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -281,3 +282,5 @@ bool ScreenPlayWallpaper::replace(
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_screenplaywallpaper.cpp"
|
||||
|
@ -133,3 +133,5 @@ QJsonObject ScreenPlayWidget::getActiveSettingsJson()
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_screenplaywidget.cpp"
|
||||
|
@ -113,6 +113,10 @@ bool ScreenPlay::SDKConnection::close()
|
||||
qWarning() << "Cannot close invalid socket.";
|
||||
return false;
|
||||
}
|
||||
QJsonObject obj;
|
||||
obj.insert("command", "quit");
|
||||
m_socket->write(QByteArray(QJsonDocument(obj).toJson(QJsonDocument::Compact)));
|
||||
m_socket->flush();
|
||||
|
||||
qInfo() << "Close " << m_type << m_appID << m_socket->state();
|
||||
m_socket->disconnectFromServer();
|
||||
@ -121,3 +125,5 @@ bool ScreenPlay::SDKConnection::close()
|
||||
return m_socket->state() == QLocalSocket::UnconnectedState;
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_sdkconnection.cpp"
|
||||
|
@ -241,7 +241,7 @@ void Settings::initInstalledPath()
|
||||
*/
|
||||
void Settings::initSteamInstalledPath()
|
||||
{
|
||||
QString appBasePath = QApplication::instance()->applicationDirPath();
|
||||
QString appBasePath = QGuiApplication::instance()->applicationDirPath();
|
||||
if (desktopEnvironment() == DesktopEnvironment::OSX) {
|
||||
appBasePath += "/../../..";
|
||||
}
|
||||
@ -293,14 +293,14 @@ bool Settings::retranslateUI()
|
||||
QString langCode = fixLanguageCode(QVariant::fromValue(language()).toString());
|
||||
|
||||
QFile tsFile;
|
||||
const QString qmPath = QApplication::applicationDirPath() + "/translations/ScreenPlay_" + langCode + ".qm";
|
||||
const QString qmPath = QGuiApplication::applicationDirPath() + "/translations/ScreenPlay_" + langCode + ".qm";
|
||||
if (tsFile.exists(qmPath)) {
|
||||
if (!m_translator.load(qmPath)) {
|
||||
qWarning() << "Unable to load translation file: " << qmPath;
|
||||
return false;
|
||||
}
|
||||
auto* app = static_cast<QApplication*>(QApplication::instance());
|
||||
app->installTranslator(&m_translator);
|
||||
auto* guiAppInst = dynamic_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
guiAppInst->installTranslator(&m_translator);
|
||||
emit requestRetranslation();
|
||||
|
||||
if (language() == Settings::Language::Ko_KR) {
|
||||
@ -329,3 +329,5 @@ QString Settings::fixLanguageCode(const QString& languageCode)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_settings.cpp"
|
||||
|
@ -4,7 +4,9 @@
|
||||
#include "qarchive_enums.hpp"
|
||||
#include "qarchivediskcompressor.hpp"
|
||||
#include "qarchivediskextractor.hpp"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QGuiApplication>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <sentry.h>
|
||||
@ -26,7 +28,8 @@ Util::Util()
|
||||
{
|
||||
// Fix log access vilation on quit
|
||||
utilPointer = this;
|
||||
QObject::connect(QGuiApplication::instance(), &QGuiApplication::aboutToQuit, this, []() { utilPointer = nullptr; });
|
||||
auto* guiAppInst = dynamic_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
QObject::connect(guiAppInst, &QGuiApplication::aboutToQuit, this, []() { utilPointer = nullptr; });
|
||||
|
||||
m_extractor = std::make_unique<QArchive::DiskExtractor>();
|
||||
m_compressor = std::make_unique<QArchive::DiskCompressor>();
|
||||
@ -58,7 +61,7 @@ Util::~Util() { }
|
||||
*/
|
||||
void Util::copyToClipboard(const QString& text) const
|
||||
{
|
||||
auto* clipboard = QApplication::clipboard();
|
||||
auto* clipboard = QGuiApplication::clipboard();
|
||||
clipboard->setText(text);
|
||||
}
|
||||
|
||||
@ -436,3 +439,5 @@ bool Util::copyPreviewThumbnail(QJsonObject& obj, const QString& previewThumbnai
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "moc_util.cpp"
|
||||
|
@ -51,7 +51,7 @@ void Wizards::createQMLWidget(const QString& title,
|
||||
obj.insert("title", title);
|
||||
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
|
||||
obj.insert("createdBy", createdBy);
|
||||
obj.insert("type", "qmlWidget");
|
||||
obj.insert("type", QVariant::fromValue(InstalledType::InstalledType::QMLWidget).toString());
|
||||
obj.insert("file", "main.qml");
|
||||
|
||||
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
|
||||
@ -117,7 +117,7 @@ void Wizards::createHTMLWidget(const QString& title,
|
||||
obj.insert("createdBy", createdBy);
|
||||
obj.insert("title", title);
|
||||
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
|
||||
obj.insert("type", "htmlWidget");
|
||||
obj.insert("type", QVariant::fromValue(InstalledType::InstalledType::HTMLWidget).toString());
|
||||
obj.insert("file", "index.html");
|
||||
|
||||
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
|
||||
@ -185,7 +185,7 @@ void Wizards::createHTMLWallpaper(
|
||||
obj.insert("createdBy", createdBy);
|
||||
obj.insert("title", title);
|
||||
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
|
||||
obj.insert("type", "htmlWallpaper");
|
||||
obj.insert("type", QVariant::fromValue(InstalledType::InstalledType::HTMLWallpaper).toString());
|
||||
obj.insert("file", "index.html");
|
||||
|
||||
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
|
||||
@ -252,7 +252,7 @@ void Wizards::createQMLWallpaper(
|
||||
obj.insert("title", title);
|
||||
obj.insert("createdBy", createdBy);
|
||||
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
|
||||
obj.insert("type", "qmlWallpaper");
|
||||
obj.insert("type", QVariant::fromValue(InstalledType::InstalledType::QMLWallpaper).toString());
|
||||
obj.insert("file", "main.qml");
|
||||
|
||||
if (!previewThumbnail.isEmpty()) {
|
||||
@ -320,7 +320,7 @@ void Wizards::createGifWallpaper(
|
||||
obj.insert("file", gifFileName);
|
||||
obj.insert("previewGIF", gifFileName);
|
||||
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
|
||||
obj.insert("type", "gifWallpaper");
|
||||
obj.insert("type", QVariant::fromValue(InstalledType::InstalledType::GifWallpaper).toString());
|
||||
|
||||
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
|
||||
qWarning() << "Could not write " << licenseFile;
|
||||
@ -370,7 +370,7 @@ void Wizards::createWebsiteWallpaper(
|
||||
QJsonObject obj;
|
||||
obj.insert("title", title);
|
||||
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
|
||||
obj.insert("type", "websiteWallpaper");
|
||||
obj.insert("type", QVariant::fromValue(InstalledType::InstalledType::WebsiteWallpaper).toString());
|
||||
obj.insert("url", url.toString());
|
||||
|
||||
if (!previewThumbnail.isEmpty()) {
|
||||
@ -409,3 +409,5 @@ const std::optional<QString> Wizards::createTemporaryFolder() const
|
||||
return folderName;
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_wizards.cpp"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "ScreenPlay/app.h"
|
||||
#include "ScreenPlay/create.h"
|
||||
#include <QApplication>
|
||||
|
||||
#include <QCommandLineParser>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
@ -99,5 +99,4 @@ private:
|
||||
|
||||
QString m_appID;
|
||||
QTimer m_pingAliveTimer;
|
||||
QTimer m_firstConnectionTimer;
|
||||
};
|
||||
|
@ -29,14 +29,17 @@ void ScreenPlaySDK::start()
|
||||
global_sdkPtr = this;
|
||||
qInstallMessageHandler(ScreenPlaySDK::redirectMessageOutputToMainWindow);
|
||||
|
||||
m_socket.setServerName("ScreenPlay");
|
||||
connect(&m_socket, &QLocalSocket::connected, this, &ScreenPlaySDK::connected);
|
||||
connect(&m_socket, &QLocalSocket::disconnected, this, &ScreenPlaySDK::disconnected);
|
||||
connect(&m_socket, &QLocalSocket::readyRead, this, &ScreenPlaySDK::readyRead);
|
||||
connect(&m_firstConnectionTimer, &QTimer::timeout, this, &ScreenPlaySDK::disconnected);
|
||||
// When we do not establish a connection in the first 5 seconds we abort.
|
||||
m_firstConnectionTimer.start(5000);
|
||||
m_socket.connectToServer();
|
||||
connect(&m_socket, &QLocalSocket::errorOccurred, this, [this]() {
|
||||
emit disconnected();
|
||||
});
|
||||
|
||||
m_socket.connectToServer("ScreenPlay");
|
||||
if (!m_socket.waitForConnected(1000)) {
|
||||
emit disconnected();
|
||||
}
|
||||
}
|
||||
|
||||
ScreenPlaySDK::~ScreenPlaySDK()
|
||||
@ -53,9 +56,14 @@ void ScreenPlaySDK::sendMessage(const QJsonObject& obj)
|
||||
|
||||
void ScreenPlaySDK::connected()
|
||||
{
|
||||
m_firstConnectionTimer.stop();
|
||||
|
||||
QByteArray welcomeMessage = QString(m_appID + "," + m_type).toUtf8();
|
||||
if (m_appID.isEmpty() || m_type.isEmpty()) {
|
||||
qCritical() << "Unable to connect with empyt: " << m_appID << m_type;
|
||||
emit disconnected();
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray welcomeMessage = QString("appID=" + m_appID + "," + m_type).toUtf8();
|
||||
m_socket.write(welcomeMessage);
|
||||
if (!m_socket.waitForBytesWritten()) {
|
||||
disconnected();
|
||||
|
@ -152,5 +152,4 @@ qt_TexCoord0 = qt_MultiTexCoord0;
|
||||
root.iDate.w = currentDate.getSeconds();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,8 +22,7 @@ Window {
|
||||
property real frequency: 2
|
||||
property real time: 0
|
||||
property real framerate: 60
|
||||
property real updateInterval: Math.round(
|
||||
(1000 / framerate) * 10) / 10
|
||||
property real updateInterval: Math.round((1000 / framerate) * 10) / 10
|
||||
|
||||
Timer {
|
||||
interval: updateInterval
|
||||
@ -32,9 +31,9 @@ Window {
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
if (parent.time > 600) {
|
||||
parent.time = 0
|
||||
parent.time = 0;
|
||||
}
|
||||
parent.time += 1
|
||||
parent.time += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,3 +38,5 @@ ShaderLibrary::ShaderLibrary(QQuickItem* parent)
|
||||
ShaderLibrary::~ShaderLibrary()
|
||||
{
|
||||
}
|
||||
|
||||
#include "moc_shaderlibrary.cpp"
|
||||
|
@ -25,11 +25,11 @@ Window {
|
||||
}
|
||||
|
||||
function stringListToString(list) {
|
||||
let out = ""
|
||||
let out = "";
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
out += "\n" + list[i]
|
||||
out += "\n" + list[i];
|
||||
}
|
||||
return out
|
||||
return out;
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -52,7 +52,6 @@ Window {
|
||||
id: wrapperLeft
|
||||
Layout.preferredWidth: 500
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
Item {
|
||||
@ -67,8 +66,7 @@ Window {
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: root.stringListToString(
|
||||
ipAddress.privateIpV4AddressList)
|
||||
text: root.stringListToString(ipAddress.privateIpV4AddressList)
|
||||
color: root.accentColor
|
||||
font {
|
||||
pointSize: 16
|
||||
@ -76,8 +74,7 @@ Window {
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: root.stringListToString(
|
||||
ipAddress.privateIpV6AddressList)
|
||||
text: root.stringListToString(ipAddress.privateIpV6AddressList)
|
||||
color: root.accentColor
|
||||
font {
|
||||
pointSize: 16
|
||||
@ -236,7 +233,6 @@ Window {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
|
||||
ListView {
|
||||
id: storageListView
|
||||
Layout.fillWidth: true
|
||||
|
@ -58,3 +58,5 @@ void CPU::update()
|
||||
// publish result
|
||||
setUsage(currentUsage);
|
||||
}
|
||||
|
||||
#include "moc_cpu.cpp"
|
||||
|
@ -57,3 +57,5 @@ GPU::GPU(QObject* parent)
|
||||
setMaxFrequency(properties_of_device.max_frequency);
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_gpu.cpp"
|
||||
|
@ -48,3 +48,5 @@ IpAddress::IpAddress(QObject* parent)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_ipaddress.cpp"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user