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

Merge remote-tracking branch 'origin/HEAD'

This commit is contained in:
Elias Steurer 2022-05-12 14:36:18 +02:00
commit 4da09711e6
531 changed files with 23541 additions and 28433 deletions

View File

@ -1,4 +1,6 @@
# -----------------------------
# Options effecting formatting.
# -----------------------------
with section("format"):
# How wide to allow formatted cmake files
@ -6,3 +8,12 @@ with section("format"):
# How many spaces to tab for indent
tab_size = 4
# If true, the argument lists which are known to be sortable will be sorted
# lexicographicall
enable_sort = True
autosort = True
# If a positional argument group contains more than this many arguments, then
# force it to a vertical layout.
max_pargs_hwrap = 3

1
.gitignore vendored
View File

@ -250,3 +250,4 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
/aqtinstall.log
/ThirdParty/**

View File

@ -1,13 +1,13 @@
stages:
- check
- build
- release
- check
- test
variables:
GIT_STRATEGY: clone
QT_VERSION: 6.2.2
PYTHON_VERSION: "3.10.1"
CQTDEPLOYER_URL: "https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.4.10/CQtDeployer_1.5.4.10_Linux_x86_64.deb"
QT_VERSION: 6.3.0
PYTHON_VERSION: 3.10.1
check:
stage: check
@ -31,8 +31,6 @@ build:shared_windows_release:
allow_failure: true
tags:
- shared-windows
needs:
- check
before_script:
# https://stackoverflow.com/a/68671843/12619313
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
@ -52,12 +50,11 @@ build:shared_windows_release:
paths:
- build-x64-windows-release/bin/
build:windows_release:
stage: build
tags:
- windows10
needs:
- check
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
@ -75,8 +72,6 @@ build:windows_release_steam:
stage: build
tags:
- windows10
needs:
- check
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
@ -94,8 +89,6 @@ build:osx_release:
stage: build
tags:
- osx
needs:
- check
script:
- pip3 install -U pip
- pip3 install aqtinstall
@ -113,8 +106,6 @@ build:osx_release_steam:
stage: build
tags:
- osx
needs:
- check
script:
- pip3 install -U pip
- pip3 install aqtinstall
@ -134,29 +125,168 @@ build:linux_release:
name: ubuntu:20.04
tags:
- gitlab-org-docker
needs:
- check
script:
- apt-get update -y
- apt update -y
# We need cmake 3.23 to fix IFW
- apt install gpg wget -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
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt-get install mesa-common-dev curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- apt install mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- mkdir Qt
- aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- aqt install-tool -O ../aqt linux desktop tools_ifw
# - wget -q https://github.com/QuasarApp/CQtDeployer/releases/download/1.5.2/CQtDeployer_1.5.2_OfflineInstaller_Linux64.run
- curl -OL $CQTDEPLOYER_URL
- chmod +x ./CQtDeployer_*.deb
- apt-get install ./CQtDeployer_*.deb -y
- python3 ./Tools/setup.py
- python3 ./Tools/build.py -type release -steam -use-aqt -installer
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -installer
artifacts:
expire_in: "4 weeks"
paths:
- build-x64-linux-release/bin/
release:windows_steam:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -steam
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
release:windows_standalone:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -installer
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
release:osx_steam:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -sign
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
release:osx_standalone:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -installer -use-aqt -sign
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
release:linux_steam:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
script:
- apt update -y
# We need cmake 3.23 to fix IFW
- apt install gpg wget -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
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- aqt install-tool -O ../aqt linux desktop tools_ifw
- curl -OL $CQTDEPLOYER_URL
- chmod +x ./CQtDeployer_*.deb
- apt install ./CQtDeployer_*.deb -y
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
release:linux_standalone:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
script:
- apt update -y
# We need cmake 3.23 to fix IFW
- apt install gpg wget -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
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- aqt install-tool -O ../aqt linux desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -installer -use-aqt
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
test:windows_release:
stage: test
tags:

View File

@ -1,9 +1,10 @@
project(CMake)
set(FILES # cmake-format: sortable
CopyRecursive.cmake
CreateIFWInstaller.cmake
QtUpdateTranslations.cmake)
set(FILES
CopyRecursive.cmake
CreateIFWInstaller.cmake
FetchContentThirdParty.cmake
QtUpdateTranslations.cmake)
add_custom_target(
${PROJECT_NAME}

View File

@ -2,12 +2,21 @@
if("${CPACK_IFW_ROOT}" STREQUAL "")
# Hardcoded Qt paths that are used by the QtMaintanance tool for now...
if(WIN32)
set(SCREENPLAY_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/4.2")
if(${GITLAB_CI})
set(SCREENPLAY_IFW_ROOT "${CMAKE_SOURCE_DIR}/../aqt/Tools/QtInstallerFramework/${SCREENPLAY_IFW_VERSION}")
else()
set(SCREENPLAY_IFW_ROOT "C:/Qt/Tools/QtInstallerFramework/${SCREENPLAY_IFW_VERSION}")
endif()
elseif(UNIX)
set(SCREENPLAY_IFW_ROOT "$ENV{HOME}/Qt/Tools/QtInstallerFramework/4.2")
if(${GITLAB_CI})
set(SCREENPLAY_IFW_ROOT "${CMAKE_SOURCE_DIR}/../aqt/Tools/QtInstallerFramework/${SCREENPLAY_IFW_VERSION}")
else()
set(SCREENPLAY_IFW_ROOT "$ENV{HOME}/Qt/Tools/QtInstallerFramework/${SCREENPLAY_IFW_VERSION}")
endif()
endif()
message(STATUS "[CPACK_IFW_ROOT] Not set. Using hardcoded value: ${SCREENPLAY_IFW_ROOT}")
message(STATUS "WARNING: MAKE SURE YOU HAVE THIS EXACT VERSION INSTALLED VIA THE QTMAINTANANCE TOOL!")
message(AUTHOR_WARNING "[CPACK_IFW_ROOT] Not set. Using hardcoded value: ${SCREENPLAY_IFW_ROOT}")
message(AUTHOR_WARNING "WARNING: MAKE SURE YOU HAVE THIS EXACT VERSION INSTALLED VIA THE QTMAINTANANCE TOOL!")
else()
message(STATUS "[CPACK_IFW_ROOT] = ${SCREENPLAY_IFW_ROOT}")
endif()

View File

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.16.0)
include(FetchContent)
set(THIRD_PARTY_PATH "${CMAKE_SOURCE_DIR}/ThirdParty/")
FetchContent_Populate(
QArchive
GIT_REPOSITORY https://github.com/antony-jr/QArchive.git
GIT_TAG 2d05e652ad9a2bff8c87962d5525e2b3c4d7351b
# Workaround because:
# 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
# https://bugreports.qt.io/browse/QTCREATORBUG-27083
SOURCE_DIR ${THIRD_PARTY_PATH}/QArchive
)
FetchContent_Populate(
qml-plausible
GIT_REPOSITORY https://gitlab.com/kelteseth/qml-plausible.git
GIT_TAG 00398446c7a2882a11d34c007a1ed8205c72e123
# Workaround because:
# 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder
# https://bugreports.qt.io/browse/QTCREATORBUG-27083
SOURCE_DIR ${THIRD_PARTY_PATH}/qml-plausible
)

View File

@ -7,24 +7,6 @@ project(
HOMEPAGE_URL "https://screen-play.app/"
LANGUAGES CXX)
# This sets cmake to compile all dlls into the main directory
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(SCREENPLAY_IFW_ROOT "")
option(SCREENPLAY_STEAM "For FOSS distribution so we do not bundle proprietary code." ON)
option(SCREENPLAY_TESTS "Enables UI tests." OFF)
option(SCREENPLAY_CREATE_INSTALLER "Indicates whether an installer via the Qt Installer Framework is created." OFF)
# Add our *.cmake diretory to the CMAKE_MODULE_PATH, so that our includes are found
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
file(MAKE_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_CXX_STANDARD 20)
if(WIN32)
set(VCPKG_ARCH "x64-windows")
elseif(UNIX AND NOT APPLE)
@ -33,13 +15,50 @@ elseif(APPLE)
set(VCPKG_ARCH "x64-osx")
endif()
if(${SCREENPLAY_TESTS})
enable_testing()
endif()
# This sets cmake to compile all dlls into the main directory
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
# This is needed for OSX:
# Because we bundle ScreenPlay and ScreenPlayWallpaper into .app
# they both need other QML dependencies like ScreenPlayUtil.
# The fastest way is to use a shared QML module path for development
# and add this path to the qml engines import pah.
# For the SCREENPLAY_RELEASE we copy them into the matching dirs
# via the build.py
#
# This subdirectoy is needed for OSX and Linux to fix linker errors because
# we would have ScreenPlayApp executable and folder for the qml files in the
# same directory.
set(SCREENPLAY_QML_MODULES_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qml")
# Adds the qml import path so QtCreator can find them
list(APPEND QML_DIRS "${SCREENPLAY_QML_MODULES_PATH}")
set(QML_IMPORT_PATH "${QML_DIRS}" CACHE STRING "Qt Creator extra qml import paths")
set(SCREENPLAY_IFW_ROOT "")
set(SCREENPLAY_IFW_VERSION "4.3")
set(VCPKG_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../ScreenPlay-vcpkg")
set(VCPKG_INSTALLED_PATH "${VCPKG_PATH}/installed/${VCPKG_ARCH}")
option(SCREENPLAY_STEAM "For FOSS distribution so we do not bundle proprietary code." ON)
option(SCREENPLAY_RELEASE "Marks this version as an official release version. This version uses different import paths and other settings." OFF)
option(SCREENPLAY_TESTS "Enables UI tests." ON)
option(SCREENPLAY_INSTALLER "Indicates whether an installer via the Qt Installer Framework is created." OFF)
# Gitlab CI has many ENV variables. We use this one to check if the current build happens inside the CI
if(DEFINED ENV{CI_COMMIT_MESSAGE})
set(GITLAB_CI true)
endif()
file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_compile_definitions(COMPILE_INFO="Build Date: ${BUILD_DATE}. Git Hash: ${GIT_COMMIT_HASH}. ")
add_compile_definitions(SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
add_compile_definitions(RELEASE_VERSION="${SCREENPLAY_RELEASE}")
find_package(Git REQUIRED)
if(WIN32)
set(date_command "CMD")
@ -64,56 +83,66 @@ execute_process(
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
add_compile_definitions(COMPILE_INFO="Build Date: ${BUILD_DATE}. Git Hash: ${GIT_COMMIT_HASH}. ")
add_compile_definitions(SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
add_compile_definitions(SCREENPLAY_STEAM="${SCREENPLAY_STEAM}")
# Universal builds
if(APPLE)
#set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
#set(VCPKG_TARGET_ARCHITECTURE x86_64 arm64)
message(STATUS "[PROJECT] CMAKE_OSX_ARCHITECTURES = ${CMAKE_OSX_ARCHITECTURES}")
endif()
if(UNIX AND NOT APPLE)
# Fixes QWebEngine linker errors on Ubuntu 20.04
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/FetchContentThirdParty.cmake)
add_subdirectory(CMake)
add_subdirectory(ScreenPlay)
add_subdirectory(ScreenPlaySDK)
add_subdirectory(ScreenPlayShader)
add_subdirectory(ScreenPlayWallpaper)
add_subdirectory(ScreenPlayWidget)
add_subdirectory(ScreenPlayUtil)
add_subdirectory(CMake)
add_subdirectory(ScreenPlayWeather)
add_subdirectory(ThirdParty/QArchive)
add_subdirectory(Tools)
if(${SCREENPLAY_TESTS})
enable_testing()
endif()
# Only add target SteamSDKQtEnums
add_subdirectory(ScreenPlayWorkshop/SteamSDK)
if(${SCREENPLAY_STEAM})
add_subdirectory(ScreenPlayWorkshop)
else()
# Only add target SteamSDKQtEnums
add_subdirectory(ScreenPlayWorkshop/SteamSDK)
endif()
if(WIN32)
add_subdirectory(ScreenPlaySysInfo)
endif()
message(STATUS "[DEFINE] SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "[DEFINE] BUILD_DATE = ${BUILD_DATE}")
message(STATUS "[DEFINE] BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message(STATUS "[DEFINE] GIT_COMMIT_HASH = ${GIT_COMMIT_HASH}")
message(STATUS "[OPTION] SCREENPLAY_CREATE_INSTALLER = ${SCREENPLAY_CREATE_INSTALLER}")
message(STATUS "[OPTION] SCREENPLAY_STEAM = ${SCREENPLAY_STEAM}")
message(STATUS "[OPTION] SCREENPLAY_TESTS = ${SCREENPLAY_TESTS}")
message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")
message(STATUS "[PROJECT] VCPKG_PATH = ${VCPKG_PATH}")
message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
if(${SCREENPLAY_CREATE_INSTALLER})
if(${SCREENPLAY_INSTALLER})
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CreateIFWInstaller.cmake)
endif()
# Universal builds are not available with vcpkg
# https://github.com/microsoft/vcpkg/discussions/19454
if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(VCPKG_TARGET_ARCHITECTURE x86_64 arm64)
message(STATUS "[PROJECT] CMAKE_OSX_ARCHITECTURES = ${CMAKE_OSX_ARCHITECTURES}")
endif()
message(STATUS "[CPP DEFINE] RELEASE_VERSION = ${RELEASE_VERSION}")
message(STATUS "[CPP DEFINE] SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "[CPP DEFINE] BUILD_DATE = ${BUILD_DATE}")
message(STATUS "[DEFINE] BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message(STATUS "[DEFINE] GIT_COMMIT_HASH = ${GIT_COMMIT_HASH}")
message(STATUS "[OPTION] SCREENPLAY_RELEASE = ${SCREENPLAY_RELEASE}")
message(STATUS "[OPTION] SCREENPLAY_INSTALLER = ${SCREENPLAY_INSTALLER}")
message(STATUS "[OPTION] SCREENPLAY_STEAM = ${SCREENPLAY_STEAM}")
message(STATUS "[OPTION] SCREENPLAY_TESTS = ${SCREENPLAY_TESTS}")
message(STATUS "[PROJECT] SCREENPLAY_QML_MODULES_PATH = ${SCREENPLAY_QML_MODULES_PATH}")
message(STATUS "[PROJECT] SCREENPLAY_IFW_VERSION = ${SCREENPLAY_IFW_VERSION}")
message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")
message(STATUS "[PROJECT] VCPKG_PATH = ${VCPKG_PATH}")
message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}")
message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
message(STATUS "[PROJECT] CMAKE_VERSION = ${CMAKE_VERSION}")

10
Common/CMakeLists.txt Normal file
View File

@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.16.0)
include(FetchContent)
FetchContent_Declare(
qml-plausible
GIT_REPOSITORY https://gitlab.com/kelteseth/qml-plausible.git
GIT_TAG 00398446c7a2882a11d34c007a1ed8205c72e123)
FetchContent_MakeAvailable(qml-plausible)

668
LICENSE
View File

@ -1 +1,667 @@
See Legal/ScreenPlay License.md
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
1. 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/>.
ScreenPlay is licensed under a dual license in order to ensure its sustainability.
When you contribute to ScreenPlay you accept that your work will be available under AGPL and commercial.
This code is owned by Elias Steurer. By changing/adding to the code you agree to the terms written in:
* Legal/corporate_contributor_license_agreement.md - For corporate contributors
* Legal/individual_contributor_license_agreement.md - For individual contributors

View File

@ -5,58 +5,87 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
set(SOURCES
# cmake-format: sortable
app.cpp
src/globalvariables.cpp
src/app.cpp
src/create.cpp
src/createimportvideo.cpp
src/globalvariables.cpp
src/installedlistfilter.cpp
src/installedlistmodel.cpp
src/monitorlistmodel.cpp
src/screenplaywallpaper.cpp
src/screenplaywidget.cpp
src/settings.cpp
src/profilelistmodel.cpp
src/installedlistfilter.cpp
src/projectsettingslistmodel.cpp
src/screenplaymanager.cpp
src/screenplaywallpaper.cpp
src/screenplaywidget.cpp
src/sdkconnection.cpp
src/settings.cpp
src/util.cpp
src/create.cpp
src/wizards.cpp)
set(HEADER
# cmake-format: sortable
app.h
src/globalvariables.h
src/createimportvideo.h
src/createimportstates.h
src/installedlistmodel.h
src/monitorlistmodel.h
src/screenplaywallpaper.h
src/screenplaywidget.h
src/settings.h
src/profilelistmodel.h
src/profile.h
src/installedlistfilter.h
src/projectsettingslistmodel.h
src/screenplaymanager.h
src/sdkconnection.h
src/util.h
src/create.h
src/wizards.h)
inc/public/ScreenPlay/app.h
inc/public/ScreenPlay/create.h
inc/public/ScreenPlay/createimportstates.h
inc/public/ScreenPlay/createimportvideo.h
inc/public/ScreenPlay/globalvariables.h
inc/public/ScreenPlay/installedlistfilter.h
inc/public/ScreenPlay/installedlistmodel.h
inc/public/ScreenPlay/monitorlistmodel.h
inc/public/ScreenPlay/profile.h
inc/public/ScreenPlay/profilelistmodel.h
inc/public/ScreenPlay/projectsettingslistmodel.h
inc/public/ScreenPlay/screenplaymanager.h
inc/public/ScreenPlay/screenplaywallpaper.h
inc/public/ScreenPlay/screenplaywidget.h
inc/public/ScreenPlay/sdkconnection.h
inc/public/ScreenPlay/settings.h
inc/public/ScreenPlay/util.h
inc/public/ScreenPlay/wizards.h)
set(QML
# cmake-format: sortable
main.qml
qml/Create/Create.qml
qml/Community/Community.qml
qml/Community/CommunityNavItem.qml
qml/Community/XMLNewsfeed.qml
qml/Create/Wizard.qml
qml/Create/Create.qml
qml/Create/CreateSidebar.qml
qml/Create/StartInfo.qml
qml/Create/StartInfoLinkImage.qml
qml/Create/Wizards/GifWallpaper.qml
qml/Create/Wizards/HTMLWallpaper.qml
qml/Create/Wizards/HTMLWidget.qml
qml/Create/Wizards/Importh264/Importh264.qml
qml/Create/Wizards/Importh264/Importh264Convert.qml
qml/Create/Wizards/Importh264/Importh264Init.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperInit.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperResult.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperVideoImportConvert.qml
qml/Create/Wizards/ImportWebm/ImportWebm.qml
qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml
qml/Create/Wizards/ImportWebm/ImportWebmInit.qml
qml/Create/Wizards/QMLWallpaper.qml
qml/Create/Wizards/QMLWidget.qml
qml/Create/Wizards/WebsiteWallpaper.qml
qml/Create/Wizards/WizardPage.qml
qml/Create/WizardsFiles/QMLWallpaperMain.qml
qml/Create/WizardsFiles/QMLWidgetMain.qml
qml/Installed/Installed.qml
qml/Installed/InstalledWelcomeScreen.qml
qml/Installed/InstalledNavigation.qml
qml/Installed/ScreenPlayItem.qml
qml/Installed/ScreenPlayItemImage.qml
qml/Installed/Sidebar.qml
qml/Installed/InstalledWelcomeScreen.qml
qml/Community/Community.qml
qml/Community/XMLNewsfeed.qml
qml/Monitors/DefaultVideoControls.qml
qml/Monitors/Monitors.qml
qml/Monitors/MonitorSelection.qml
qml/Monitors/MonitorSelectionItem.qml
qml/Monitors/MonitorsProjectSettingItem.qml
qml/Monitors/SaveNotification.qml
qml/Navigation/Navigation.qml
qml/Navigation/WindowNavButton.qml
qml/Navigation/WindowNavigation.qml
qml/Settings/SettingBool.qml
qml/Settings/Settings.qml
qml/Settings/SettingsButton.qml
@ -64,107 +93,168 @@ set(QML
qml/Settings/SettingsExpander.qml
qml/Settings/SettingsHeader.qml
qml/Settings/SettingsHorizontalSeperator.qml
qml/Workshop/Workshop.qml
qml/Monitors/Monitors.qml
qml/Monitors/MonitorSelection.qml
qml/Monitors/MonitorSelectionItem.qml
qml/Monitors/MonitorsProjectSettingItem.qml
qml/Navigation/Navigation.qml
qml/Navigation/NavigationItem.qml
qml/Navigation/WindowNavButton.qml
qml/Navigation/WindowNavigation.qml
qml/Monitors/DefaultVideoControls.qml
qml/Common/TagSelector.qml
qml/Common/Tag.qml
qml/Common/Popup.qml
qml/Common/Dialog.qml
qml/Common/ImageSelector.qml
qml/Common/Slider.qml
qml/Common/RippleEffect.qml
qml/Common/Shake.qml
qml/Common/Grow.qml
qml/Common/GrowIconLink.qml
qml/Common/CloseIcon.qml
qml/Common/Headline.qml
qml/Settings/SettingsPage.qml
qml/Community/CommunityNavItem.qml
qml/Workshop/ScreenPlayItem.qml
qml/Workshop/ScreenPlayItemImage.qml
qml/Workshop/Background.qml
qml/Workshop/WorkshopInstalled.qml
qml/Workshop/WorkshopItem.qml
qml/Workshop/Sidebar.qml
qml/Workshop/Navigation.qml
qml/Workshop/PopupOffline.qml
qml/Workshop/upload/PopupSteamWorkshopAgreement.qml
qml/Workshop/upload/UploadProject.qml
qml/Workshop/upload/UploadProjectBigItem.qml
qml/Workshop/upload/UploadProjectItem.qml
qml/Monitors/SaveNotification.qml
qml/Common/TrayIcon.qml
qml/Installed/Navigation.qml
qml/Common/Search.qml
qml/Common/MouseHoverBlocker.qml
qml/Create/Wizards/HTMLWallpaper.qml
qml/Create/Wizards/HTMLWidget.qml
qml/Create/Wizards/QMLWidget.qml
qml/Create/Wizards/QMLWallpaper.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperInit.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperResult.qml
qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaperVideoImportConvert.qml
qml/Create/Sidebar.qml
qml/Create/Wizards/ImportWebm/ImportWebm.qml
qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml
qml/Create/Wizards/ImportWebm/ImportWebmInit.qml
qml/Common/Dialogs/MonitorConfiguration.qml
qml/Common/Dialogs/SteamNotAvailable.qml
qml/Create/Wizards/WizardPage.qml
qml/Create/Wizards/GifWallpaper.qml
qml/Common/TextField.qml
qml/Common/HeadlineSection.qml
qml/Create/Wizards/WebsiteWallpaper.qml
qml/Common/FileSelector.qml
qml/Create/WizardsFiles/QMLWidgetMain.qml
qml/Create/WizardsFiles/QMLWallpaperMain.qml
qml/Common/LicenseSelector.qml
qml/Common/ModalBackgroundBlur.qml
qml/Common/Util.js
qml/Common/Dialogs/CriticalError.qml
qml/Common/ColorPicker.qml
qml/Create/StartInfoLinkImage.qml
qml/Workshop/SteamProfile.qml
qml/Workshop/SteamWorkshop.qml
qml/Workshop/Forum.qml
qml/Workshop/SteamWorkshopStartPage.qml
qml/Create/Wizards/Importh264/Importh264.qml
qml/Create/Wizards/Importh264/Importh264Convert.qml
qml/Create/Wizards/Importh264/Importh264Init.qml)
qml/Workshop/Workshop.qml)
set(TS_FILES
# cmake-format: sortable
translations/ScreenPlay_.ts
translations/ScreenPlay_tr_TR.ts
translations/ScreenPlay_it_IT.ts
translations/ScreenPlay_nl_NL.ts
translations/ScreenPlay_de_DE.ts
translations/ScreenPlay_pl_PL.ts
translations/ScreenPlay_zh_CN.ts
translations/ScreenPlay_pt_BR.ts
translations/ScreenPlay_es_ES.ts
translations/ScreenPlay_fr_FR.ts
translations/ScreenPlay_it_IT.ts
translations/ScreenPlay_ko_KR.ts
translations/ScreenPlay_nl_NL.ts
translations/ScreenPlay_pl_PL.ts
translations/ScreenPlay_pt_BR.ts
translations/ScreenPlay_ru_RU.ts
translations/ScreenPlay_vi_VN.ts)
translations/ScreenPlay_tr_TR.ts
translations/ScreenPlay_vi_VN.ts
translations/ScreenPlay_zh_CN.ts)
set(RESOURCES
assets/WorkshopPreview.html
assets/icons/app.ico
assets/icons/brand_github.svg
assets/icons/brand_gitlab.svg
assets/icons/brand_twitch.svg
assets/icons/brand_twitter.svg
assets/icons/exclamation-triangle-solid.svg
assets/icons/font-awsome/close.svg
assets/icons/font-awsome/frown-o.svg
assets/icons/icon_arrow_left.svg
assets/icons/icon_arrow_right.svg
assets/icons/icon_build.svg
assets/icons/icon_cake.afdesign
assets/icons/icon_cake.svg
assets/icons/icon_close.svg
assets/icons/icon_code.svg
assets/icons/icon_community.svg
assets/icons/icon_delete.svg
assets/icons/icon_document.svg
assets/icons/icon_done.svg
assets/icons/icon_download.svg
assets/icons/icon_emptyWidget.svg
assets/icons/icon_folder_open.svg
assets/icons/icon_forum.svg
assets/icons/icon_hand_left.svg
assets/icons/icon_hand_right.svg
assets/icons/icon_heavy_metal.svg
assets/icons/icon_help_center.svg
assets/icons/icon_indicator_down.svg
assets/icons/icon_info.svg
assets/icons/icon_installed.svg
assets/icons/icon_launch.svg
assets/icons/icon_library_music.svg
assets/icons/icon_local_movies.svg
assets/icons/icon_logo_head.svg
assets/icons/icon_monitor.svg
assets/icons/icon_movie.svg
assets/icons/icon_multiple_images.svg
assets/icons/icon_new_releases.svg
assets/icons/icon_open_in_new.svg
assets/icons/icon_pause.svg
assets/icons/icon_people.svg
assets/icons/icon_play.svg
assets/icons/icon_plus.svg
assets/icons/icon_report_problem.svg
assets/icons/icon_scene.svg
assets/icons/icon_screen.svg
assets/icons/icon_search.svg
assets/icons/icon_settings.svg
assets/icons/icon_share.svg
assets/icons/icon_single_image.svg
assets/icons/icon_steam.svg
assets/icons/icon_supervisor_account.svg
assets/icons/icon_thumb_down.svg
assets/icons/icon_thumb_up.svg
assets/icons/icon_time.svg
assets/icons/icon_tv.svg
assets/icons/icon_upload.svg
assets/icons/icon_volume.svg
assets/icons/icon_volume_mute.svg
assets/icons/icon_volume_up.svg
assets/icons/icon_widgets.svg
assets/icons/icon_window.svg
assets/icons/monitor_setup.svg
assets/images/Intro.png
assets/images/Intro_PC.png
assets/images/Intro_shine.png
assets/images/Window.svg
assets/images/mask_round.svg
assets/images/mask_workshop.png
assets/images/missingPreview.png
assets/images/noisy-texture-3.png
assets/images/noisy-texture.png
assets/licenses/Apache2.txt
assets/licenses/OFL.txt
assets/particle/backgroundGlow.png
assets/particle/dot.png
assets/shader/movingcolorramp.fsh
assets/startinfo/blender.png
assets/startinfo/flaticon.png
assets/startinfo/forums.png
assets/startinfo/freesound.png
assets/startinfo/gimp.png
assets/startinfo/git_extentions.png
assets/startinfo/gitlab.png
assets/startinfo/godot.png
assets/startinfo/handbreak.png
assets/startinfo/inkscape.png
assets/startinfo/kdeenlive.png
assets/startinfo/krita.png
assets/startinfo/obs.png
assets/startinfo/qml_online.png
assets/startinfo/reddit.png
assets/startinfo/shadertoy.png
assets/startinfo/sharex.png
assets/startinfo/unsplash.png
assets/startinfo/vscode.png
assets/wizards/License_All_Rights_Reserved_1.0.txt
assets/wizards/License_Apache_2.0.txt
assets/wizards/License_CC0_1.0.txt
assets/wizards/License_CC_Attribution-NonCommercial-ShareAlike_4.0.txt
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/example_html.png
assets/wizards/example_qml.png
legal/DataProtection.txt
"legal/Font Awesome Free License.txt"
legal/OFL.txt
legal/OpenSSL.txt
"legal/Qt LGPLv3.txt"
legal/gpl-3.0.txt
legal/lgpl-2.1.txt
profiles.json
qtquickcontrols2.conf
assets/images/Early_Access.png
assets/icons/icon_sort-up-solid.svg
assets/icons/icon_sort-down-solid.svg
assets/icons/brand_reddit.svg
assets/icons/steam_default_avatar.png
assets/macos/app.screenplay.plist
assets/icons/item_banner_new.svg
qml/Create/WizardsFiles/HTMLWallpaperMain.html
qml/Create/WizardsFiles/HTMLWidgetMain.html
assets/icons/icon_minimize.svg
assets/icons/icon_video_settings_black_24dp.svg
qml/Create/WizardsFiles/QMLWallpaperMain.qml
qml/Create/WizardsFiles/QMLWidgetMain.qml
assets/icons/font-awsome/patreon-brands.svg
assets/images/steam_offline.png
assets/images/scale_window_indicator.png
)
# Needed on macos
find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(doctest CONFIG REQUIRED)
# CURL must be included before sentry because sentry needs the module and does not include it itself on macos...
find_package(CURL CONFIG REQUIRED)
find_package(sentry CONFIG REQUIRED)
# Make sentry win only for now because it is constantly buggy on osx
if(WIN32)
# CURL must be included before sentry because sentry needs the module and does not include it itself on macos...
find_package(CURL CONFIG REQUIRED)
find_package(sentry CONFIG REQUIRED)
endif()
find_package(
Qt6
@ -177,18 +267,29 @@ find_package(
LinguistTools
Test)
qt_add_resources(RESOURCES Resources.qrc)
qt_add_big_resources(FONTS fonts.qrc)
add_library(ScreenPlayLib ${SOURCES} ${HEADER} ${RESOURCES} ${FONTS})
add_library(ScreenPlayApp STATIC)
target_include_directories(ScreenPlayApp PUBLIC src/ inc/public/ScreenPlay)
qt_add_qml_module(
ScreenPlayApp
URI
ScreenPlayApp
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}App
RESOURCE_PREFIX /qml
VERSION
1.0
QML_FILES
${QML}
SOURCES
${SOURCES}
${HEADER}
RESOURCES
${RESOURCES}
)
target_link_libraries(
ScreenPlayLib
ScreenPlayApp
PUBLIC ScreenPlaySDK
ScreenPlayUtil
doctest::doctest
sentry::sentry
Threads::Threads
Qt6::Quick
Qt6::Gui
@ -196,46 +297,63 @@ target_link_libraries(
Qt6::Core
Qt6::WebSockets
Qt6::Svg
ScreenPlayQmlplugin
ScreenPlayUtil
ScreenPlayUtilplugin
QArchive
SteamSDKQtEnums)
if(${TESTS_ENABLED})
add_executable(tst_ScreenPlay tests/tst_main.cpp)
target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayLib Qt6::Test)
if(${SCREENPLAY_STEAM})
target_compile_definitions(ScreenPlayApp PRIVATE SCREENPLAY_STEAM=1)
target_link_libraries(ScreenPlayApp PUBLIC ScreenPlayWorkshopplugin ScreenPlayWorkshop)
endif()
qt_add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlayLib)
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlayApp ScreenPlayAppplugin)
set_source_files_properties(${TS_FILES}
PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations")
if(${SCREENPLAY_TESTS})
add_executable(tst_ScreenPlay tests/tst_main.cpp)
target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayApp ScreenPlayAppplugin Qt6::Test)
if(${SCREENPLAY_STEAM})
target_compile_definitions(tst_ScreenPlay PRIVATE SCREENPLAY_STEAM=1)
target_link_libraries(tst_ScreenPlay PUBLIC ScreenPlayWorkshopplugin ScreenPlayWorkshop)
endif()
endif()
if(APPLE)
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.app/Contents/Resources/translations")
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)
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}
)
qt_add_lrelease(${PROJECT_NAME} TS_FILES ${TS_FILES})
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
qt_add_library(ScreenPlayQml STATIC)
qt_add_qml_module(
ScreenPlayQml
URI
ScreenPlayQml
VERSION
1.0
QML_FILES
${QML})
target_include_directories(
ScreenPlayApp
PUBLIC inc/public/
PRIVATE src/)
if(WIN32 OR UNIX AND NOT APPLE)
include(CopyRecursive)
set(FONTS_OUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets/fonts)
file(MAKE_DIRECTORY ${FONTS_OUT_DIR})
copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts ${FONTS_OUT_DIR} "*.ttf")
copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts ${FONTS_OUT_DIR} "*.otf")
endif()
if(WIN32)
target_link_libraries(ScreenPlayApp PUBLIC sentry::sentry)
# Icon
target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc)
@ -252,7 +370,8 @@ if(WIN32)
configure_file(${filename} ${CMAKE_BINARY_DIR}/bin/ COPYONLY)
endforeach()
configure_file(${VCPKG_INSTALLED_PATH}/tools/sentry-native/crashpad_handler.exe ${CMAKE_BINARY_DIR}/bin/ COPYONLY)
configure_file(${VCPKG_INSTALLED_PATH}/tools/sentry-native/crashpad_handler.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COPYONLY)
configure_file(${VCPKG_INSTALLED_PATH}/tools/sentry-native/zlib1.dll ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ COPYONLY)
endif()
@ -286,7 +405,7 @@ if(APPLE)
${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/)
# tst_ScreenPlay needs ffmpeg in the base path
if(${TESTS_ENABLED})
if(${SCREENPLAY_TESTS})
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
@ -298,10 +417,12 @@ if(APPLE)
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../Common/ffmpeg/ffprobe ${CMAKE_BINARY_DIR}/bin/)
endif()
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VCPKG_INSTALLED_PATH}/tools/sentry-native/crashpad_handler
${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/)
# fonts
include(CopyRecursive)
set(FONTS_OUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/Resources/fonts/)
file(MAKE_DIRECTORY ${FONTS_OUT_DIR})
copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts ${FONTS_OUT_DIR} "*.ttf")
copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/assets/fonts ${FONTS_OUT_DIR} "*.otf")
endif()

View File

@ -1,134 +0,0 @@
<RCC>
<qresource prefix="/">
<file>assets/WorkshopPreview.html</file>
<file>assets/icons/app.ico</file>
<file>assets/icons/brand_github.svg</file>
<file>assets/icons/brand_gitlab.svg</file>
<file>assets/icons/brand_twitch.svg</file>
<file>assets/icons/brand_twitter.svg</file>
<file>assets/icons/exclamation-triangle-solid.svg</file>
<file>assets/icons/font-awsome/close.svg</file>
<file>assets/icons/font-awsome/frown-o.svg</file>
<file>assets/icons/icon_arrow_left.svg</file>
<file>assets/icons/icon_arrow_right.svg</file>
<file>assets/icons/icon_build.svg</file>
<file>assets/icons/icon_cake.afdesign</file>
<file>assets/icons/icon_cake.svg</file>
<file>assets/icons/icon_close.svg</file>
<file>assets/icons/icon_code.svg</file>
<file>assets/icons/icon_community.svg</file>
<file>assets/icons/icon_delete.svg</file>
<file>assets/icons/icon_document.svg</file>
<file>assets/icons/icon_done.svg</file>
<file>assets/icons/icon_download.svg</file>
<file>assets/icons/icon_emptyWidget.svg</file>
<file>assets/icons/icon_folder_open.svg</file>
<file>assets/icons/icon_forum.svg</file>
<file>assets/icons/icon_hand_left.svg</file>
<file>assets/icons/icon_hand_right.svg</file>
<file>assets/icons/icon_heavy_metal.svg</file>
<file>assets/icons/icon_help_center.svg</file>
<file>assets/icons/icon_indicator_down.svg</file>
<file>assets/icons/icon_info.svg</file>
<file>assets/icons/icon_installed.svg</file>
<file>assets/icons/icon_launch.svg</file>
<file>assets/icons/icon_library_music.svg</file>
<file>assets/icons/icon_local_movies.svg</file>
<file>assets/icons/icon_logo_head.svg</file>
<file>assets/icons/icon_monitor.svg</file>
<file>assets/icons/icon_movie.svg</file>
<file>assets/icons/icon_multiple_images.svg</file>
<file>assets/icons/icon_new_releases.svg</file>
<file>assets/icons/icon_open_in_new.svg</file>
<file>assets/icons/icon_pause.svg</file>
<file>assets/icons/icon_people.svg</file>
<file>assets/icons/icon_play.svg</file>
<file>assets/icons/icon_plus.svg</file>
<file>assets/icons/icon_report_problem.svg</file>
<file>assets/icons/icon_scene.svg</file>
<file>assets/icons/icon_screen.svg</file>
<file>assets/icons/icon_search.svg</file>
<file>assets/icons/icon_settings.svg</file>
<file>assets/icons/icon_share.svg</file>
<file>assets/icons/icon_single_image.svg</file>
<file>assets/icons/icon_steam.svg</file>
<file>assets/icons/icon_supervisor_account.svg</file>
<file>assets/icons/icon_thumb_down.svg</file>
<file>assets/icons/icon_thumb_up.svg</file>
<file>assets/icons/icon_time.svg</file>
<file>assets/icons/icon_tv.svg</file>
<file>assets/icons/icon_upload.svg</file>
<file>assets/icons/icon_volume.svg</file>
<file>assets/icons/icon_volume_mute.svg</file>
<file>assets/icons/icon_volume_up.svg</file>
<file>assets/icons/icon_widgets.svg</file>
<file>assets/icons/icon_window.svg</file>
<file>assets/icons/monitor_setup.svg</file>
<file>assets/images/Intro.png</file>
<file>assets/images/Intro_PC.png</file>
<file>assets/images/Intro_shine.png</file>
<file>assets/images/Window.svg</file>
<file>assets/images/mask_round.svg</file>
<file>assets/images/mask_workshop.png</file>
<file>assets/images/missingPreview.png</file>
<file>assets/images/noisy-texture-3.png</file>
<file>assets/images/noisy-texture.png</file>
<file>assets/licenses/Apache2.txt</file>
<file>assets/licenses/OFL.txt</file>
<file>assets/particle/backgroundGlow.png</file>
<file>assets/particle/dot.png</file>
<file>assets/shader/movingcolorramp.fsh</file>
<file>assets/startinfo/blender.png</file>
<file>assets/startinfo/flaticon.png</file>
<file>assets/startinfo/forums.png</file>
<file>assets/startinfo/freesound.png</file>
<file>assets/startinfo/gimp.png</file>
<file>assets/startinfo/git_extentions.png</file>
<file>assets/startinfo/gitlab.png</file>
<file>assets/startinfo/godot.png</file>
<file>assets/startinfo/handbreak.png</file>
<file>assets/startinfo/inkscape.png</file>
<file>assets/startinfo/kdeenlive.png</file>
<file>assets/startinfo/krita.png</file>
<file>assets/startinfo/obs.png</file>
<file>assets/startinfo/qml_online.png</file>
<file>assets/startinfo/reddit.png</file>
<file>assets/startinfo/shadertoy.png</file>
<file>assets/startinfo/sharex.png</file>
<file>assets/startinfo/unsplash.png</file>
<file>assets/startinfo/vscode.png</file>
<file>assets/wizards/License_All_Rights_Reserved_1.0.txt</file>
<file>assets/wizards/License_Apache_2.0.txt</file>
<file>assets/wizards/License_CC0_1.0.txt</file>
<file>assets/wizards/License_CC_Attribution-NonCommercial-ShareAlike_4.0.txt</file>
<file>assets/wizards/License_CC_Attribution-ShareAlike_4.0.txt</file>
<file>assets/wizards/License_CC_Attribution_4.0.txt</file>
<file>assets/wizards/License_GPL_3.0.txt</file>
<file>assets/wizards/example_html.png</file>
<file>assets/wizards/example_qml.png</file>
<file>legal/DataProtection.txt</file>
<file>legal/Font Awesome Free License.txt</file>
<file>legal/OFL.txt</file>
<file>legal/OpenSSL.txt</file>
<file>legal/Qt LGPLv3.txt</file>
<file>legal/gpl-3.0.txt</file>
<file>legal/lgpl-2.1.txt</file>
<file>profiles.json</file>
<file>qtquickcontrols2.conf</file>
<file>assets/images/Early_Access.png</file>
<file>assets/icons/icon_sort-up-solid.svg</file>
<file>assets/icons/icon_sort-down-solid.svg</file>
<file>assets/icons/brand_reddit.svg</file>
<file>assets/icons/steam_default_avatar.png</file>
<file>assets/macos/app.screenplay.plist</file>
<file>assets/icons/item_banner_new.svg</file>
<file>qml/Create/WizardsFiles/HTMLWallpaperMain.html</file>
<file>qml/Create/WizardsFiles/HTMLWidgetMain.html</file>
<file>assets/icons/icon_minimize.svg</file>
<file>assets/icons/icon_video_settings_black_24dp.svg</file>
<file>qml/Create/WizardsFiles/QMLWallpaperMain.qml</file>
<file>qml/Create/WizardsFiles/QMLWidgetMain.qml</file>
<file>assets/icons/font-awsome/patreon-brands.svg</file>
<file>assets/images/steam_offline.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,15 +0,0 @@
<RCC>
<qresource prefix="/">
<file>assets/fonts/LibreBaskerville-Italic.ttf</file>
<file>assets/fonts/NotoSans-Light.ttf</file>
<file>assets/fonts/NotoSans-Medium.ttf</file>
<file>assets/fonts/NotoSans-Regular.ttf</file>
<file>assets/fonts/NotoSans-Thin.ttf</file>
<file>assets/fonts/NotoSansCJKkr-Regular.otf</file>
<file>assets/fonts/Roboto-Light.ttf</file>
<file>assets/fonts/Roboto-Regular.ttf</file>
<file>assets/fonts/Roboto-Thin.ttf</file>
<file>assets/fonts/RobotoMono-Light.ttf</file>
<file>assets/fonts/RobotoMono-Thin.ttf</file>
</qresource>
</RCC>

View File

@ -49,25 +49,29 @@
#include <QtQml>
#include <QtSvg>
#include "src/create.h"
#include "src/globalvariables.h"
#include "src/installedlistfilter.h"
#include "src/installedlistmodel.h"
#include "src/monitorlistmodel.h"
#include "src/profilelistmodel.h"
#include "src/screenplaymanager.h"
#include "src/settings.h"
#include "src/util.h"
#include "src/wizards.h"
#include "ScreenPlay/create.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/installedlistfilter.h"
#include "ScreenPlay/installedlistmodel.h"
#include "ScreenPlay/monitorlistmodel.h"
#include "ScreenPlay/profilelistmodel.h"
#include "ScreenPlay/screenplaymanager.h"
#include "ScreenPlay/settings.h"
#include "ScreenPlay/util.h"
#include "ScreenPlay/wizards.h"
#include <memory>
#if defined(Q_OS_WIN)
#include <sentry.h>
#endif
namespace ScreenPlay {
class App : public QObject {
Q_OBJECT
Q_PROPERTY(QQmlApplicationEngine* mainWindowEngine READ mainWindowEngine WRITE setMainWindowEngine NOTIFY mainWindowEngineChanged)
Q_PROPERTY(GlobalVariables* globalVariables READ globalVariables WRITE setGlobalVariables NOTIFY globalVariablesChanged)
Q_PROPERTY(ScreenPlayManager* screenPlayManager READ screenPlayManager WRITE setScreenPlayManager NOTIFY screenPlayManagerChanged)
@ -217,6 +221,11 @@ public slots:
private:
bool setupKDE();
bool isKDEInstalled();
void installKDEWallpaper();
void upgradeKDEWallpaper();
void restartKDE();
std::optional<bool> isNewestKDEWallpaperInstalled();
private:
QNetworkAccessManager m_networkAccessManager;
@ -229,12 +238,14 @@ private:
std::unique_ptr<Util> m_util;
std::shared_ptr<GlobalVariables> m_globalVariables;
std::shared_ptr<Settings> m_settings;
std::shared_ptr<Settings> m_settings;
std::shared_ptr<InstalledListModel> m_installedListModel;
std::shared_ptr<MonitorListModel> m_monitorListModel;
std::shared_ptr<ProfileListModel> m_profileListModel;
std::shared_ptr<InstalledListFilter> m_installedListFilter;
QProcess process;
QString m_kdeWallpaperPath;
QString m_appKdeWallapperPath;
};
}

View File

@ -56,15 +56,16 @@
#include <memory>
#include "ScreenPlay/createimportvideo.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/util.h"
#include "ScreenPlayUtil/util.h"
#include "createimportvideo.h"
#include "globalvariables.h"
#include "util.h"
namespace ScreenPlay {
class Create : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QString workingDir READ workingDir WRITE setWorkingDir NOTIFY workingDirChanged)
Q_PROPERTY(float progress READ progress WRITE setProgress NOTIFY progressChanged)

View File

@ -49,13 +49,15 @@
#include <QString>
#include <QtMath>
#include "createimportstates.h"
#include "util.h"
#include "ScreenPlay/createimportstates.h"
#include "ScreenPlay/util.h"
namespace ScreenPlay {
class CreateImportVideo : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(float progress READ progress WRITE setProgress NOTIFY progressChanged)
public:

View File

@ -47,6 +47,7 @@ namespace ScreenPlay {
class GlobalVariables : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QVersionNumber version READ version CONSTANT)
Q_PROPERTY(QUrl localStoragePath READ localStoragePath WRITE setLocalStoragePath NOTIFY localStoragePathChanged)

View File

@ -38,13 +38,14 @@
#include <QSortFilterProxyModel>
#include <memory>
#include "globalvariables.h"
#include "installedlistmodel.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/installedlistmodel.h"
namespace ScreenPlay {
class InstalledListFilter : public QSortFilterProxyModel {
Q_OBJECT
QML_ELEMENT
public:
InstalledListFilter(const std::shared_ptr<InstalledListModel>& ilm);

View File

@ -54,10 +54,10 @@
#include <QVector>
#include <QtConcurrent/QtConcurrent>
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/profilelistmodel.h"
#include "ScreenPlay/util.h"
#include "ScreenPlayUtil/projectfile.h"
#include "globalvariables.h"
#include "profilelistmodel.h"
#include "util.h"
#include <memory>
@ -65,6 +65,7 @@ namespace ScreenPlay {
class InstalledListModel : public QAbstractListModel {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)

View File

@ -43,9 +43,9 @@
#include <QString>
#include <QVector>
#include "projectsettingslistmodel.h"
#include "screenplaywallpaper.h"
#include "screenplaywidget.h"
#include "ScreenPlay/projectsettingslistmodel.h"
#include "ScreenPlay/screenplaywallpaper.h"
#include "ScreenPlay/screenplaywidget.h"
#ifdef Q_OS_WIN
#include <qt_windows.h>
@ -72,6 +72,7 @@ struct Monitor {
class MonitorListModel : public QAbstractListModel {
Q_OBJECT
QML_ELEMENT
public:
explicit MonitorListModel(QObject* parent = nullptr);

View File

@ -43,8 +43,8 @@
#include <QUrl>
#include <QVector>
#include "globalvariables.h"
#include "profile.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/profile.h"
#include <memory>
@ -54,6 +54,7 @@ struct Profile;
class ProfileListModel : public QAbstractListModel {
Q_OBJECT
QML_ELEMENT
public:
explicit ProfileListModel(

View File

@ -43,7 +43,7 @@
#include <QJsonObject>
#include <QVector>
#include "util.h"
#include "ScreenPlay/util.h"
namespace ScreenPlay {

View File

@ -58,9 +58,11 @@ namespace ScreenPlay {
class ScreenPlayManager : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(int activeWallpaperCounter READ activeWallpaperCounter WRITE setActiveWallpaperCounter NOTIFY activeWallpaperCounterChanged)
Q_PROPERTY(int activeWidgetsCounter READ activeWidgetsCounter WRITE setActiveWidgetsCounter NOTIFY activeWidgetsCounterChanged)
Q_PROPERTY(bool isKDEConnected READ isKDEConnected WRITE setIsKDEConnected NOTIFY isKDEConnectedChanged)
public:
explicit ScreenPlayManager(QObject* parent = nullptr);
@ -74,6 +76,9 @@ public:
int activeWidgetsCounter() const { return m_activeWidgetsCounter; }
bool isAnotherScreenPlayInstanceRunning() { return m_isAnotherScreenPlayInstanceRunning; }
bool isKDEConnected() const;
void setIsKDEConnected(bool isKDEConnected);
signals:
void activeWallpaperCounterChanged(int activeWallpaperCounter);
void activeWidgetsCounterChanged(int activeWidgetsCounter);
@ -85,6 +90,8 @@ signals:
void profilesSaved();
void displayErrorPopup(const QString& msg);
void isKDEConnectedChanged(bool isKDEConnected);
private slots:
bool saveProfiles();
@ -196,6 +203,7 @@ private:
QTimer m_saveLimiter;
const quint16 m_webSocketPort = 16395;
bool m_isKDEConnected = false;
};
}

View File

@ -41,16 +41,17 @@
#include <memory>
#include "globalvariables.h"
#include "projectsettingslistmodel.h"
#include "sdkconnection.h"
#include "settings.h"
#include "util.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/projectsettingslistmodel.h"
#include "ScreenPlay/sdkconnection.h"
#include "ScreenPlay/settings.h"
#include "ScreenPlay/util.h"
namespace ScreenPlay {
class ScreenPlayWallpaper : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(bool isConnected READ isConnected WRITE setIsConnected NOTIFY isConnectedChanged)
@ -89,7 +90,7 @@ public:
bool start();
void replace(
bool replace(
const QString& absolutePath,
const QString& previewImage,
const QString& file,

View File

@ -42,10 +42,10 @@
#include <QPoint>
#include <QProcess>
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/projectsettingslistmodel.h"
#include "ScreenPlay/sdkconnection.h"
#include "ScreenPlayUtil/util.h"
#include "globalvariables.h"
#include "projectsettingslistmodel.h"
#include "sdkconnection.h"
#include <memory>
#include <utility>
@ -54,6 +54,7 @@ namespace ScreenPlay {
class ScreenPlayWidget : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QString absolutePath READ absolutePath WRITE setAbsolutePath NOTIFY absolutePathChanged)
Q_PROPERTY(QString previewImage READ previewImage WRITE setPreviewImage NOTIFY previewImageChanged)

View File

@ -46,9 +46,9 @@
#include <QVector>
#include <QWebSocketServer>
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/util.h"
#include "ScreenPlayUtil/util.h"
#include "globalvariables.h"
#include "util.h"
#include <memory>

View File

@ -61,8 +61,8 @@
#include <QtConcurrent/QtConcurrent>
#include <QtGlobal>
#include "globalvariables.h"
#include "util.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/util.h"
#include <memory>
#include <optional>
@ -76,6 +76,7 @@ class ActiveProfile;
class Settings : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(bool anonymousTelemetry READ anonymousTelemetry WRITE setAnonymousTelemetry NOTIFY anonymousTelemetryChanged)
Q_PROPERTY(bool silentStart READ silentStart WRITE setSilentStart NOTIFY silentStartChanged)

View File

@ -53,8 +53,12 @@
#include <QtConcurrent/QtConcurrent>
#include <qqml.h>
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlayUtil/util.h"
#include "globalvariables.h"
#include "qarchive_enums.hpp"
#include "qarchivediskcompressor.hpp"
#include "qarchivediskextractor.hpp"
#include <fstream>
#include <iostream>
@ -81,6 +85,7 @@ T QStringToEnum(const QString& key, const T defaultValue)
class Util : public QObject {
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QString debugMessages READ debugMessages NOTIFY debugMessagesChanged)
@ -105,7 +110,8 @@ public slots:
void copyToClipboard(const QString& text) const;
void openFolderInExplorer(const QString& url) const;
QString toLocal(const QString& url);
bool exportProject(QString& contentPath, QString& exportPath);
bool importProject(QString& archivePath, QString& extractionPath);
void requestAllLicenses();
void requestDataProtection();
@ -146,6 +152,9 @@ private:
QNetworkAccessManager* m_networkAccessManager { nullptr };
QString m_debugMessages {};
QFuture<void> m_requestAllLicensesFuture;
std::unique_ptr<QArchive::DiskCompressor> m_compressor;
std::unique_ptr<QArchive::DiskExtractor> m_extractor;
};
// Used for redirect content from static logToGui to setDebugMessages

View File

@ -54,9 +54,9 @@
#include <QUrl>
#include <QtMath>
#include "createimportvideo.h"
#include "globalvariables.h"
#include "util.h"
#include "ScreenPlay/createimportvideo.h"
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/util.h"
#include <memory>
#include <optional>
@ -65,6 +65,7 @@ namespace ScreenPlay {
class Wizards : public QObject {
Q_OBJECT
QML_ELEMENT
public:
explicit Wizards(const std::shared_ptr<GlobalVariables>& globalVariables, QObject* parent = nullptr);
Wizards() { }
@ -134,5 +135,8 @@ signals:
private:
const std::shared_ptr<GlobalVariables> m_globalVariables;
const std::optional<QString> createTemporaryFolder() const;
private:
QFuture<void> m_wizardFuture;
};
}

View File

@ -32,34 +32,26 @@
**
****************************************************************************/
#include "app.h"
#include "ScreenPlay/app.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QDebug>
Q_IMPORT_QML_PLUGIN(ScreenPlayQmlPlugin)
#if defined(Q_OS_WIN)
#include <sentry.h>
#define DOCTEST_CONFIG_IMPLEMENT
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
#include <doctest/doctest.h>
#endif
Q_IMPORT_QML_PLUGIN(ScreenPlayAppPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
#ifdef SCREENPLAY_STEAM
Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
#endif
int main(int argc, char* argv[])
{
Q_INIT_RESOURCE(Resources);
QApplication qtGuiApp(argc, argv);
// Unit tests
doctest::Context context;
context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
context.setOption("order-by", "name"); // sort the test cases by their name
context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
context.setOption("no-run", true); // No tests are executed by default
context.applyCommandLine(argc, argv); // Every setOption call after applyCommandLine overrides the command line arguments
const int testResult = context.run();
if (context.shouldExit())
return testResult;
ScreenPlay::App app;
if (app.m_isAnotherScreenPlayInstanceRunning) {
@ -67,7 +59,9 @@ int main(int argc, char* argv[])
} else {
app.init();
const int status = qtGuiApp.exec();
#if defined(Q_OS_WIN)
sentry_shutdown();
#endif
return status;
}
}

View File

@ -3,15 +3,14 @@ import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import Settings 1.0
import ScreenPlayApp
import ScreenPlay
import Settings
import ScreenPlayUtil
import Qt5Compat.GraphicalEffects
import "qml/Monitors" as Monitors
import "qml/Common" as Common
import "qml/Common/Dialogs" as Dialogs
import "qml/Installed" as Installed
import "qml/Navigation" as Navigation
import "qml/Workshop" as Workshop
import "qml/Community" as Community
ApplicationWindow {
@ -34,18 +33,21 @@ ApplicationWindow {
function switchPage(name) {
if (nav.currentNavigationName === name) {
if (name === "Installed")
ScreenPlay.installedListModel.reset()
App.installedListModel.reset()
}
if (name === "Installed") {
stackView.replace("qrc:/ScreenPlayQml/qml/Installed/Installed.qml", {
"sidebar": sidebar
})
stackView.replace(
"qrc:/qml/ScreenPlayApp/qml/Installed/Installed.qml", {
"sidebar": sidebar
})
return
}
stackView.replace("qrc:/ScreenPlayQml/qml/" + name + "/" + name + ".qml", {
"modalSource": content
})
stackView.replace(
"qrc:/qml/ScreenPlayApp/qml/" + name + "/" + name + ".qml",
{
"modalSource": content
})
sidebar.state = "inactive"
}
@ -55,48 +57,49 @@ ApplicationWindow {
visible: false
width: 1400
height: 788
title: "ScreenPlay Alpha - " + ScreenPlay.version()
title: "ScreenPlay Alpha - V" + App.version()
minimumHeight: 450
minimumWidth: 1050
property bool enableCustomWindowNavigation: Qt.platform.os === "windows" || Qt.platform.os === "osx"
property bool enableCustomWindowNavigation: Qt.platform.os === "windows"
|| Qt.platform.os === "osx"
// Partial workaround for
// https://bugreports.qt.io/browse/QTBUG-86047
Material.accent: Material.color(Material.Orange)
onVisibilityChanged: {
if (root.visibility === 2)
ScreenPlay.installedListModel.reset()
App.installedListModel.reset()
}
onClosing: {
if (ScreenPlay.screenPlayManager.activeWallpaperCounter === 0
&& ScreenPlay.screenPlayManager.activeWidgetsCounter === 0) {
if (App.screenPlayManager.activeWallpaperCounter === 0
&& App.screenPlayManager.activeWidgetsCounter === 0) {
Qt.quit()
}
}
Component.onCompleted: {
if(root.enableCustomWindowNavigation){
if (root.enableCustomWindowNavigation) {
root.flags = Qt.FramelessWindowHint | Qt.Window
}
setTheme(ScreenPlay.settings.theme)
stackView.push("qrc:/ScreenPlayQml/qml/Installed/Installed.qml", {
setTheme(App.settings.theme)
stackView.push("qrc:/qml/ScreenPlayApp/qml/Installed/Installed.qml", {
"sidebar": sidebar
})
if (!ScreenPlay.settings.silentStart)
if (!App.settings.silentStart)
root.show()
}
Item {
id: noneContentItems
Dialogs.SteamNotAvailable {
SteamNotAvailable {
id: dialogSteam
modalSource: content
}
Dialogs.MonitorConfiguration {
MonitorConfiguration {
modalSource: content
}
Dialogs.CriticalError {
CriticalError {
window: root
modalSource: content
}
@ -105,7 +108,7 @@ ApplicationWindow {
id: monitors
modalSource: content
}
Common.TrayIcon {
TrayIcon {
window: root
}
}
@ -117,7 +120,7 @@ ApplicationWindow {
id: windowNav
enabled: root.enableCustomWindowNavigation
visible: enabled
z:5
z: 5
modalSource: content
width: parent.width
window: root
@ -126,19 +129,18 @@ ApplicationWindow {
Item {
id: content
anchors {
top: root.enableCustomWindowNavigation ? windowNav.bottom : parent.top
top: root.enableCustomWindowNavigation ? windowNav.bottom : parent.top
right: parent.right
bottom: parent.bottom
left: parent.left
}
Connections {
function onThemeChanged(theme) {
setTheme(theme)
}
target: ScreenPlay.settings
target: App.settings
}
Connections {
@ -146,7 +148,7 @@ ApplicationWindow {
switchPage(nav)
}
target: ScreenPlay.util
target: App.util
}
Connections {
@ -154,7 +156,7 @@ ApplicationWindow {
root.show()
}
target: ScreenPlay.screenPlayManager
target: App.screenPlayManager
}
StackView {
@ -287,15 +289,17 @@ ApplicationWindow {
}
}
Rectangle {
Item {
width: 15
height: width
color: "#555"
anchors {
right: parent.right
bottom: parent.bottom
margins: 1
}
Image {
source: "qrc:/qml/ScreenPlayApp/assets/images/scale_window_indicator.png"
}
MouseArea {
id: maResize
anchors.fill: parent

View File

@ -3,7 +3,8 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: root
@ -45,7 +46,7 @@ Item {
Button {
text: qsTr("News")
onClicked: Qt.openUrlExternally("https://screen-play.app/blog/")
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_document.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter
@ -55,7 +56,7 @@ Item {
text: qsTr("Wiki")
onClicked: Qt.openUrlExternally(
"https://kelteseth.gitlab.io/ScreenPlayDocs/")
icon.source: "qrc:/assets/icons/icon_help_center.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_help_center.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter
@ -65,7 +66,7 @@ Item {
text: qsTr("Forum")
onClicked: Qt.openUrlExternally(
"https://forum.screen-play.app/")
icon.source: "qrc:/assets/icons/icon_forum.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_forum.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter
@ -75,7 +76,7 @@ Item {
text: qsTr("Reddit")
onClicked: Qt.openUrlExternally(
"https://www.reddit.com/r/ScreenPlayApp/")
icon.source: "qrc:/assets/icons/brand_reddit.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/brand_reddit.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter
@ -85,7 +86,7 @@ Item {
text: qsTr("Issue Tracker")
onClicked: Qt.openUrlExternally(
"https://gitlab.com/kelteseth/ScreenPlay/-/issues")
icon.source: "qrc:/assets/icons/icon_report_problem.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_report_problem.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter
@ -95,7 +96,7 @@ Item {
text: qsTr("Contribute")
onClicked: Qt.openUrlExternally(
"https://gitlab.com/kelteseth/ScreenPlay#general-contributing")
icon.source: "qrc:/assets/icons/icon_supervisor_account.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_supervisor_account.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter
@ -104,7 +105,7 @@ Item {
Button {
text: qsTr("Steam Workshop")
onClicked: Qt.openUrlExternally("steam://url/GameHub/672870")
icon.source: "qrc:/assets/icons/icon_steam.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
icon.width: 14
icon.height: 14
Layout.alignment: Qt.AlignVCenter

View File

@ -1,7 +1,8 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
TabButton {
id: control
@ -33,7 +34,7 @@ TabButton {
id: txt
text: control.text
font.family: ScreenPlay.settings.font
font.family: App.settings.font
opacity: enabled ? 1 : 0.3
color: control.checked ? Material.accentColor : Material.primaryTextColor
horizontalAlignment: Text.AlignHCenter
@ -48,7 +49,7 @@ TabButton {
ToolButton {
opacity: 0.6
width: parent.width * 0.2
icon.source: "qrc:/assets/icons/icon_open_in_new.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_open_in_new.svg"
icon.width: 16
icon.height: 16
onClicked: Qt.openUrlExternally(control.openLink)

View File

@ -4,7 +4,8 @@ import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import QtQml.XmlListModel
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: root
@ -73,7 +74,7 @@ Item {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pointSize: 32
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Light
anchors {
@ -141,7 +142,7 @@ Item {
text: title
color: Material.primaryTextColor
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Normal
font.pointSize: 14
wrapMode: Text.WordWrap
@ -160,7 +161,7 @@ Item {
text: pubDate
color: Material.primaryTextColor
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.pointSize: 8
wrapMode: Text.WordWrap

View File

@ -5,9 +5,10 @@ import QtQuick.Controls.Material
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.QMLUtilities 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.QMLUtilities
Item {
id: root
@ -16,10 +17,10 @@ Item {
Component.onCompleted: {
wizardContentWrapper.state = "in";
stackView.push("qrc:/ScreenPlayQml/qml/Create/StartInfo.qml");
stackView.push("qrc:/qml/ScreenPlayApp/qml/Create/StartInfo.qml");
}
Sidebar {
CreateSidebar {
id: sidebar
stackView: stackView

View File

@ -5,9 +5,10 @@ import QtQuick.Controls.Material
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.QMLUtilities 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.QMLUtilities
Rectangle {
id: root
@ -43,9 +44,9 @@ Rectangle {
function onWizardExited() {
root.expanded = true
stackView.clear(StackView.PushTransition)
stackView.push("qrc:/ScreenPlayQml/qml/Create/StartInfo.qml")
stackView.push("qrc:/qml/ScreenPlayApp/qml/Create/StartInfo.qml")
listView.currentIndex = 0
ScreenPlay.util.setNavigationActive(true)
App.util.setNavigationActive(true)
}
ignoreUnknownSignals: true
@ -54,70 +55,70 @@ Rectangle {
model: ListModel {
ListElement {
headline: qsTr("Tools Overview")
source: "qrc:/ScreenPlayQml/qml/Create/StartInfo.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/StartInfo.qml"
category: "Home"
objectName: ""
}
ListElement {
headline: qsTr("Video Import h264 (.mp4)")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/Importh264/Importh264.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/Importh264/Importh264.qml"
category: "Video Wallpaper"
objectName: ""
}
ListElement {
headline: qsTr("Video Import VP8 & VP9 (.webm)")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/ImportWebm/ImportWebm.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/ImportWebm/ImportWebm.qml"
category: "Video Wallpaper"
objectName: ""
}
ListElement {
headline: qsTr("Video import (all types)")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/ImportVideoAndConvert/CreateWallpaper.qml"
category: "Video Wallpaper"
objectName: "videoImportConvert"
}
ListElement {
headline: qsTr("GIF Wallpaper")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/GifWallpaper.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/GifWallpaper.qml"
category: "Video Wallpaper"
objectName: ""
}
ListElement {
headline: qsTr("QML Wallpaper")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/QMLWallpaper.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/QMLWallpaper.qml"
category: "Code Wallpaper"
objectName: ""
}
ListElement {
headline: qsTr("HTML5 Wallpaper")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/HTMLWallpaper.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/HTMLWallpaper.qml"
category: "Code Wallpaper"
objectName: ""
}
ListElement {
headline: qsTr("Website Wallpaper")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/WebsiteWallpaper.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/WebsiteWallpaper.qml"
category: "Code Wallpaper"
objectName: ""
}
ListElement {
headline: qsTr("QML Widget")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/QMLWidget.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/QMLWidget.qml"
category: "Code Widgets"
objectName: ""
}
ListElement {
headline: qsTr("HTML Widget")
source: "qrc:/ScreenPlayQml/qml/Create/Wizards/HTMLWidget.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Create/Wizards/HTMLWidget.qml"
category: "Code Widgets"
objectName: ""
}

View File

@ -5,15 +5,16 @@ import QtQuick.Controls.Material
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.QMLUtilities 1.0
import "../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.QMLUtilities
import ScreenPlayUtil as Util
Item {
id: root
Common.Headline {
Util.Headline {
id: headline
text: qsTr("Free tools to help you to create wallpaper")
@ -32,7 +33,7 @@ Item {
color: Material.primaryTextColor
font.pointSize: 12
font.family: ScreenPlay.settings.font
font.family: App.settings.font
text: qsTr("Below you can find tools to create wallaper, beyond the tools that ScreenPlay provides for you!")
anchors {
@ -51,7 +52,7 @@ Item {
maximumFlickVelocity: 2500
flickDeceleration: 500
clip: true
cellWidth: 186
cellWidth: 180
cellHeight: 280
anchors {
@ -69,7 +70,7 @@ Item {
model: ListModel {
ListElement {
text: "Subreddit"
image: "qrc:/assets/startinfo/reddit.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/reddit.png"
link: "https://www.reddit.com/r/ScreenPlayApp/"
description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
category: "Community"
@ -77,7 +78,7 @@ Item {
ListElement {
text: "Forums"
image: "qrc:/assets/startinfo/forums.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/forums.png"
link: "https://forum.screen-play.app/"
description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
category: "Community"
@ -85,7 +86,7 @@ Item {
ListElement {
text: "QML Online Editor"
image: "qrc:/assets/startinfo/qml_online.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/qml_online.png"
link: "https://qmlonline.kde.org/"
description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
category: "Tools"
@ -93,7 +94,7 @@ Item {
ListElement {
text: "Godot"
image: "qrc:/assets/startinfo/godot.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/godot.png"
link: "https://godotengine.org/"
description: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
category: "Tools"
@ -101,7 +102,7 @@ Item {
ListElement {
text: "Handbreak"
image: "qrc:/assets/startinfo/handbreak.png"
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"
@ -109,7 +110,7 @@ Item {
ListElement {
text: "Blender"
image: "qrc:/assets/startinfo/blender.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/blender.png"
link: "https://www.blender.org/"
description: ""
category: "Tools"
@ -117,7 +118,7 @@ Item {
ListElement {
text: "OBS Studio"
image: "qrc:/assets/startinfo/obs.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/obs.png"
link: "https://obsproject.com/"
description: ""
category: "Tools"
@ -125,7 +126,7 @@ Item {
ListElement {
text: "Krita"
image: "qrc:/assets/startinfo/krita.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/krita.png"
link: "https://krita.org/"
description: ""
category: "Tools"
@ -133,7 +134,7 @@ Item {
ListElement {
text: "Gimp"
image: "qrc:/assets/startinfo/gimp.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/gimp.png"
link: "https://gimp.org/"
description: ""
category: "Tools"
@ -141,7 +142,7 @@ Item {
ListElement {
text: "Inscape"
image: "qrc:/assets/startinfo/inkscape.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/inkscape.png"
link: "https://inkscape.org/"
description: ""
category: "Tools"
@ -149,7 +150,7 @@ Item {
ListElement {
text: "Kdenlive"
image: "qrc:/assets/startinfo/kdeenlive.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/kdeenlive.png"
link: "https://kdenlive.org/"
description: ""
category: "Tools"
@ -157,7 +158,7 @@ Item {
ListElement {
text: "ShareX"
image: "qrc:/assets/startinfo/sharex.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/sharex.png"
link: "https://getsharex.com/"
description: ""
category: "Tools"
@ -165,7 +166,7 @@ Item {
ListElement {
text: "GitLab"
image: "qrc:/assets/startinfo/gitlab.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/gitlab.png"
link: "https://about.gitlab.com/"
description: ""
category: "Tools"
@ -173,7 +174,7 @@ Item {
ListElement {
text: "Git Extensions - Git UI for Windows"
image: "qrc:/assets/startinfo/git_extentions.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/git_extentions.png"
link: "https://gitextensions.github.io/"
description: ""
category: "Tools"
@ -181,7 +182,7 @@ Item {
ListElement {
text: "Visual Studio Code"
image: "qrc:/assets/startinfo/vscode.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/vscode.png"
link: "https://code.visualstudio.com/"
description: ""
category: "Tools"
@ -189,7 +190,7 @@ Item {
ListElement {
text: "Shadertoy"
image: "qrc:/assets/startinfo/shadertoy.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/shadertoy.png"
link: "https://www.shadertoy.com/"
description: ""
category: "Resources"
@ -197,7 +198,7 @@ Item {
ListElement {
text: "Flaticon"
image: "qrc:/assets/startinfo/flaticon.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/flaticon.png"
link: "https://www.flaticon.com/"
description: ""
category: "Resources"
@ -205,7 +206,7 @@ Item {
ListElement {
text: "Unsplash"
image: "qrc:/assets/startinfo/unsplash.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/unsplash.png"
link: "https://unsplash.com/"
description: ""
category: "Resources"
@ -213,7 +214,7 @@ Item {
ListElement {
text: "FreeSound"
image: "qrc:/assets/startinfo/freesound.png"
image: "qrc:/qml/ScreenPlayApp/assets/startinfo/freesound.png"
link: "https://freesound.org/"
description: ""
category: "Resources"

View File

@ -5,10 +5,11 @@ import QtQuick.Controls.Material
import QtQuick.Particles
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.QMLUtilities 1.0
import "../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.QMLUtilities
import ScreenPlayUtil
Item {
id: delegate
@ -58,7 +59,7 @@ Item {
id: txtCategory
font.pointSize: 10
font.family: ScreenPlay.settings.font
font.family: App.settings.font
color: "white"
anchors {
@ -75,7 +76,7 @@ Item {
id: txtText
font.pointSize: 16
font.family: ScreenPlay.settings.font
font.family: App.settings.font
color: "white"
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -102,7 +103,7 @@ Item {
id: description
font.pointSize: 14
font.family: ScreenPlay.settings.font
font.family: App.settings.font
color: Material.primaryTextColor
anchors {

View File

@ -3,9 +3,10 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../Common"
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil
Item {
id: root
@ -81,8 +82,8 @@ Item {
interval: 400
onTriggered: {
ScreenPlay.util.setNavigationActive(true);
ScreenPlay.util.setNavigation("Create");
App.util.setNavigationActive(true);
App.util.setNavigation("Create");
}
}

View File

@ -2,8 +2,9 @@ import QtQuick
import QtQuick.Controls.Material
import QtQuick.Controls
import QtQuick.Layouts
import ScreenPlay 1.0
import "../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {
id: root
@ -14,12 +15,12 @@ WizardPage {
property bool ready: tfTitle.text.length >= 1 && root.file.length !== ""
function create() {
ScreenPlay.wizards.createGifWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, root.file, tagSelector.getTags());
App.wizards.createGifWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, root.file, tagSelector.getTags());
}
onReadyChanged: root.ready = ready
Common.Headline {
Util.Headline {
id: txtHeadline
text: qsTr("Import a Gif Wallpaper")
@ -71,12 +72,12 @@ WizardPage {
anchors.fill: parent
fillMode: Image.Tile
opacity: 0.2
source: "qrc:/assets/images/noisy-texture-3.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/noisy-texture-3.png"
}
Text {
color: Material.primaryTextColor
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.pointSize: 13
text: qsTr("Drop a *.gif file here or use 'Select file' below.")
verticalAlignment: Text.AlignVCenter
@ -104,7 +105,7 @@ WizardPage {
Layout.preferredHeight: 20
}
Common.FileSelector {
Util.FileSelector {
id: fileSelector
Layout.fillWidth: true
@ -122,11 +123,11 @@ WizardPage {
Layout.fillHeight: true
Layout.preferredWidth: root.width * 0.5
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("General")
}
Common.TextField {
Util.TextField {
id: tfTitle
Layout.fillWidth: true
@ -134,24 +135,24 @@ WizardPage {
required: true
}
Common.TextField {
Util.TextField {
id: tfCreatedBy
Layout.fillWidth: true
placeholderText: qsTr("Created By")
}
Common.LicenseSelector {
Util.LicenseSelector {
id: cbLicense
Layout.fillWidth: true
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Tags")
}
Common.TagSelector {
Util.TagSelector {
id: tagSelector
Layout.fillWidth: true

View File

@ -3,9 +3,10 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil as Util
WizardPage {
id: root
@ -14,7 +15,7 @@ WizardPage {
id: rightWrapper
function create() {
ScreenPlay.wizards.createHTMLWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
App.wizards.createHTMLWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
}
spacing: 10
@ -25,19 +26,19 @@ WizardPage {
left: parent.left
}
Common.Headline {
Util.Headline {
text: qsTr("Create a HTML Wallpaper")
Layout.fillWidth: true
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("General")
}
RowLayout {
spacing: 20
Common.TextField {
Util.TextField {
id: tfTitle
Layout.fillWidth: true
@ -46,7 +47,7 @@ WizardPage {
onTextChanged: root.ready = text.length >= 1
}
Common.TextField {
Util.TextField {
id: tfCreatedBy
Layout.fillWidth: true
@ -55,7 +56,7 @@ WizardPage {
}
Common.TextField {
Util.TextField {
id: tfDescription
Layout.fillWidth: true
@ -66,18 +67,18 @@ WizardPage {
height: 30
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("License & Tags")
}
RowLayout {
spacing: 20
Common.LicenseSelector {
Util.LicenseSelector {
id: cbLicense
}
Common.TagSelector {
Util.TagSelector {
id: tagSelector
Layout.fillWidth: true
@ -89,11 +90,11 @@ WizardPage {
height: 30
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Preview Image")
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
Layout.fillWidth: true

View File

@ -3,18 +3,19 @@ import QtQuick.Controls.Material
import QtQuick.Controls
import QtQuick.Layouts
import ScreenPlay 1.0
import "../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {
id: root
sourceComponent: ColumnLayout {
function create() {
ScreenPlay.wizards.createHTMLWidget(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
App.wizards.createHTMLWidget(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
}
Common.Headline {
Util.Headline {
id: txtHeadline
text: qsTr("Create a HTML widget")
@ -47,14 +48,14 @@ WizardPage {
Image {
id: imgPreview
source: "qrc:/assets/wizards/example_html.png"
source: "qrc:/qml/ScreenPlayApp/assets/wizards/example_html.png"
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
}
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
Layout.fillWidth: true
@ -70,11 +71,11 @@ WizardPage {
Layout.preferredWidth: root.width * 0.5
Layout.alignment: Qt.AlignTop
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("General")
}
Common.TextField {
Util.TextField {
id: tfTitle
Layout.fillWidth: true
@ -83,22 +84,22 @@ WizardPage {
onTextChanged: root.ready = text.length >= 1
}
Common.TextField {
Util.TextField {
id: tfCreatedBy
Layout.fillWidth: true
placeholderText: qsTr("Created by")
}
Common.LicenseSelector {
Util.LicenseSelector {
id: cbLicense
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Tags")
}
Common.TagSelector {
Util.TagSelector {
id: tagSelector
Layout.fillWidth: true

View File

@ -3,8 +3,9 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
Item {
id: root
@ -30,7 +31,7 @@ Item {
swipeView.currentIndex = 1
createWallpaperVideoImportConvert.codec = codec
createWallpaperVideoImportConvert.filePath = filePath
ScreenPlay.create.createWallpaperStart(filePath, codec, quality)
App.create.createWallpaperStart(filePath, codec, quality)
}
}

View File

@ -4,10 +4,10 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Dialogs
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil as Util
Item {
id: root
objectName: "createWallpaperInit"
@ -26,7 +26,7 @@ Item {
margins: 20
}
Common.Headline {
Util.Headline {
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
text: qsTr("Import any video type")
@ -41,7 +41,7 @@ Item {
Layout.fillWidth: true
font.pointSize: 13
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
ColumnLayout {
@ -54,7 +54,7 @@ Item {
color: Material.primaryTextColor
width: parent.width
font.pointSize: 14
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
ComboBox {
@ -69,7 +69,7 @@ Item {
textRole: "text"
valueRole: "value"
currentIndex: 1
font.family: ScreenPlay.settings.font
font.family: App.settings.font
model: ListModel {
id: model
@ -91,10 +91,10 @@ Item {
}
Common.Slider {
Util.Slider {
id: sliderQuality
iconSource: "qrc:/assets/icons/icon_settings.svg"
iconSource: "qrc:/qml/ScreenPlayApp/assets/icons/icon_settings.svg"
headline: qsTr("Quality slider. Lower value means better quality.")
Layout.preferredWidth: 400
@ -113,11 +113,11 @@ Item {
text: qsTr("Open Documentation")
Material.accent: Material.color(Material.LightGreen)
highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: Qt.openUrlExternally("https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
anchors {
@ -131,7 +131,7 @@ Item {
objectName: "createWallpaperInitFileSelectButton"
text: qsTr("Select file")
highlighted: true
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
fileDialogImportVideo.open();
}

View File

@ -4,8 +4,9 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
Item {
id: wrapperError
@ -17,7 +18,7 @@ Item {
text: qsTr("An error occurred!")
height: 40
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Light
color: Material.color(Material.DeepOrange)
font.pointSize: 32
@ -53,10 +54,10 @@ Item {
Text {
id: txtFFMPEGDebug
font.family: ScreenPlay.settings.font
font.family: App.settings.font
wrapMode: Text.WordWrap
color: "#626262"
text: ScreenPlay.create.ffmpegOutput
text: App.create.ffmpegOutput
height: txtFFMPEGDebug.paintedHeight
anchors {
@ -90,7 +91,7 @@ Item {
MenuItem {
text: qsTr("Copy text to clipboard")
onClicked: {
ScreenPlay.util.copyToClipboard(txtFFMPEGDebug.text);
App.util.copyToClipboard(txtFFMPEGDebug.text);
}
}
@ -102,10 +103,10 @@ Item {
text: qsTr("Back to create and send an error report!")
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
ScreenPlay.util.setNavigationActive(true);
ScreenPlay.util.setNavigation("Create");
App.util.setNavigationActive(true);
App.util.setNavigation("Create");
}
anchors {

View File

@ -3,10 +3,11 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.Enums.ImportVideoState 1.0
import "../../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.Enums.ImportVideoState
import ScreenPlayUtil as Util
Item {
id: root
@ -20,7 +21,7 @@ Item {
signal save
function cleanup() {
ScreenPlay.create.cancel()
App.create.cancel()
}
function basename(str) {
@ -51,7 +52,7 @@ Item {
txtConvert.text = qsTr("Generating preview thumbnail image...")
break
case ImportVideoState.ConvertingPreviewImageFinished:
imgPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.jpg"
imgPreview.source = "file:///" + App.create.workingDir + "/preview.jpg"
imgPreview.visible = true
break
case ImportVideoState.ConvertingPreviewVideo:
@ -61,7 +62,7 @@ Item {
txtConvert.text = qsTr("Generating preview gif...")
break
case ImportVideoState.ConvertingPreviewGifFinished:
gifPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.gif"
gifPreview.source = "file:///" + App.create.workingDir + "/preview.gif"
imgPreview.visible = false
gifPreview.visible = true
gifPreview.playing = true
@ -100,7 +101,7 @@ Item {
txtConvertNumber.text = percentage + "%"
}
target: ScreenPlay.create
target: App.create
}
Text {
@ -108,7 +109,7 @@ Item {
text: qsTr("Convert a video to a wallpaper")
height: 40
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Light
color: Material.primaryTextColor
font.pointSize: 23
@ -203,7 +204,7 @@ Item {
color: "white"
font.pointSize: 21
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
@ -218,7 +219,7 @@ Item {
color: Material.secondaryTextColor
text: qsTr("Generating preview video...")
font.pointSize: 14
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
@ -228,7 +229,7 @@ Item {
}
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
height: 80
@ -269,7 +270,7 @@ Item {
bottomMargin: 50
}
Common.TextField {
Util.TextField {
id: textFieldName
placeholderText: qsTr("Name (required!)")
@ -283,7 +284,7 @@ Item {
}
}
Common.TextField {
Util.TextField {
id: textFieldDescription
placeholderText: qsTr("Description")
@ -291,7 +292,7 @@ Item {
Layout.fillWidth: true
}
Common.TextField {
Util.TextField {
id: textFieldYoutubeURL
placeholderText: qsTr("Youtube URL")
@ -299,7 +300,7 @@ Item {
Layout.fillWidth: true
}
Common.TagSelector {
Util.TagSelector {
id: textFieldTags
width: parent.width
@ -327,10 +328,10 @@ Item {
text: qsTr("Abort")
Material.accent: Material.color(Material.Red)
highlighted: true
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
root.abort()
ScreenPlay.create.cancel()
App.create.cancel()
}
}
@ -341,11 +342,11 @@ Item {
enabled: false
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
if (conversionFinishedSuccessful) {
btnSave.enabled = false
ScreenPlay.create.saveWallpaper(
App.create.saveWallpaper(
textFieldName.text,
textFieldDescription.text, root.filePath,
previewSelector.imageSource,
@ -379,7 +380,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
Timer {
@ -388,8 +389,8 @@ Item {
interval: 1000 + Math.random() * 1000
onTriggered: {
savePopup.close()
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Installed")
App.util.setNavigationActive(true)
App.util.setNavigation("Installed")
}
}
}

View File

@ -3,8 +3,9 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
Item {
id: root
@ -25,8 +26,8 @@ Item {
root.wizardStarted()
swipeView.currentIndex = 1
createWallpaperVideoImportConvert.filePath = filePath
ScreenPlay.util.setNavigationActive(false)
ScreenPlay.create.createWallpaperStart(filePath)
App.util.setNavigationActive(false)
App.create.createWallpaperStart(filePath)
}
}

View File

@ -3,10 +3,11 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.Enums.ImportVideoState 1.0
import "../../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.Enums.ImportVideoState
import ScreenPlayUtil as Util
Item {
id: root
@ -49,7 +50,7 @@ Item {
txtConvert.text = qsTr("Generating preview thumbnail image...");
break;
case ImportVideoState.ConvertingPreviewImageFinished:
imgPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.jpg";
imgPreview.source = "file:///" + App.create.workingDir + "/preview.jpg";
imgPreview.visible = true;
break;
case ImportVideoState.ConvertingPreviewVideo:
@ -59,7 +60,7 @@ Item {
txtConvert.text = qsTr("Generating preview gif...");
break;
case ImportVideoState.ConvertingPreviewGifFinished:
gifPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.gif";
gifPreview.source = "file:///" + App.create.workingDir + "/preview.gif";
imgPreview.visible = false;
gifPreview.visible = true;
gifPreview.playing = true;
@ -97,10 +98,10 @@ Item {
txtConvertNumber.text = percentage + "%";
}
target: ScreenPlay.create
target: App.create
}
Common.Headline {
Util.Headline {
id: txtHeadline
text: qsTr("Import a video to a wallpaper")
@ -198,7 +199,7 @@ Item {
color: "white"
font.pointSize: 21
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
@ -214,7 +215,7 @@ Item {
color: Material.secondaryTextColor
text: qsTr("Generating preview video...")
font.pointSize: 14
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
@ -226,7 +227,7 @@ Item {
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
height: 80
@ -269,7 +270,7 @@ Item {
bottomMargin: 50
}
Common.TextField {
Util.TextField {
id: textFieldName
placeholderText: qsTr("Name (required!)")
@ -283,7 +284,7 @@ Item {
}
}
Common.TextField {
Util.TextField {
id: textFieldDescription
placeholderText: qsTr("Description")
@ -291,7 +292,7 @@ Item {
Layout.fillWidth: true
}
Common.TextField {
Util.TextField {
id: textFieldYoutubeURL
placeholderText: qsTr("Youtube URL")
@ -299,7 +300,7 @@ Item {
Layout.fillWidth: true
}
Common.TagSelector {
Util.TagSelector {
id: textFieldTags
width: parent.width
@ -328,10 +329,10 @@ Item {
text: qsTr("Abort")
Material.accent: Material.color(Material.Red)
highlighted: true
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
root.exit();
ScreenPlay.create.cancel();
App.create.cancel();
}
}
@ -342,11 +343,11 @@ Item {
enabled: false
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
if (conversionFinishedSuccessful) {
btnSave.enabled = false;
ScreenPlay.create.saveWallpaper(textFieldName.text, textFieldDescription.text, root.filePath, previewSelector.imageSource, textFieldYoutubeURL.text, Create.VP9, textFieldTags.getTags());
App.create.saveWallpaper(textFieldName.text, textFieldDescription.text, root.filePath, previewSelector.imageSource, textFieldYoutubeURL.text, Create.VP9, textFieldTags.getTags());
savePopup.open();
}
}
@ -377,7 +378,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
Timer {
@ -386,7 +387,7 @@ Item {
interval: 1000 + Math.random() * 1000
onTriggered: {
savePopup.close();
ScreenPlay.util.setNavigationActive(true);
App.util.setNavigationActive(true);
root.exit();
}
}

View File

@ -4,9 +4,10 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Dialogs
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil as Util
import "../../"
Item {
@ -27,7 +28,7 @@ Item {
margins: 20
}
Common.Headline {
Util.Headline {
Layout.fillWidth: true
text: qsTr("Import a .webm video")
}
@ -50,7 +51,7 @@ Item {
Layout.fillWidth: true
font.pointSize: 13
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
DropArea {
@ -66,7 +67,7 @@ Item {
drag.accept(Qt.LinkAction);
}
onDropped: {
let file = ScreenPlay.util.toLocal(drop.urls[0]);
let file = App.util.toLocal(drop.urls[0]);
bg.color = Qt.darker(Qt.darker(Material.backgroundColor));
if (file.endsWith(".webm"))
root.next(drop.urls[0]);
@ -88,7 +89,7 @@ Item {
anchors.fill: parent
fillMode: Image.Tile
opacity: 0.2
source: "qrc:/assets/images/noisy-texture-3.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/noisy-texture-3.png"
}
Text {
@ -100,7 +101,7 @@ Item {
font.pointSize: 13
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
fill: parent
@ -119,7 +120,7 @@ Item {
StartInfoLinkImage {
text: "Handbreak"
image: "qrc:/assets/startinfo/handbreak.png"
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"
@ -140,11 +141,11 @@ Item {
text: qsTr("Open Documentation")
Material.accent: Material.color(Material.LightGreen)
highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: Qt.openUrlExternally("https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
anchors {
@ -158,7 +159,7 @@ Item {
Button {
text: qsTr("Select file")
highlighted: true
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
fileDialogImportVideo.open();
}

View File

@ -3,8 +3,9 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
Item {
id: root
@ -25,8 +26,8 @@ Item {
root.wizardStarted()
swipeView.currentIndex = 1
createWallpaperVideoImportConvert.filePath = filePath
ScreenPlay.util.setNavigationActive(false)
ScreenPlay.create.importH264(filePath)
App.util.setNavigationActive(false)
App.create.importH264(filePath)
}
}

View File

@ -3,10 +3,11 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlay.Enums.ImportVideoState 1.0
import "../../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlay.Enums.ImportVideoState
import ScreenPlayUtil as Util
Item {
id: root
@ -49,7 +50,7 @@ Item {
txtConvert.text = qsTr("Generating preview thumbnail image...");
break;
case ImportVideoState.ConvertingPreviewImageFinished:
imgPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.jpg";
imgPreview.source = "file:///" + App.create.workingDir + "/preview.jpg";
imgPreview.visible = true;
break;
case ImportVideoState.ConvertingPreviewVideo:
@ -59,7 +60,7 @@ Item {
txtConvert.text = qsTr("Generating preview gif...");
break;
case ImportVideoState.ConvertingPreviewGifFinished:
gifPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.gif";
gifPreview.source = "file:///" + App.create.workingDir + "/preview.gif";
imgPreview.visible = false;
gifPreview.visible = true;
gifPreview.playing = true;
@ -97,10 +98,10 @@ Item {
txtConvertNumber.text = percentage + "%";
}
target: ScreenPlay.create
target: App.create
}
Common.Headline {
Util.Headline {
id: txtHeadline
text: qsTr("Import a video to a wallpaper")
@ -198,7 +199,7 @@ Item {
color: "white"
font.pointSize: 21
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
@ -214,7 +215,7 @@ Item {
color: Material.secondaryTextColor
text: qsTr("Generating preview video...")
font.pointSize: 14
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
@ -226,7 +227,7 @@ Item {
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
height: 80
@ -269,7 +270,7 @@ Item {
bottomMargin: 50
}
Common.TextField {
Util.TextField {
id: textFieldName
placeholderText: qsTr("Name (required!)")
@ -283,7 +284,7 @@ Item {
}
}
Common.TextField {
Util.TextField {
id: textFieldDescription
placeholderText: qsTr("Description")
@ -291,7 +292,7 @@ Item {
Layout.fillWidth: true
}
Common.TextField {
Util.TextField {
id: textFieldYoutubeURL
placeholderText: qsTr("Youtube URL")
@ -299,7 +300,7 @@ Item {
Layout.fillWidth: true
}
Common.TagSelector {
Util.TagSelector {
id: textFieldTags
width: parent.width
@ -328,10 +329,10 @@ Item {
text: qsTr("Abort")
Material.background: Material.Red
Material.foreground: "white"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
root.exit();
ScreenPlay.create.cancel();
App.create.cancel();
}
}
@ -342,11 +343,11 @@ Item {
enabled: false
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
if (conversionFinishedSuccessful) {
btnSave.enabled = false;
ScreenPlay.create.saveWallpaper(textFieldName.text, textFieldDescription.text, root.filePath, previewSelector.imageSource, textFieldYoutubeURL.text, Create.H264, textFieldTags.getTags());
App.create.saveWallpaper(textFieldName.text, textFieldDescription.text, root.filePath, previewSelector.imageSource, textFieldYoutubeURL.text, Create.H264, textFieldTags.getTags());
savePopup.open();
}
}
@ -377,7 +378,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
Timer {
@ -386,7 +387,7 @@ Item {
interval: 1000 + Math.random() * 1000
onTriggered: {
savePopup.close();
ScreenPlay.util.setNavigationActive(true);
App.util.setNavigationActive(true);
root.exit();
}
}

View File

@ -4,9 +4,10 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Dialogs
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil as Util
import "../../"
Item {
@ -27,7 +28,7 @@ Item {
margins: 20
}
Common.Headline {
Util.Headline {
Layout.fillWidth: true
text: qsTr("Import a .mp4 video")
}
@ -50,7 +51,7 @@ Item {
Layout.fillWidth: true
font.pointSize: 13
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.family: ScreenPlay.settings.font
font.family: App.settings.font
}
DropArea {
@ -67,7 +68,7 @@ Item {
drag.accept(Qt.LinkAction)
}
onDropped: {
let file = ScreenPlay.util.toLocal(drop.urls[0])
let file = App.util.toLocal(drop.urls[0])
bg.color = Qt.darker(Qt.darker(
Material.backgroundColor))
if (file.endsWith(".mp4"))
@ -91,7 +92,7 @@ Item {
anchors.fill: parent
fillMode: Image.Tile
opacity: 0.2
source: "qrc:/assets/images/noisy-texture-3.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/noisy-texture-3.png"
}
Text {
@ -103,7 +104,7 @@ Item {
font.pointSize: 13
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
fill: parent
@ -121,11 +122,11 @@ Item {
text: qsTr("Open Documentation")
Material.accent: Material.color(Material.LightGreen)
highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: Qt.openUrlExternally(
"https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
@ -139,7 +140,7 @@ Item {
Button {
text: qsTr("Select file")
highlighted: true
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
fileDialogImportVideo.open()
}

View File

@ -3,9 +3,10 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil as Util
WizardPage {
id: root
@ -14,7 +15,7 @@ WizardPage {
id: rightWrapper
function create() {
ScreenPlay.wizards.createQMLWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
App.wizards.createQMLWallpaper(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
}
spacing: 10
@ -25,19 +26,19 @@ WizardPage {
left: parent.left
}
Common.Headline {
Util.Headline {
text: qsTr("Create a QML Wallpaper")
Layout.fillWidth: true
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("General")
}
RowLayout {
spacing: 20
Common.TextField {
Util.TextField {
id: tfTitle
Layout.fillWidth: true
@ -46,7 +47,7 @@ WizardPage {
onTextChanged: root.ready = text.length >= 1
}
Common.TextField {
Util.TextField {
id: tfCreatedBy
Layout.fillWidth: true
@ -55,7 +56,7 @@ WizardPage {
}
Common.TextField {
Util.TextField {
id: tfDescription
Layout.fillWidth: true
@ -66,18 +67,18 @@ WizardPage {
height: 30
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("License & Tags")
}
RowLayout {
spacing: 20
Common.LicenseSelector {
Util.LicenseSelector {
id: cbLicense
}
Common.TagSelector {
Util.TagSelector {
id: tagSelector
Layout.fillWidth: true
@ -89,11 +90,11 @@ WizardPage {
height: 30
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Preview Image")
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
Layout.fillWidth: true

View File

@ -3,18 +3,19 @@ import QtQuick.Controls.Material
import QtQuick.Controls
import QtQuick.Layouts
import ScreenPlay 1.0
import "../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {
id: root
sourceComponent: ColumnLayout {
function create() {
ScreenPlay.wizards.createQMLWidget(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
App.wizards.createQMLWidget(tfTitle.text, cbLicense.name, cbLicense.licenseFile, tfCreatedBy.text, previewSelector.imageSource, tagSelector.getTags());
}
Common.Headline {
Util.Headline {
id: txtHeadline
text: qsTr("Create a QML widget")
@ -47,14 +48,14 @@ WizardPage {
Image {
id: imgPreview
source: "qrc:/assets/wizards/example_qml.png"
source: "qrc:/qml/ScreenPlayApp/assets/wizards/example_qml.png"
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
}
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
Layout.fillWidth: true
@ -70,11 +71,11 @@ WizardPage {
Layout.preferredWidth: root.width * 0.5
Layout.alignment: Qt.AlignTop
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("General")
}
Common.TextField {
Util.TextField {
id: tfTitle
Layout.fillWidth: true
@ -83,22 +84,22 @@ WizardPage {
onTextChanged: root.ready = text.length >= 1
}
Common.TextField {
Util.TextField {
id: tfCreatedBy
Layout.fillWidth: true
placeholderText: qsTr("Created by")
}
Common.LicenseSelector {
Util.LicenseSelector {
id: cbLicense
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Tags")
}
Common.TagSelector {
Util.TagSelector {
id: tagSelector
Layout.fillWidth: true

View File

@ -3,9 +3,10 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
import ScreenPlayUtil as Util
WizardPage {
id: root
@ -14,7 +15,7 @@ WizardPage {
property bool ready: tfTitle.text.length >= 1 && tfUrl.text.length > 1
function create() {
ScreenPlay.wizards.createWebsiteWallpaper(tfTitle.text, previewSelector.imageSource, tfUrl.text, tagSelector.getTags());
App.wizards.createWebsiteWallpaper(tfTitle.text, previewSelector.imageSource, tfUrl.text, tagSelector.getTags());
}
spacing: 10
@ -26,19 +27,19 @@ WizardPage {
left: parent.left
}
Common.Headline {
Util.Headline {
text: qsTr("Create a Website Wallpaper")
Layout.fillWidth: true
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("General")
}
RowLayout {
spacing: 20
Common.TextField {
Util.TextField {
id: tfTitle
Layout.fillWidth: true
@ -47,7 +48,7 @@ WizardPage {
onTextChanged: root.ready = text.length >= 1
}
Common.TextField {
Util.TextField {
id: tfCreatedBy
Layout.fillWidth: true
@ -56,14 +57,14 @@ WizardPage {
}
Common.TextField {
Util.TextField {
id: tfDescription
Layout.fillWidth: true
placeholderText: qsTr("Description")
}
Common.TextField {
Util.TextField {
id: tfUrl
Layout.fillWidth: true
@ -75,11 +76,11 @@ WizardPage {
height: 10
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Tags")
}
Common.TagSelector {
Util.TagSelector {
id: tagSelector
Layout.fillWidth: true
@ -89,11 +90,11 @@ WizardPage {
height: 10
}
Common.HeadlineSection {
Util.HeadlineSection {
text: qsTr("Preview Image")
}
Common.ImageSelector {
Util.ImageSelector {
id: previewSelector
Layout.fillWidth: true

View File

@ -4,8 +4,9 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Window
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Create
FocusScope {
id: root
@ -71,7 +72,7 @@ FocusScope {
Material.background: Material.accent
Material.foreground: "white"
Layout.alignment: Qt.AlignRight
font.family: ScreenPlay.settings.font
font.family: App.settings.font
onClicked: {
btnSave.enabled = false;
root.saveClicked();
@ -100,7 +101,7 @@ FocusScope {
Text {
text: qsTr("Saving...")
color: Material.primaryHighlightedTextColor
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
horizontalCenter: parent.horizontalCenter

View File

@ -1,12 +1,16 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
import QtQuick.Layouts
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Enums.InstalledType 1.0
import ScreenPlay.Enums.SearchType 1.0
import "../Common" as Common
import Qt.labs.platform 1.1 as Labs
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.InstalledType
import ScreenPlay.Enums.SearchType
import ScreenPlayUtil as Util
Item {
id: root
@ -20,7 +24,7 @@ Item {
signal setSidebarActive(var active)
function checkIsContentInstalled() {
if (ScreenPlay.installedListModel.count === 0) {
if (App.installedListModel.count === 0) {
loaderHelp.active = true
gridView.footerItem.isVisible = true
gridView.visible = false
@ -37,13 +41,13 @@ Item {
Component.onCompleted: {
navWrapper.state = "in"
ScreenPlay.installedListFilter.sortBySearchType(SearchType.All)
App.installedListFilter.sortBySearchType(SearchType.All)
checkIsContentInstalled()
}
Action {
shortcut: "F5"
onTriggered: ScreenPlay.installedListModel.reset()
onTriggered: App.installedListModel.reset()
}
Connections {
@ -64,7 +68,7 @@ Item {
checkIsContentInstalled()
}
target: ScreenPlay.installedListModel
target: App.installedListModel
}
Loader {
@ -73,7 +77,7 @@ Item {
active: false
z: 99
anchors.fill: parent
source: "qrc:/ScreenPlayQml/qml/Installed/InstalledWelcomeScreen.qml"
source: "qrc:/qml/ScreenPlayApp/qml/Installed/InstalledWelcomeScreen.qml"
}
Connections {
@ -81,7 +85,7 @@ Item {
gridView.positionViewAtBeginning()
}
target: ScreenPlay.installedListFilter
target: App.installedListFilter
}
GridView {
@ -102,7 +106,7 @@ Item {
snapMode: GridView.SnapToRow
onDragStarted: isDragging = true
onDragEnded: isDragging = false
model: ScreenPlay.installedListFilter
model: App.installedListFilter
removeDisplaced: Transition {
SequentialAnimation {
PauseAnimation {
@ -140,7 +144,7 @@ Item {
gridView.headerItem.isVisible = false
//Pull to refresh
if (contentY <= -180 && !refresh && !isDragging)
ScreenPlay.installedListModel.reset()
App.installedListModel.reset()
}
anchors {
@ -177,7 +181,7 @@ Item {
id: txtHeader
text: qsTr("Pull to refresh!")
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors.centerIn: parent
color: "gray"
font.pointSize: 18
@ -204,7 +208,7 @@ Item {
Text {
id: txtFooter
font.family: ScreenPlay.settings.font
font.family: App.settings.font
text: qsTr("Get more Wallpaper & Widgets via the Steam workshop!")
anchors.centerIn: parent
color: "gray"
@ -244,6 +248,7 @@ Item {
// 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)
// Disable duplicate opening. The can happen if we
// call popup when we are in the closing animtion.
@ -265,21 +270,36 @@ Item {
property var publishedFileID: 0
property url absoluteStoragePath
property string fileName
MenuItem {
text: qsTr("Open containing folder")
objectName: "openFolder"
icon.source: "qrc:/assets/icons/icon_folder_open.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_folder_open.svg"
onClicked: {
ScreenPlay.util.openFolderInExplorer(
contextMenu.absoluteStoragePath)
App.util.openFolderInExplorer(contextMenu.absoluteStoragePath)
}
}
MenuItem {
text: qsTr("Export")
objectName: enabled ? "removeItem" : "removeWorkshopItem"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_download.svg"
onClicked: {
exportFileDialog.absoluteStoragePath = contextMenu.absoluteStoragePath
let urlFileName = Labs.StandardPaths.writableLocation(
Labs.StandardPaths.DesktopLocation) + "/"
+ contextMenu.fileName + ".screenplay"
exportFileDialog.currentFile = urlFileName
exportFileDialog.open()
}
}
MenuItem {
text: enabled ? qsTr("Remove Item") : qsTr("Remove via Workshop")
objectName: enabled ? "removeItem" : "removeWorkshopItem"
icon.source: "qrc:/assets/icons/icon_delete.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_delete.svg"
enabled: contextMenu.publishedFileID === 0
onClicked: {
deleteDialog.open()
@ -289,13 +309,36 @@ Item {
MenuItem {
text: qsTr("Open Workshop Page")
enabled: contextMenu.publishedFileID !== 0
icon.source: "qrc:/assets/icons/icon_steam.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
onClicked: {
Qt.openUrlExternally(
"steam://url/CommunityFilePage/" + contextMenu.publishedFileID)
}
}
}
Labs.FileDialog {
id: exportFileDialog
fileMode: FileDialog.SaveFile
property string absoluteStoragePath
onAccepted: {
const success = App.util.exportProject(
exportFileDialog.absoluteStoragePath,
exportFileDialog.currentFile)
}
Dialog {
id: exportFileProgressDialog
modal: true
anchors.centerIn: Overlay.overlay
standardButtons: Dialog.Ok
onAccepted: errorDialog.close()
ProgressBar {
id: exportFileProgressBar
anchors.centerIn: parent
}
}
}
Dialog {
id: deleteDialog
@ -306,12 +349,12 @@ Item {
anchors.centerIn: Overlay.overlay
onAccepted: {
root.sidebar.clear()
ScreenPlay.installedListModel.deinstallItemAt(
App.installedListModel.deinstallItemAt(
contextMenu.absoluteStoragePath)
}
}
Navigation {
InstalledNavigation {
id: navWrapper
anchors {
@ -320,4 +363,83 @@ Item {
left: parent.left
}
}
DropArea {
id: dropArea
anchors.fill: parent
property string filePath
onEntered: function (drag) {
dropPopup.open()
}
onDropped: function (drop) {
dropPopup.close()
dropArea.enabled = false
if (drop.urls.length > 1) {
errorDialog.title = qsTr(
"We only support adding one item at once.")
errorDialog.open()
return
}
var file = "" // Convert url to string
file = "" + drop.urls[0]
if (!file.endsWith('.screenplay')) {
errorDialog.title = qsTr(
"File type not supported. We only support '.screenplay' files.")
errorDialog.open()
return
}
importDialog.open()
dropArea.filePath = file
}
onExited: {
dropPopup.close()
}
Dialog {
id: errorDialog
modal: true
anchors.centerIn: Overlay.overlay
standardButtons: Dialog.Ok
onAccepted: errorDialog.close()
}
Dialog {
id: importDialog
modal: true
anchors.centerIn: Overlay.overlay
standardButtons: Dialog.Ok
RowLayout {
Text {
text: qsTr("Import Content...")
}
}
onOpened: {
App.util.importProject(dropArea.filePath,
App.globalVariables.localStoragePath)
dropArea.filePath = ""
}
onAccepted: {
importDialog.close()
}
}
}
Popup {
id: dropPopup
anchors.centerIn: Overlay.overlay
width: root.width * .95
height: root.height * .95
dim: true
modal: true
onOpened: fileDropAnimation.state = "fileDrop"
onClosed: {
fileDropAnimation.state = ""
dropArea.enabled = true
}
Util.FileDropAnimation {
id: fileDropAnimation
anchors.centerIn: parent
}
}
}

View File

@ -3,10 +3,11 @@ import QtQuick.Controls
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Enums.InstalledType 1.0
import ScreenPlay.Enums.SearchType 1.0
import "../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.InstalledType
import ScreenPlay.Enums.SearchType
import ScreenPlayUtil as Util
Item {
id: root
@ -30,11 +31,9 @@ Item {
layer.effect: ElevationEffect {
elevation: 2
}
}
Common.MouseHoverBlocker {
}
Util.MouseHoverBlocker {}
Item {
height: nav.height
@ -58,86 +57,72 @@ Item {
TabButton {
text: qsTr("All")
font.family: ScreenPlay.settings.font
icon.height: 16
icon.width: 16
height: parent.height
width: implicitWidth
font.weight: Font.Thin
icon.source: "qrc:/assets/icons/icon_installed.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_installed.svg"
onClicked: {
setSidebarActive(false);
ScreenPlay.installedListFilter.sortBySearchType(SearchType.All);
}
background: Item {
setSidebarActive(false)
App.installedListFilter.sortBySearchType(
SearchType.All)
}
background: Item {}
}
TabButton {
text: qsTr("Scenes")
icon.height: 16
icon.width: 16
font.family: ScreenPlay.settings.font
width: implicitWidth
height: parent.height
font.weight: Font.Thin
icon.source: "qrc:/assets/icons/icon_code.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"
onClicked: {
setSidebarActive(false);
ScreenPlay.installedListFilter.sortBySearchType(SearchType.Scene);
}
background: Item {
setSidebarActive(false)
App.installedListFilter.sortBySearchType(
SearchType.Scene)
}
background: Item {}
}
TabButton {
text: qsTr("Videos")
icon.height: 16
icon.width: 16
font.family: ScreenPlay.settings.font
height: parent.height
width: implicitWidth
font.weight: Font.Thin
icon.source: "qrc:/assets/icons/icon_movie.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
onClicked: {
setSidebarActive(false);
ScreenPlay.installedListFilter.sortBySearchType(SearchType.Wallpaper);
}
background: Item {
setSidebarActive(false)
App.installedListFilter.sortBySearchType(
SearchType.Wallpaper)
}
background: Item {}
}
TabButton {
text: qsTr("Widgets")
icon.height: 16
icon.width: 16
font.family: ScreenPlay.settings.font
height: parent.height
width: implicitWidth
font.weight: Font.Thin
icon.source: "qrc:/assets/icons/icon_widgets.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"
onClicked: {
setSidebarActive(false);
ScreenPlay.installedListFilter.sortBySearchType(SearchType.Widget);
}
background: Item {
setSidebarActive(false)
App.installedListFilter.sortBySearchType(
SearchType.Widget)
}
background: Item {}
}
background: Item {
}
background: Item {}
}
Common.Search {
Util.Search {
height: parent.height
anchors {
@ -145,7 +130,6 @@ Item {
rightMargin: 10
top: parent.top
}
}
ToolButton {
@ -153,17 +137,21 @@ Item {
property int sortOrder: Qt.DescendingOrder
icon.source: (sortOrder === Qt.AscendingOrder) ? "qrc:/assets/icons/icon_sort-down-solid.svg" : "qrc:/assets/icons/icon_sort-up-solid.svg"
icon.source: (btnSortOrder.sortOrder === Qt.AscendingOrder) ? "qrc:/qml/ScreenPlayApp/assets/icons/icon_sort-down-solid.svg" : "qrc:/qml/ScreenPlayApp/assets/icons/icon_sort-up-solid.svg"
icon.width: 12
icon.height: 12
hoverEnabled: true
ToolTip.delay: 100
ToolTip.timeout: 5000
ToolTip.visible: hovered
ToolTip.text: (sortOrder === Qt.AscendingOrder) ? qsTr("Install Date Ascending") : qsTr("Install Date Descending")
ToolTip.text: (btnSortOrder.sortOrder
=== Qt.AscendingOrder) ? "Install Date Ascending": "Install Date Descending"
onClicked: {
sortOrder = (sortOrder === Qt.DescendingOrder) ? Qt.AscendingOrder : Qt.DescendingOrder;
ScreenPlay.installedListFilter.setSortOrder(sortOrder);
btnSortOrder.sortOrder
= (btnSortOrder.sortOrder
=== Qt.DescendingOrder) ? Qt.AscendingOrder : Qt.DescendingOrder
App.installedListFilter.setSortOrder(
btnSortOrder.sortOrder)
}
anchors {
@ -172,9 +160,7 @@ Item {
top: parent.top
verticalCenter: parent.verticalCenter
}
}
}
states: [
@ -185,7 +171,6 @@ Item {
target: root
anchors.topMargin: -115
}
},
State {
name: "in"
@ -194,7 +179,6 @@ Item {
target: root
anchors.topMargin: 0
}
}
]
transitions: [
@ -208,7 +192,6 @@ Item {
duration: 400
easing.type: Easing.InOutQuart
}
}
]
}

View File

@ -1,8 +1,9 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import ScreenPlay 1.0
import "../Common"
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Item {
id: installedUserHelper
@ -19,7 +20,7 @@ Item {
Image {
id: imgBg
source: "qrc:/assets/images/Intro.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/Intro.png"
anchors.fill: parent
}
@ -36,7 +37,7 @@ Item {
Image {
id: imgShine
source: "qrc:/assets/images/Intro_shine.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/Intro_shine.png"
height: 1753
width: 1753
opacity: 0
@ -58,7 +59,7 @@ Item {
Image {
id: imgLogo
source: "qrc:/assets/images/Early_Access.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/Early_Access.png"
width: 539
height: 148
sourceSize: Qt.size(width, height)
@ -75,8 +76,8 @@ Item {
id: txtHeadline
y: 80
text: qsTr("Get free Widgets and Wallpaper via the Steam Workshop")
font.family: ScreenPlay.settings.font
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
color: "white"
@ -95,7 +96,7 @@ Item {
Image {
id: imgPC
source: "qrc:/assets/images/Intro_PC.png"
source: "qrc:/qml/ScreenPlayApp/assets/images/Intro_PC.png"
width: 500 * 0.8
height: 500 * 0.8
sourceSize: Qt.size(width, height)
@ -118,7 +119,7 @@ Item {
font.weight: Font.Thin
width: implicitWidth + 20
height: implicitHeight + 10
icon.source: "qrc:/assets/icons/icon_steam.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
icon.width: 18
icon.height: 18
onClicked: helperButtonPressed(1)

View File

@ -2,9 +2,10 @@ import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlay.Enums.InstalledType 1.0
import "../Common/Util.js" as JSUtil
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.InstalledType
import ScreenPlayUtil
Item {
id: root
@ -24,15 +25,15 @@ Item {
height: 180
onTypeChanged: {
if (JSUtil.isWidget(type)) {
icnType.source = "qrc:/assets/icons/icon_widgets.svg"
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_widgets.svg"
return
}
if (JSUtil.isScene(type)) {
icnType.source = "qrc:/assets/icons/icon_code.svg"
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_code.svg"
return
}
if (JSUtil.isVideo(type)) {
icnType.source = "qrc:/assets/icons/icon_movie.svg"
icnType.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
return
}
}
@ -117,7 +118,7 @@ Item {
Image {
id: mask
source: "qrc:/assets/images/Window.svg"
source: "qrc:/qml/ScreenPlayApp/assets/images/Window.svg"
sourceSize: Qt.size(root.width, root.height)
visible: false
smooth: true
@ -137,7 +138,7 @@ Item {
Text {
text: root.customTitle
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.pointSize: 16
visible: !screenPlayItemImage.visible
color: Material.primaryTextColor
@ -163,7 +164,7 @@ Item {
width: 20
height: 20
opacity: 0.25
source: "qrc:/assets/icons/icon_movie.svg"
source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_movie.svg"
sourceSize: Qt.size(20, 20)
anchors {
@ -190,7 +191,7 @@ Item {
visible: root.isNew
Text {
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.pointSize: 9
renderType: Text.QtRendering
color: "white"
@ -225,7 +226,7 @@ Item {
}
onClicked: function (mouse) {
if (mouse.button === Qt.LeftButton)
ScreenPlay.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))
}

View File

@ -32,15 +32,15 @@ Item {
fillMode: Image.PreserveAspectCrop
source: {
if (root.sourceImage === "")
return "qrc:/assets/images/missingPreview.png";
return "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png";
return root.screenPreview === "" ? "qrc:/assets/images/missingPreview.png" : Qt.resolvedUrl(absoluteStoragePath + "/" + root.sourceImage);
return root.screenPreview === "" ? "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png" : Qt.resolvedUrl(absoluteStoragePath + "/" + root.sourceImage);
}
onStatusChanged: {
if (image.status === Image.Ready) {
root.state = "loaded";
} else if (image.status === Image.Error) {
source = "qrc:/assets/images/missingPreview.png";
source = "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png";
root.state = "loaded";
}
}
@ -54,7 +54,7 @@ Item {
asynchronous: true
playing: true
source: root.sourceImageGIF === "" ? "qrc:/assets/images/missingPreview.png" : Qt.resolvedUrl(absoluteStoragePath + "/" + root.sourceImageGIF)
source: root.sourceImageGIF === "" ? "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png" : Qt.resolvedUrl(absoluteStoragePath + "/" + root.sourceImageGIF)
fillMode: Image.PreserveAspectCrop
}

View File

@ -4,12 +4,12 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Enums.FillMode 1.0
import ScreenPlay.Enums.InstalledType 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.FillMode
import ScreenPlay.Enums.InstalledType
import "../Monitors"
import "../Common" as Common
import "../Common/Util.js" as JSUtil
import ScreenPlayUtil as Util
Item {
id: root
@ -20,17 +20,16 @@ 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(){
function clear() {
image.source = ""
txtHeadline.text = ""
root.state = "inactive"
@ -39,50 +38,58 @@ Item {
width: 400
state: "inactive"
onContentFolderNameChanged: {
txtHeadline.text = ScreenPlay.installedListModel.get(root.contentFolderName).m_title;
const hasPreviewGif = ScreenPlay.installedListModel.get(root.contentFolderName).m_previewGIF !== undefined;
txtHeadline.text = App.installedListModel.get(
root.contentFolderName).m_title
const hasPreviewGif = App.installedListModel.get(
root.contentFolderName).m_previewGIF !== undefined
if (!hasPreviewGif) {
image.source = Qt.resolvedUrl(ScreenPlay.globalVariables.localStoragePath + "/" + root.contentFolderName + "/" + ScreenPlay.installedListModel.get(root.contentFolderName).m_preview);
image.playing = false;
image.source = Qt.resolvedUrl(
App.globalVariables.localStoragePath + "/"
+ root.contentFolderName + "/" + App.installedListModel.get(
root.contentFolderName).m_preview)
image.playing = false
} else {
image.source = Qt.resolvedUrl(ScreenPlay.globalVariables.localStoragePath + "/" + root.contentFolderName + "/" + ScreenPlay.installedListModel.get(root.contentFolderName).m_previewGIF);
image.playing = true;
image.source = Qt.resolvedUrl(
App.globalVariables.localStoragePath + "/"
+ root.contentFolderName + "/" + App.installedListModel.get(
root.contentFolderName).m_previewGIF)
image.playing = true
}
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: ScreenPlay.util
target: App.util
}
Common.MouseHoverBlocker {
}
Util.MouseHoverBlocker {}
Rectangle {
anchors.fill: parent
@ -93,7 +100,6 @@ Item {
layer.effect: ElevationEffect {
elevation: 4
}
}
Item {
@ -132,11 +138,8 @@ Item {
position: 1
color: "#ffffff"
}
}
}
}
Item {
@ -170,8 +173,7 @@ Item {
anchors.fill: parent
onStatusChanged: {
if (image.status === Image.Error)
source = "qrc:/assets/images/missingPreview.png";
source = "qrc:/qml/ScreenPlayApp/assets/images/missingPreview.png"
}
}
@ -199,16 +201,14 @@ Item {
position: 1
color: "#00000000"
}
}
}
Text {
id: txtHeadline
text: qsTr("Headline")
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Thin
verticalAlignment: Text.AlignBottom
font.pointSize: 16
@ -222,7 +222,6 @@ Item {
margins: 20
left: parent.left
}
}
MouseArea {
@ -238,14 +237,12 @@ Item {
Image {
id: imgBack
source: "qrc:/assets/icons/icon_arrow_right.svg"
source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_arrow_right.svg"
sourceSize: Qt.size(15, 15)
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
}
}
}
ColumnLayout {
@ -266,33 +263,24 @@ Item {
height: 20
text: qsTr("Select a Monitor to display the content")
font.family: ScreenPlay.settings.font
font.family: App.settings.font
verticalAlignment: Text.AlignVCenter
font.pointSize: 10
color: "#626262"
font.pointSize: 11
color: Material.secondaryTextColor
}
MonitorSelection {
id: monitorSelection
objectName: "monitorSelection"
height: 180
Layout.fillWidth: true
availableWidth: width
availableHeight: height
fontSize: 11
onActiveMonitorsChanged: {
if (JSUtil.isWidget(root.type)) {
btnSetWallpaper.enabled = true;
return ;
}
btnSetWallpaper.enabled = activeMonitors.length > 0;
}
}
}
Common.Slider {
Util.Slider {
id: sliderVolume
Layout.fillWidth: true
@ -304,7 +292,6 @@ Item {
value: 1
to: 1
}
}
ColumnLayout {
@ -316,7 +303,7 @@ Item {
visible: false
text: qsTr("Fill Mode")
font.family: ScreenPlay.settings.font
font.family: App.settings.font
verticalAlignment: Text.AlignVCenter
font.pointSize: 10
color: "#626262"
@ -331,65 +318,79 @@ Item {
Layout.fillWidth: true
textRole: "text"
valueRole: "value"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
model: [{
"value": FillMode.Stretch,
"text": qsTr("Stretch")
}, {
"value": FillMode.Fill,
"text": qsTr("Fill")
}, {
"value": FillMode.Contain,
"text": qsTr("Contain")
}, {
"value": FillMode.Cover,
"text": qsTr("Cover")
}, {
"value": FillMode.Scale_Down,
"text": qsTr("Scale-Down")
}]
"value": FillMode.Stretch,
"text": qsTr("Stretch")
}, {
"value": FillMode.Fill,
"text": qsTr("Fill")
}, {
"value": FillMode.Contain,
"text": qsTr("Contain")
}, {
"value": FillMode.Cover,
"text": qsTr("Cover")
}, {
"value": FillMode.Scale_Down,
"text": qsTr("Scale-Down")
}]
Component.onCompleted: {
cbVideoFillMode.currentIndex = root.indexOfValue(cbVideoFillMode.model, ScreenPlay.settings.videoFillMode);
cbVideoFillMode.currentIndex = root.indexOfValue(
cbVideoFillMode.model,
App.settings.videoFillMode)
}
}
}
}
Button {
id: btnSetWallpaper
objectName: "btnSetWallpaper"
enabled: JSUtil.isWidget(
root.type) ? true : monitorSelection.isSelected
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
icon.source: "qrc:/assets/icons/icon_plus.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_plus.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
font.pointSize: 12
onClicked: {
const absoluteStoragePath = ScreenPlay.globalVariables.localStoragePath + "/" + root.contentFolderName;
const previewImage = ScreenPlay.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;
volume = Math.round(
sliderVolume.slider.value * 100) / 100
const screenFile = ScreenPlay.installedListModel.get(root.contentFolderName).m_file;
ScreenPlay.screenPlayManager.createWallpaper(root.type, cbVideoFillMode.currentValue, absoluteStoragePath, previewImage, screenFile, activeMonitors, volume, 1, {}, true);
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)
print(success)
}
if (JSUtil.isWidget(root.type))
ScreenPlay.screenPlayManager.createWidget(type, Qt.point(0, 0), absoluteStoragePath, previewImage, {}, true);
App.screenPlayManager.createWidget(type,
Qt.point(0, 0),
absoluteStoragePath,
previewImage, {},
true)
root.state = "inactive";
monitorSelection.reset();
root.state = "inactive"
monitorSelection.reset()
}
anchors {
@ -397,11 +398,8 @@ Item {
bottomMargin: 20
horizontalCenter: parent.horizontalCenter
}
}
}
}
states: [
@ -418,7 +416,6 @@ Item {
opacity: 0
anchors.topMargin: 20
}
},
State {
name: "activeWidget"
@ -444,7 +441,6 @@ Item {
target: txtHeadlineMonitor
opacity: 0
}
},
State {
name: "activeWallpaper"
@ -471,7 +467,6 @@ Item {
opacity: 1
visible: true
}
},
State {
name: "activeScene"
@ -492,7 +487,6 @@ Item {
opacity: 0
visible: false
}
}
]
transitions: [
@ -519,7 +513,6 @@ Item {
duration: 250
easing.type: Easing.OutQuart
}
},
Transition {
to: "activeWidget"
@ -545,11 +538,8 @@ Item {
property: "anchors.topMargin"
duration: 100
}
}
}
},
Transition {
to: "activeWallpaper"
@ -575,11 +565,8 @@ Item {
property: "anchors.topMargin"
duration: 100
}
}
}
},
Transition {
to: "activeScene"
@ -604,11 +591,8 @@ Item {
property: "anchors.topMargin"
duration: 100
}
}
}
}
]
}

View File

@ -3,9 +3,10 @@ import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlay.Enums.FillMode 1.0
import "../Common/" as SP
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.FillMode
import ScreenPlayUtil as Util
ColumnLayout {
id: root
@ -27,15 +28,10 @@ ColumnLayout {
state: "hidden"
clip: true
onWallpaperChanged: {
if (!wallpaper) {
slPlaybackRate.slider.value = 1;
return ;
}
slVolume.slider.value = wallpaper.volume;
slPlaybackRate.slider.value = wallpaper.playbackRate;
}
SP.Slider {
Util.Slider {
id: slVolume
headline: qsTr("Volume")
@ -44,16 +40,16 @@ ColumnLayout {
Layout.leftMargin: 10
Layout.rightMargin: 10
slider.onValueChanged: {
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(activeMonitorIndex, "volume", (Math.round(slVolume.slider.value * 100) / 100));
App.screenPlayManager.setWallpaperValueAtMonitorIndex(activeMonitorIndex, "volume", (Math.round(slVolume.slider.value * 100) / 100));
}
}
SP.Slider {
Util.Slider {
id: slCurrentVideoTime
headline: qsTr("Current Video Time")
slider.onValueChanged: ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(activeMonitorIndex, "currentTime", (Math.round(slCurrentVideoTime.slider.value * 100) / 100))
slider.onValueChanged: App.screenPlayManager.setWallpaperValueAtMonitorIndex(activeMonitorIndex, "currentTime", (Math.round(slCurrentVideoTime.slider.value * 100) / 100))
Layout.fillWidth: true
slider.stepSize: 0.1
Layout.leftMargin: 10
@ -70,7 +66,7 @@ ColumnLayout {
id: txtComboBoxFillMode
text: qsTr("Fill Mode")
font.family: ScreenPlay.settings.font
font.family: App.settings.font
verticalAlignment: Text.AlignVCenter
font.pointSize: 10
color: "#626262"
@ -85,7 +81,7 @@ ColumnLayout {
Layout.leftMargin: 10
textRole: "text"
valueRole: "value"
currentIndex: root.indexOfValue(settingsComboBox.model, ScreenPlay.settings.videoFillMode)
currentIndex: root.indexOfValue(settingsComboBox.model, App.settings.videoFillMode)
model: [{
"value": FillMode.Stretch,
"text": qsTr("Stretch")
@ -103,7 +99,7 @@ ColumnLayout {
"text": qsTr("Scale_Down")
}]
onActivated: {
ScreenPlay.screenPlayManager.setWallpaperFillModeAtMonitorIndex(activeMonitorIndex,settingsComboBox.currentValue);
App.screenPlayManager.setWallpaperFillModeAtMonitorIndex(activeMonitorIndex,settingsComboBox.currentValue);
}
}

View File

@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Rectangle {
id: root
@ -12,11 +13,18 @@ Rectangle {
property int fontSize: 12
property bool monitorWithoutContentSelectable: true
property bool multipleMonitorsSelectable: false
property bool isSelected: false
// We preselect the main monitor
property var activeMonitors: [0]
property var activeMonitors: []
property alias background: root.color
property alias radius: root.radius
Component.onCompleted: {
resize()
selectOnly(0)
}
signal requestProjectSettings(var index, var installedType, var appID)
function selectOnly(index) {
@ -27,6 +35,7 @@ Rectangle {
}
rp.itemAt(i).isSelected = false
}
getActiveMonitors()
}
function reset() {
@ -46,6 +55,7 @@ Rectangle {
// 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
}
@ -61,7 +71,7 @@ Rectangle {
}
function resize() {
var absoluteDesktopSize = ScreenPlay.monitorListModel.absoluteDesktopSize()
var absoluteDesktopSize = App.monitorListModel.absoluteDesktopSize()
var isWidthGreaterThanHeight = false
var windowsDelta = 0
if (absoluteDesktopSize.width < absoluteDesktopSize.height) {
@ -105,16 +115,13 @@ Rectangle {
width: parent.width
clip: true
layer.enabled: true
Component.onCompleted: {
resize()
}
Connections {
function onMonitorReloadCompleted() {
resize()
}
target: ScreenPlay.monitorListModel
target: App.monitorListModel
}
Flickable {
@ -130,7 +137,7 @@ Rectangle {
property int contentWidth
property int contentHeight
model: ScreenPlay.monitorListModel
model: App.monitorListModel
delegate: MonitorSelectionItem {
id: delegate

View File

@ -1,8 +1,9 @@
import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlay.Enums.InstalledType 1.0
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.InstalledType
Item {
id: root
@ -42,7 +43,7 @@ Item {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pointSize: root.fontSize
font.family: ScreenPlay.settings.font
font.family: App.settings.font
wrapMode: Text.WrapAnywhere
anchors {

View File

@ -4,11 +4,12 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlay.Enums.InstalledType 1.0
import "../Common/" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.InstalledType
import ScreenPlayUtil as Util
Common.Popup {
Util.Popup {
id: root
property string activeMonitorName: ""
@ -25,7 +26,7 @@ Common.Popup {
root.open()
}
target: ScreenPlay.util
target: App.util
}
Item {
@ -56,7 +57,7 @@ Common.Popup {
text: qsTr("Wallpaper Configuration")
font.pointSize: 21
color: Material.primaryTextColor
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Light
width: 400
@ -82,13 +83,13 @@ Common.Popup {
if (installedType === InstalledType.VideoWallpaper) {
videoControlWrapper.state = "visible"
customPropertiesGridView.visible = false
const wallpaper = ScreenPlay.screenPlayManager.getWallpaperByAppID(
const wallpaper = App.screenPlayManager.getWallpaperByAppID(
appID)
videoControlWrapper.wallpaper = wallpaper
} else {
videoControlWrapper.state = "hidden"
customPropertiesGridView.visible = true
if (!ScreenPlay.screenPlayManager.requestProjectSettingsAtMonitorIndex(
if (!App.screenPlayManager.requestProjectSettingsAtMonitorIndex(
index)) {
console.warn("Unable to get requested settings from index: ",
index)
@ -109,7 +110,7 @@ Common.Popup {
customPropertiesGridView.projectSettingsListmodelRef = listModel
}
target: ScreenPlay.screenPlayManager
target: App.screenPlayManager
}
}
@ -128,11 +129,11 @@ Common.Popup {
Material.background: Material.accent
highlighted: true
text: qsTr("Remove selected")
font.family: ScreenPlay.settings.font
font.family: App.settings.font
enabled: monitorSelection.activeMonitors.length == 1
&& ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
&& App.screenPlayManager.activeWallpaperCounter > 0
onClicked: {
if (!ScreenPlay.screenPlayManager.removeWallpaperAt(
if (!App.screenPlayManager.removeWallpaperAt(
monitorSelection.activeMonitors[0]))
print("Unable to close singel wallpaper")
}
@ -142,14 +143,14 @@ Common.Popup {
id: btnRemoveAllWallpape
text: qsTr("Remove all ")
+ ScreenPlay.screenPlayManager.activeWallpaperCounter + " " + qsTr(
+ App.screenPlayManager.activeWallpaperCounter + " " + qsTr(
"Wallpapers")
Material.background: Material.accent
highlighted: true
font.family: ScreenPlay.settings.font
enabled: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
font.family: App.settings.font
enabled: App.screenPlayManager.activeWallpaperCounter > 0
onClicked: {
if (!ScreenPlay.screenPlayManager.removeAllWallpapers())
if (!App.screenPlayManager.removeAllWallpapers())
print("Unable to close all wallpaper!")
root.close()
@ -160,15 +161,15 @@ Common.Popup {
id: btnRemoveAllWidgets
text: qsTr("Remove all ")
+ ScreenPlay.screenPlayManager.activeWidgetsCounter + " " + qsTr(
+ App.screenPlayManager.activeWidgetsCounter + " " + qsTr(
"Widgets")
Material.background: Material.accent
Material.foreground: Material.primaryTextColor
highlighted: true
font.family: ScreenPlay.settings.font
enabled: ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
font.family: App.settings.font
enabled: App.screenPlayManager.activeWidgetsCounter > 0
onClicked: {
if (!ScreenPlay.screenPlayManager.removeAllWidgets())
if (!App.screenPlayManager.removeAllWidgets())
print("Unable to close all widgets!")
root.close()
@ -243,7 +244,7 @@ Common.Popup {
height: width
icon.width: 16
icon.height: 16
icon.source: "qrc:/assets/icons/font-awsome/close.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/font-awsome/close.svg"
icon.color: Material.iconColor
onClicked: root.close()
@ -264,7 +265,7 @@ Common.Popup {
saveNotification.open()
}
target: ScreenPlay.screenPlayManager
target: App.screenPlayManager
}
}
}

View File

@ -4,7 +4,8 @@ import Qt5Compat.GraphicalEffects
import Qt.labs.platform 1.1
import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: root
@ -26,7 +27,7 @@ Item {
width: 100
font.pointSize: root.isHeadline ? 18 : 12
anchors.verticalCenter: parent.verticalCenter
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.weight: Font.Normal
color: root.isHeadline ? Qt.darker(Material.foreground) : Material.foreground
@ -111,7 +112,7 @@ Item {
"type": "checkBox"
};
root.save(obj);
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, checkbox.checked);
App.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, checkbox.checked);
}
anchors {
@ -180,7 +181,7 @@ Item {
"type": "color"
};
root.save(obj);
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, tmpColor);
App.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, tmpColor);
}
}
@ -222,7 +223,7 @@ Item {
"stepSize": root.stepSize
};
root.save(obj);
ScreenPlay.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, value);
App.screenPlayManager.setWallpaperValueAtMonitorIndex(selectedMonitor, name, value);
}
anchors {
@ -240,7 +241,7 @@ Item {
color: Material.foreground
horizontalAlignment: Text.AlignRight
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
right: parent.right

View File

@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Rectangle {
id: root
@ -38,7 +39,7 @@ Rectangle {
Text {
text: qsTr("Profile saved successfully!")
color: "white"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.pointSize: 14
verticalAlignment: Qt.AlignVCenter

View File

@ -5,9 +5,9 @@ import QtQuick.Window
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import "../Workshop"
import "../Common"
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Rectangle {
id: root
@ -67,86 +67,101 @@ Rectangle {
onPageChanged(nav)
}
target: ScreenPlay.util
target: App.util
}
Row {
TabBar {
id: row
height: 60
height: 50
currentIndex: 2
anchors {
top: parent.top
right: parent.right
bottom: parent.bottom
left: parent.left
leftMargin: 20
}
spacing: 0
NavigationItem {
TabButton {
id: navCreate
state: "inactive"
name: "Create"
text: qsTr("Create")
iconSource: "qrc:/assets/icons/icon_plus.svg"
onPageClicked: function (name) {
root.onPageChanged(name)
icon.height: 16
icon.width: 16
font.pointSize: 12
height: parent.height
width: implicitWidth
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_plus.svg"
onClicked: {
root.onPageChanged("Create")
}
objectName: "createTab"
background: Item {}
}
NavigationItem {
TabButton {
id: navWorkshop
state: "inactive"
name: "Workshop"
enabled: App.settings.steamVersion
text: qsTr("Workshop")
iconSource: "qrc:/assets/icons/icon_steam.svg"
onPageClicked: function (name) {
root.onPageChanged(name)
icon.height: 16
icon.width: 16
font.pointSize: 12
height: parent.height
width: implicitWidth
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_steam.svg"
onClicked: {
root.onPageChanged("Workshop")
}
objectName: "workshopTab"
background: Item {}
}
NavigationItem {
TabButton {
id: navInstalled
state: "active"
name: "Installed"
text: qsTr("Installed")
amount: ScreenPlay.installedListModel.count
iconSource: "qrc:/assets/icons/icon_installed.svg"
onPageClicked: function (name) {
root.onPageChanged(name)
text: qsTr("Installed") + " " + App.installedListModel.count
icon.height: 16
icon.width: 16
font.pointSize: 12
height: parent.height
width: implicitWidth
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_installed.svg"
onClicked: {
root.onPageChanged("Installed")
}
objectName: "installedTab"
background: Item {}
}
NavigationItem {
TabButton {
id: navCommunity
state: "inactive"
name: "Community"
text: qsTr("Community")
iconSource: "qrc:/assets/icons/icon_community.svg"
onPageClicked: function (name) {
root.onPageChanged(name)
icon.height: 16
icon.width: 16
font.pointSize: 12
height: parent.height
width: implicitWidth
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_community.svg"
onClicked: {
root.onPageChanged("Community")
}
objectName: "communityTab"
background: Item {}
}
NavigationItem {
TabButton {
id: navSettings
state: "inactive"
name: "Settings"
text: qsTr("Settings")
iconSource: "qrc:/assets/icons/icon_settings.svg"
onPageClicked: function (name) {
root.onPageChanged(name)
icon.height: 16
icon.width: 16
font.pointSize: 12
height: parent.height
width: implicitWidth
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_settings.svg"
onClicked: {
root.onPageChanged("Settings")
}
objectName: "settingsTab"
background: Item {}
}
}
@ -171,7 +186,7 @@ Rectangle {
}
ToolButton {
icon.source: "qrc:/assets/icons/font-awsome/patreon-brands.svg"
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")
@ -187,8 +202,8 @@ Rectangle {
bottom: parent.bottom
}
property bool contentActive: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
|| ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
property bool contentActive: App.screenPlayManager.activeWallpaperCounter > 0
|| App.screenPlayManager.activeWidgetsCounter > 0
onContentActiveChanged: {
if (!contentActive) {
@ -200,7 +215,7 @@ Rectangle {
ToolButton {
id: miMuteAll
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/assets/icons/icon_volume.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume.svg"
icon.width: root.iconWidth
icon.height: root.iconHeight
enabled: quickActionRow.contentActive
@ -209,12 +224,12 @@ Rectangle {
property bool soundEnabled: true
onSoundEnabledChanged: {
if (miMuteAll.soundEnabled) {
miMuteAll.icon.source = "qrc:/assets/icons/icon_volume.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume.svg"
App.screenPlayManager.setAllWallpaperValue("muted",
"false")
} else {
miMuteAll.icon.source = "qrc:/assets/icons/icon_volume_mute.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue("muted",
miMuteAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_volume_mute.svg"
App.screenPlayManager.setAllWallpaperValue("muted",
"true")
}
}
@ -227,19 +242,19 @@ Rectangle {
id: miStopAll
enabled: quickActionRow.contentActive
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/assets/icons/icon_pause.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_pause.svg"
icon.width: root.iconWidth
icon.height: root.iconHeight
onClicked: isPlaying = !isPlaying
property bool isPlaying: true
onIsPlayingChanged: {
if (miStopAll.isPlaying) {
miStopAll.icon.source = "qrc:/assets/icons/icon_pause.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue(
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_pause.svg"
App.screenPlayManager.setAllWallpaperValue(
"isPlaying", "true")
} else {
miStopAll.icon.source = "qrc:/assets/icons/icon_play.svg"
ScreenPlay.screenPlayManager.setAllWallpaperValue(
miStopAll.icon.source = "qrc:/qml/ScreenPlayApp/assets/icons/icon_play.svg"
App.screenPlayManager.setAllWallpaperValue(
"isPlaying", "false")
}
}
@ -252,13 +267,12 @@ Rectangle {
id: miCloseAll
enabled: quickActionRow.contentActive
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/assets/icons/icon_close.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_close.svg"
icon.width: root.iconWidth
icon.height: root.iconHeight
icon.color: Material.iconColor
onClicked: {
ScreenPlay.screenPlayManager.removeAllWallpapers()
ScreenPlay.screenPlayManager.removeAllWidgets()
App.screenPlayManager.removeAllWallpapers()
App.screenPlayManager.removeAllWidgets()
miStopAll.isPlaying = true
miMuteAll.soundEnabled = true
}
@ -271,10 +285,10 @@ Rectangle {
ToolButton {
id: miConfig
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/assets/icons/icon_video_settings_black_24dp.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_video_settings_black_24dp.svg"
icon.width: root.iconWidth
icon.height: root.iconHeight
onClicked: ScreenPlay.util.setToggleWallpaperConfiguration()
onClicked: App.util.setToggleWallpaperConfiguration()
hoverEnabled: true
ToolTip.text: qsTr("Configure Wallpaper")
ToolTip.visible: hovered

View File

@ -1,191 +0,0 @@
import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material
import ScreenPlay 1.0
Item {
id: navigationItem
property string iconSource: "qrc:/assets/icons/icon_installed.svg"
property string name
property alias text: txt.text
property alias amount: txtAmount.text
property bool enabled: true
signal pageClicked(string name)
function setActive(isActive) {
if (isActive)
navigationItem.state = "active";
else
navigationItem.state = "inactive";
}
width: txtAmount.paintedWidth + txt.paintedWidth + icon.paintedWidth + 40
height: 60
state: "inactive"
onEnabledChanged: {
if (!enabled) {
navigationItem.width = 0;
navigationItem.opacity = 0;
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
navigationItem.pageClicked(navigationItem.name);
}
Image {
id: icon
source: iconSource
width: 16
height: 16
sourceSize.height: 16
sourceSize.width: 16
fillMode: Image.PreserveAspectFit
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
}
Text {
id: txtAmount
anchors.left: icon.right
anchors.leftMargin: 10
font.pointSize: 14
color: Material.primaryTextColor
anchors.verticalCenter: parent.verticalCenter
font.family: ScreenPlay.settings.font
font.weight: Font.Normal
text: ""
}
Text {
id: txt
anchors.left: txtAmount.right
anchors.leftMargin: navigationItem.amount == "" ? 0 : 5
text: "name"
font.pointSize: 12
color: Material.primaryTextColor
anchors.verticalCenter: parent.verticalCenter
font.family: ScreenPlay.settings.font
font.weight: Font.Normal
}
ColorOverlay {
id: iconColorOverlay
anchors.fill: icon
source: icon
color: Material.accentColor
}
Rectangle {
id: navIndicator
y: 83
height: 3
color: Material.accent
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
}
}
Behavior on width {
PropertyAnimation {
duration: 50
}
}
states: [
State {
name: "active"
PropertyChanges {
target: navIndicator
anchors.bottomMargin: 0
}
PropertyChanges {
target: iconColorOverlay
color: Material.accent
}
},
State {
name: "disabled"
PropertyChanges {
target: navIndicator
anchors.bottomMargin: -3
}
PropertyChanges {
target: iconColorOverlay
color: "#00000000"
}
},
State {
name: "inactive"
PropertyChanges {
target: navIndicator
anchors.bottomMargin: -3
}
PropertyChanges {
target: iconColorOverlay
color: "#00000000"
}
}
]
transitions: [
Transition {
from: "*"
to: "active"
NumberAnimation {
properties: "anchors.bottomMargin"
duration: 200
easing.type: Easing.OutQuart
}
},
Transition {
from: "*"
to: "disabled"
NumberAnimation {
properties: "anchors.bottomMargin"
duration: 200
easing.type: Easing.OutQuart
}
},
Transition {
from: "*"
to: "inactive"
NumberAnimation {
properties: "anchors.bottomMargin"
duration: 100
easing.type: Easing.OutQuart
}
}
]
}

View File

@ -5,9 +5,9 @@ import QtQuick.Window
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlay 1.0
import "../Workshop"
import "../Common" as Common
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
Rectangle {
id: root
@ -19,8 +19,8 @@ Rectangle {
Text {
id: title
text: qsTr("ScreenPlay Alpha %1 - Open Source Wallpaper And Widgets").arg(
ScreenPlay.version())
text: qsTr("ScreenPlay Alpha V%1 - Open Source Wallpaper And Widgets").arg(
App.version())
color: Material.primaryTextColor
verticalAlignment: Text.AlignVCenter
@ -47,7 +47,7 @@ Rectangle {
}
onPositionChanged: {
if (mouseArea.pressed) {
let pos = ScreenPlay.cursorPos()
let pos = App.cursorPos()
window.setX(pos.x - clickPos.x)
window.setY(pos.y - clickPos.y)
}
@ -64,16 +64,16 @@ Rectangle {
WindowNavButton {
id: miMinimize
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/assets/icons/icon_minimize.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_minimize.svg"
onClicked: root.window.hide()
}
WindowNavButton {
id: miquit
Layout.alignment: Qt.AlignVCenter
icon.source: "qrc:/assets/icons/icon_close.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_close.svg"
onClicked: {
if (ScreenPlay.screenPlayManager.activeWallpaperCounter === 0
&& ScreenPlay.screenPlayManager.activeWidgetsCounter === 0) {
if (App.screenPlayManager.activeWallpaperCounter === 0
&& App.screenPlayManager.activeWidgetsCounter === 0) {
Qt.quit()
return
}
@ -82,10 +82,10 @@ Rectangle {
}
}
Common.Dialog {
Util.Dialog {
id: dialog
modalSource: root.modalSource
title: qsTr("Are you sure you want to exit ScreenPlay? \nThis will shut down all Wallpaper and Widgets.")
title: qsTr("Are you sure you want to exit ScreenPlay? This will shut down all Wallpaper and Widgets. If you want your Wallpaper to continue playing, press the minimize button.")
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: Qt.quit()
}

View File

@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: settingsBool
@ -31,7 +32,7 @@ Item {
color: Material.foreground
text: settingsBool.headline
font.family: ScreenPlay.settings.font
font.family: App.settings.font
font.pointSize: 12
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
@ -60,7 +61,7 @@ Item {
color: Material.theme === Material.Light ? Qt.lighter(
Material.foreground) : Qt.darker(
Material.foreground)
font.family: ScreenPlay.settings.font
font.family: App.settings.font
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pointSize: 10

View File

@ -4,10 +4,11 @@ import Qt.labs.platform
import QtQuick.Controls.Material
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import ScreenPlay 1.0
import ScreenPlay.Enums.FillMode 1.0
import Settings 1.0
import "../Common"
import ScreenPlayApp
import ScreenPlay
import ScreenPlay.Enums.FillMode
import Settings
import ScreenPlayUtil
Item {
id: root
@ -31,6 +32,9 @@ Item {
contentHeight: columnWrapper.childrenRect.height
contentWidth: 800
flickableDirection: Flickable.VerticalFlick
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
anchors {
top: parent.top
@ -55,26 +59,17 @@ Item {
text: qsTr("General")
}
contentItem: Column {
id: columnGeneral
Column {
anchors.fill: parent
anchors.margins: 20
spacing: 20
anchors {
top: headerGeneral.bottom
topMargin: 20
right: parent.right
left: parent.left
leftMargin: 20
rightMargin: 20
}
SettingBool {
headline: qsTr("Autostart")
description: qsTr("ScreenPlay will start with Windows and will setup your Desktop every time for you.")
isChecked: ScreenPlay.settings.autostart
isChecked: App.settings.autostart
onCheckboxChanged: function (checked) {
ScreenPlay.settings.setAutostart(checked)
App.settings.setAutostart(checked)
}
}
@ -84,9 +79,9 @@ Item {
headline: qsTr("High priority Autostart")
available: false
description: qsTr("This options grants ScreenPlay a higher autostart priority than other apps.")
isChecked: ScreenPlay.settings.highPriorityStart
isChecked: App.settings.highPriorityStart
onCheckboxChanged: {
ScreenPlay.settings.setHighPriorityStart(checked)
App.settings.setHighPriorityStart(checked)
}
}
@ -96,9 +91,9 @@ Item {
height: 70
headline: qsTr("Send anonymous crash reports and statistics")
description: qsTr("Help us make ScreenPlay faster and more stable. All collected data is purely anonymous and only used for development purposes! We use <a href=\"https://sentry.io\">sentry.io</a> to collect and analyze this data. A <b>big thanks to them</b> for providing us with free premium support for open source projects!")
isChecked: ScreenPlay.settings.anonymousTelemetry
isChecked: App.settings.anonymousTelemetry
onCheckboxChanged: function (checked) {
ScreenPlay.settings.setAnonymousTelemetry(checked)
App.settings.setAnonymousTelemetry(checked)
}
}
@ -109,7 +104,7 @@ Item {
buttonText: qsTr("Set location")
description: {
// Remove file:/// so the used does not get confused
let path = ScreenPlay.globalVariables.localStoragePath + ""
let path = App.globalVariables.localStoragePath + ""
if (path.length === 0)
return qsTr("Your storage path is empty!")
else
@ -121,9 +116,9 @@ Item {
FolderDialog {
id: folderDialogSaveLocation
folder: ScreenPlay.globalVariables.localStoragePath
folder: App.globalVariables.localStoragePath
onAccepted: {
ScreenPlay.settings.setLocalStoragePath(
App.settings.setLocalStoragePath(
folderDialogSaveLocation.currentFolder)
}
}
@ -136,7 +131,7 @@ Item {
color: Qt.darker(Material.foreground)
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.pointSize: 10
font.family: ScreenPlay.settings.font
font.family: App.settings.font
height: 30
anchors {
@ -157,7 +152,7 @@ Item {
Component.onCompleted: {
settingsLanguage.comboBox.currentIndex = root.indexOfValue(
settingsLanguage.comboBox.model,
ScreenPlay.settings.language)
App.settings.language)
}
comboBox {
@ -202,9 +197,9 @@ Item {
"text": "Dutch"
}]
onActivated: {
ScreenPlay.settings.setLanguage(
App.settings.setLanguage(
settingsLanguage.comboBox.currentValue)
ScreenPlay.settings.retranslateUI()
App.settings.retranslateUI()
}
}
}
@ -219,7 +214,7 @@ Item {
Component.onCompleted: {
settingsTheme.comboBox.currentIndex = root.indexOfValue(
settingsTheme.comboBox.model,
ScreenPlay.settings.theme)
App.settings.theme)
}
comboBox {
@ -234,7 +229,7 @@ Item {
"text": qsTr("Light")
}]
onActivated: {
ScreenPlay.settings.setTheme(
App.settings.setTheme(
settingsTheme.comboBox.currentValue)
}
}
@ -248,30 +243,20 @@ Item {
id: headerPerformance
text: qsTr("Performance")
image: "qrc:/assets/icons/icon_build.svg"
image: "qrc:/qml/ScreenPlayApp/assets/icons/icon_build.svg"
}
contentItem: Column {
id: perfomanceWrapper
Column {
anchors.fill: parent
anchors.margins: 20
spacing: 20
anchors {
top: headerPerformance.bottom
topMargin: 20
right: parent.right
left: parent.left
leftMargin: 20
rightMargin: 20
}
SettingBool {
headline: qsTr("Pause wallpaper video rendering while another app is in the foreground")
description: qsTr("We disable the video rendering (not the audio!) for the best performance. If you have problem you can disable this behaviour here. Wallpaper restart required!")
isChecked: ScreenPlay.settings.checkWallpaperVisible
isChecked: App.settings.checkWallpaperVisible
onCheckboxChanged: function (checked) {
ScreenPlay.settings.setCheckWallpaperVisible(
checked)
App.settings.setCheckWallpaperVisible(checked)
}
}
@ -285,11 +270,11 @@ Item {
Component.onCompleted: {
cbVideoFillMode.comboBox.currentIndex = root.indexOfValue(
cbVideoFillMode.comboBox.model,
ScreenPlay.settings.videoFillMode)
App.settings.videoFillMode)
}
comboBox {
onActivated: ScreenPlay.settings.setVideoFillMode(
onActivated: App.settings.setVideoFillMode(
cbVideoFillMode.comboBox.currentValue)
model: [{
"value": FillMode.Stretch,
@ -318,23 +303,14 @@ Item {
id: headerAbout
text: qsTr("About")
image: "qrc:/assets/icons/icon_cake.svg"
image: "qrc:/qml/ScreenPlayApp/assets/icons/icon_cake.svg"
}
contentItem: Column {
id: aboutWrapper
Column {
anchors.fill: parent
anchors.margins: 20
spacing: 20
anchors {
top: headerAbout.bottom
topMargin: 20
right: parent.right
left: parent.left
leftMargin: 20
rightMargin: 20
}
Column {
id: settingsAboutrapperWrapper
@ -354,7 +330,7 @@ Item {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pointSize: 16
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: parent.top
@ -373,7 +349,7 @@ Item {
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignLeft
font.pointSize: 11
font.family: ScreenPlay.settings.font
font.family: App.settings.font
width: parent.width * 0.6
anchors {
@ -398,31 +374,31 @@ Item {
}
GrowIconLink {
iconSource: "qrc:/assets/icons/brand_github.svg"
iconSource: "qrc:/qml/ScreenPlayApp/assets/icons/brand_github.svg"
url: "https://github.com/kelteseth"
color: "#333333"
}
GrowIconLink {
iconSource: "qrc:/assets/icons/brand_gitlab.svg"
iconSource: "qrc:/qml/ScreenPlayApp/assets/icons/brand_gitlab.svg"
url: "https://gitlab.com/kelteseth"
color: "#FC6D26"
}
GrowIconLink {
iconSource: "qrc:/assets/icons/brand_twitter.svg"
iconSource: "qrc:/qml/ScreenPlayApp/assets/icons/brand_twitter.svg"
url: "https://twitter.com/Kelteseth"
color: "#1DA1F2"
}
GrowIconLink {
iconSource: "qrc:/assets/icons/brand_twitch.svg"
iconSource: "qrc:/qml/ScreenPlayApp/assets/icons/brand_twitch.svg"
url: "https://www.twitch.tv/kelteseth/"
color: "#6441A5"
}
GrowIconLink {
iconSource: "qrc:/assets/icons/brand_reddit.svg"
iconSource: "qrc:/qml/ScreenPlayApp/assets/icons/brand_reddit.svg"
url: "https://www.reddit.com/r/ScreenPlayApp/"
color: "#FF4500"
}
@ -448,7 +424,7 @@ Item {
Image {
id: mask
source: "qrc:/assets/images/mask_round.svg"
source: "qrc:/qml/ScreenPlayApp/assets/images/mask_round.svg"
sourceSize: Qt.size(width, height)
smooth: true
width: 120
@ -470,10 +446,9 @@ Item {
SettingsHorizontalSeperator {}
SettingsButton {
icon.source: "qrc:/assets/icons/icon_launch.svg"
icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_launch.svg"
headline: qsTr("Version")
description: qsTr("ScreenPlay Build Version \n")
+ ScreenPlay.settings.gitBuildHash
description: qsTr("ScreenPlay Build Version \n") + App.settings.gitBuildHash
buttonText: qsTr("Open Changelog")
onButtonPressed: Qt.openUrlExternally(
"https://gitlab.com/kelteseth/ScreenPlay/-/releases")
@ -486,7 +461,7 @@ Item {
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
buttonText: qsTr("Licenses")
onButtonPressed: {
ScreenPlay.util.requestAllLicenses()
App.util.requestAllLicenses()
expanderCopyright.toggle()
}
}
@ -499,7 +474,7 @@ Item {
expanderCopyright.text = licensesText
}
target: ScreenPlay.util
target: App.util
}
}
@ -517,7 +492,7 @@ Item {
SettingsExpander {
id: expanderDebug
text: ScreenPlay.util.debugMessages
text: App.util.debugMessages
}
SettingsHorizontalSeperator {}
@ -527,7 +502,7 @@ Item {
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: {
ScreenPlay.util.requestDataProtection()
App.util.requestDataProtection()
expanderDataProtection.toggle()
}
}
@ -540,15 +515,11 @@ Item {
expanderDataProtection.text = dataProtectionText
}
target: ScreenPlay.util
target: App.util
}
}
}
}
}
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
}
}
}

View File

@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: settingsButton
@ -37,7 +38,7 @@ Item {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pointSize: 12
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: parent.top
@ -57,7 +58,7 @@ Item {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft
font.pointSize: 10
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: txtHeadline.bottom
@ -76,7 +77,7 @@ Item {
text: settingsButton.buttonText
icon.width: 20
icon.height: 20
font.family: ScreenPlay.settings.font
font.family: App.settings.font
Material.background: Material.accent
Material.foreground: "white"
onPressed: buttonPressed()

View File

@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Control {
id: settingsComboBox
@ -23,7 +24,7 @@ Control {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pointSize: 12
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: parent.top
@ -43,7 +44,7 @@ Control {
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap
font.pointSize: 10
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: txtHeadline.bottom
@ -62,7 +63,7 @@ Control {
implicitWidth: 200
textRole: "text"
valueRole: "value"
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
right: parent.right

View File

@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.Material
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: root
@ -32,7 +33,7 @@ Item {
lineHeight: 1.2
height: txtExpander.paintedHeight
wrapMode: Text.WordWrap
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: parent.top
@ -63,7 +64,7 @@ Item {
MenuItem {
text: qsTr("Copy text to clipboard")
onClicked: {
ScreenPlay.util.copyToClipboard(txtExpander.text);
App.util.copyToClipboard(txtExpander.text);
}
}

View File

@ -1,14 +1,15 @@
import QtQuick
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import ScreenPlay 1.0
import ScreenPlayApp
import ScreenPlay
Item {
id: settingsHeader
property color background: "#FFAB00"
property string text: "HEADLINE"
property url image: "qrc:/assets/icons/icon_settings.svg"
property url image: "qrc:/qml/ScreenPlayApp/assets/icons/icon_settings.svg"
state: "out"
Component.onCompleted: state = "in"
@ -80,7 +81,7 @@ Item {
font.pointSize: 12
color: "white"
verticalAlignment: Text.AlignTop
font.family: ScreenPlay.settings.font
font.family: App.settings.font
anchors {
top: parent.top

View File

@ -7,7 +7,7 @@ import QtQuick.Controls.Material.impl
Page {
width: parent.width
height: contentHeight + header.height + 30 * 3
height: contentHeight + header.height + 60
Material.elevation: 4
background: Rectangle {
@ -19,7 +19,5 @@ Page {
layer.effect: ElevationEffect {
elevation: 4
}
}
}

View File

@ -5,6 +5,7 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import Settings
import ScreenPlay
import ScreenPlayWorkshop
Item {
id: root
@ -12,13 +13,13 @@ Item {
property Item modalSource
Component.onCompleted: {
if (ScreenPlay.settings.steamVersion) {
if (App.settings.steamVersion) {
workshopLoader.setSource(
"qrc:/ScreenPlayQml/qml/Workshop/SteamWorkshop.qml", {
"qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshop.qml", {
"modalSource": modalSource
})
} else {
workshopLoader.setSource("qrc:/ScreenPlayQml/qml/Workshop/Forum.qml")
workshopLoader.setSource("qrc:/qml/ScreenPlayWorkshop/qml/Forum.qml")
}
}

View File

@ -1,4 +1,4 @@
#include "app.h"
#include "ScreenPlay/app.h"
#include "steam/steam_qt_enums_generated.h"
#include <QProcessEnvironment>
@ -58,48 +58,29 @@ App::App()
m_continuousIntegrationMetricsTimer.start();
QGuiApplication::setWindowIcon(QIcon(":/assets/icons/app.ico"));
QGuiApplication::setWindowIcon(QIcon(":/qml/ScreenPlayApp/assets/icons/app.ico"));
QGuiApplication::setOrganizationName("ScreenPlay");
QGuiApplication::setOrganizationDomain("screen-play.app");
QGuiApplication::setApplicationName("ScreenPlay");
QGuiApplication::setApplicationVersion(QVersionNumber(0, 15, 0).toString());
QGuiApplication::setQuitOnLastWindowClosed(false);
QFontDatabase::addApplicationFont(":/assets/fonts/LibreBaskerville-Italic.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/Roboto-Light.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/Roboto-Regular.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/Roboto-Thin.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/RobotoMono-Light.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/RobotoMono-Thin.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/NotoSans-Thin.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/NotoSans-Regular.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/NotoSans-Medium.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/NotoSans-Light.ttf");
QFontDatabase::addApplicationFont(":/assets/fonts/NotoSansCJKkr-Regular.otf");
QString fontsPath = QGuiApplication::instance()->applicationDirPath() + "/assets/fonts/";
#if defined(Q_OS_OSX)
fontsPath = QGuiApplication::instance()->applicationDirPath() + "/../Resources/fonts/";
#endif
const QDir fontsDir(fontsPath);
if (!fontsDir.isEmpty() && fontsDir.exists()) {
QDirIterator it(fontsPath, { "*.ttf", "*.otf" }, QDir::Files);
while (it.hasNext()) {
QFontDatabase::addApplicationFont(it.next());
}
} else {
qWarning() << "Unable to load font from: " << fontsPath;
}
QQuickWindow::setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering);
qRegisterMetaType<QQmlApplicationEngine*>();
qRegisterMetaType<GlobalVariables*>();
qRegisterMetaType<ScreenPlayManager*>();
qRegisterMetaType<Util*>();
qRegisterMetaType<Create*>();
qRegisterMetaType<Settings*>();
qmlRegisterType<ScreenPlayWallpaper>("ScreenPlay", 1, 0, "ScreenPlayWallpaper");
qmlRegisterType<ScreenPlayWidget>("ScreenPlay", 1, 0, "ScreenPlayWidget");
qRegisterMetaType<ScreenPlayWallpaper*>("ScreenPlayWallpaper*");
qRegisterMetaType<ScreenPlayWidget*>("ScreenPlayWidget*");
qRegisterMetaType<InstalledListModel*>();
qRegisterMetaType<InstalledListFilter*>();
qRegisterMetaType<MonitorListModel*>();
qRegisterMetaType<ProfileListModel*>();
// TODO: This is a workaround because I don't know how to
// init this in the ScreenPlayWorkshop plugin.
// Move to workshop plugin.
@ -133,13 +114,6 @@ App::App()
"SearchType",
"Error: only enums");
qmlRegisterAnonymousType<GlobalVariables>("ScreenPlay", 1);
qmlRegisterAnonymousType<ScreenPlayManager>("ScreenPlay", 1);
qmlRegisterAnonymousType<Util>("ScreenPlay", 1);
qmlRegisterAnonymousType<Create>("ScreenPlay", 1);
qmlRegisterAnonymousType<Wizards>("ScreenPlay", 1);
qmlRegisterAnonymousType<Settings>("ScreenPlay", 1);
// ScreenPlayManager first to check if another ScreenPlay Instace is running
m_screenPlayManager = std::make_unique<ScreenPlayManager>();
m_isAnotherScreenPlayInstanceRunning = m_screenPlayManager->isAnotherScreenPlayInstanceRunning();
@ -168,6 +142,7 @@ void App::init()
// Only create anonymousTelemetry if user did not disallow!
if (m_settings->anonymousTelemetry()) {
#if defined(Q_OS_WIN)
sentry_options_t* options = sentry_options_new();
sentry_options_set_dsn(options, "https://425ea0b77def4f91a5a9decc01b36ff4@o428218.ingest.sentry.io/5373419");
@ -183,6 +158,7 @@ void App::init()
if (sentryInitStatus != 0) {
qWarning() << "Unable to inti sentry crashhandler with statuscode: " << sentryInitStatus;
}
#endif
}
m_create = make_unique<Create>(m_globalVariables);
@ -203,20 +179,31 @@ void App::init()
// Init after we have the paths from settings
m_installedListModel->init();
auto* guiApplication = QGuiApplication::instance();
// Set visible if the -silent parameter was not set
if (QApplication::instance()->arguments().contains("-silent")) {
if (guiApplication->arguments().contains("-silent")) {
qInfo() << "Starting in silent mode.";
settings()->setSilentStart(true);
}
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "ScreenPlay", this);
QGuiApplication::instance()->addLibraryPath(QGuiApplication::instance()->applicationDirPath());
qmlRegisterSingletonInstance("ScreenPlay", 1, 0, "App", this);
m_mainWindowEngine->addImportPath(guiApplication->applicationDirPath() + "/qml");
#if defined(Q_OS_OSX)
QDir workingDir(guiApplication->applicationDirPath());
workingDir.cdUp();
workingDir.cdUp();
workingDir.cdUp();
// OSX Development workaround:
m_mainWindowEngine->addImportPath(workingDir.path()+"/qml");
#endif
guiApplication->addLibraryPath(guiApplication->applicationDirPath()+ "/qml");
if (m_settings->desktopEnvironment() == Settings::DesktopEnvironment::KDE) {
setupKDE();
}
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/ScreenPlayQml/main.qml")));
m_mainWindowEngine->load(QUrl(QStringLiteral("qrc:/qml/ScreenPlayApp/main.qml")));
// Must be called last to display a error message on startup by the qml engine
m_screenPlayManager->init(m_globalVariables, m_monitorListModel, m_settings);
@ -237,72 +224,110 @@ void App::exit()
QApplication::instance()->quit();
}
/*!
\brief
*/
bool App::setupKDE()
bool App::isKDEInstalled()
{
QProcessEnvironment env;
qInfo() << qgetenv("KDE_FULL_SESSION");
qInfo() << qgetenv("DESKTOP_SESSION");
qInfo() << qgetenv("XDG_CURRENT_DESKTOP");
QProcess plasmaShellVersionProcess;
plasmaShellVersionProcess.start("plasmashell", { "--version" });
plasmaShellVersionProcess.waitForFinished();
QString versionOut = plasmaShellVersionProcess.readAll();
if (!versionOut.contains("plasmashell ")) {
qWarning() << "Unable to read plasma shell version";
qWarning() << "Unable to read plasma shell version. ScreenPlay only works on KDE";
return false;
}
return true;
}
const QString kdeWallpaperPath = QDir(QDir::homePath() + "/.local/share/plasma/wallpapers/ScreenPlay/").canonicalPath();
const QFileInfo installedWallpaperMetadata(kdeWallpaperPath + "/metadata.desktop");
const QString appKdeWallapperPath = QGuiApplication::instance()->applicationDirPath() + "/kde";
const QFileInfo currentWallpaperMetadata(appKdeWallapperPath + "/ScreenPlay/metadata.desktop");
void App::installKDEWallpaper()
{
if (!installedWallpaperMetadata.exists()) {
process.setWorkingDirectory(appKdeWallapperPath);
process.start("plasmapkg2", { "--install", "ScreenPlay" });
process.waitForFinished();
process.terminate();
qInfo() << "Install ScreenPlay KDE Wallpaper";
} else {
QSettings installedWallpaperSettings(installedWallpaperMetadata.absoluteFilePath(), QSettings::Format::IniFormat);
installedWallpaperSettings.beginGroup("Desktop Entry");
const QString installedWallpaperVersion = installedWallpaperSettings.value("Version").toString();
installedWallpaperSettings.endGroup();
const QVersionNumber installedVersionNumber = QVersionNumber::fromString(installedWallpaperVersion);
qInfo() << "Install ScreenPlay KDE Wallpaper";
QProcess process;
process.setWorkingDirectory(m_appKdeWallapperPath);
process.start("plasmapkg2", { "--install", "ScreenPlay" });
process.waitForFinished();
process.terminate();
}
QSettings currentWallpaperSettings(currentWallpaperMetadata.absoluteFilePath(), QSettings::Format::IniFormat);
currentWallpaperSettings.beginGroup("Desktop Entry");
const QString currentWallpaperVersion = currentWallpaperSettings.value("Version").toString();
currentWallpaperSettings.endGroup();
const QVersionNumber currentVersionNumber = QVersionNumber::fromString(installedWallpaperVersion);
void App::upgradeKDEWallpaper()
{
if (installedVersionNumber.isNull() || currentVersionNumber.isNull()) {
qCritical() << "Unable to parse version number from:" << currentWallpaperVersion << installedWallpaperVersion;
return false;
}
if (installedVersionNumber <= currentVersionNumber)
return true;
qInfo() << "Upgrade ScreenPlay KDE Wallpaper";
process.setWorkingDirectory(appKdeWallapperPath);
process.start("plasmapkg2", { "--upgrade", "ScreenPlay" });
process.waitForFinished();
process.terminate();
qInfo() << process.readAllStandardError() << process.readAllStandardOutput();
}
qInfo() << "Upgrade ScreenPlay KDE Wallpaper";
QProcess process;
process.setWorkingDirectory(m_appKdeWallapperPath);
process.start("plasmapkg2", { "--upgrade", "ScreenPlay" });
process.waitForFinished();
process.terminate();
qInfo() << process.readAllStandardError() << process.readAllStandardOutput();
}
void App::restartKDE()
{
qInfo() << "Restart KDE ";
QProcess process;
process.start("kquitapp5", { "plasmashell" });
process.waitForFinished();
process.terminate();
qInfo() << process.readAllStandardError() << process.readAllStandardOutput();
process.startDetached("kstart5", { "plasmashell" });
qInfo() << process.readAllStandardError() << process.readAllStandardOutput();
return true;
}
std::optional<bool> App::isNewestKDEWallpaperInstalled()
{
QFileInfo installedWallpaperMetadata(m_kdeWallpaperPath + "/metadata.desktop");
QSettings installedWallpaperSettings(installedWallpaperMetadata.absoluteFilePath(), QSettings::Format::IniFormat);
installedWallpaperSettings.beginGroup("Desktop Entry");
const QString installedWallpaperVersion = installedWallpaperSettings.value("Version").toString();
installedWallpaperSettings.endGroup();
const QVersionNumber installedVersionNumber = QVersionNumber::fromString(installedWallpaperVersion);
QFileInfo currentWallpaperMetadata(m_appKdeWallapperPath + "/ScreenPlay/metadata.desktop");
QSettings currentWallpaperSettings(currentWallpaperMetadata.absoluteFilePath(), QSettings::Format::IniFormat);
currentWallpaperSettings.beginGroup("Desktop Entry");
const QString currentWallpaperVersion = currentWallpaperSettings.value("Version").toString();
currentWallpaperSettings.endGroup();
const QVersionNumber currentVersionNumber = QVersionNumber::fromString(currentWallpaperVersion);
qInfo() << "installedVersionNumber" << installedVersionNumber << "currentVersionNumber " << currentVersionNumber;
if (installedVersionNumber.isNull() || currentVersionNumber.isNull()) {
qInfo() << "Unable to parse version number from:" << currentWallpaperVersion << installedWallpaperVersion;
qInfo() << "Reinstall ScreenPlay Wallpaper";
return std::nullopt;
} else {
return { installedVersionNumber >= currentVersionNumber };
}
}
/*!
\brief
*/
bool App::setupKDE()
{
m_kdeWallpaperPath = QDir(QDir::homePath() + "/.local/share/plasma/wallpapers/ScreenPlay/").canonicalPath();
m_appKdeWallapperPath = QGuiApplication::instance()->applicationDirPath() + "/kde";
if (!isKDEInstalled())
return false;
QFileInfo installedWallpaperMetadata(m_kdeWallpaperPath + "/metadata.desktop");
if (!installedWallpaperMetadata.exists()) {
installKDEWallpaper();
restartKDE();
return true;
}
if (auto isNewer = isNewestKDEWallpaperInstalled()) {
if (!isNewer.value()) {
upgradeKDEWallpaper();
return true;
}
qInfo() << "All up to date!" << isNewer.value();
return true;
} else {
return false;
}
}
}

View File

@ -1,4 +1,4 @@
#include "create.h"
#include "ScreenPlay/create.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "createimportvideo.h"
#include "ScreenPlay/createimportvideo.h"
#include "ScreenPlayUtil/util.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "globalvariables.h"
#include "ScreenPlay/globalvariables.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "installedlistfilter.h"
#include "ScreenPlay/installedlistfilter.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "installedlistmodel.h"
#include "ScreenPlay/installedlistmodel.h"
#include <QDebug>
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "monitorlistmodel.h"
#include "ScreenPlay/monitorlistmodel.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "profilelistmodel.h"
#include "ScreenPlay/profilelistmodel.h"
#include <QDirIterator>
#include <QFileInfoList>

View File

@ -1,4 +1,4 @@
#include "projectsettingslistmodel.h"
#include "ScreenPlay/projectsettingslistmodel.h"
namespace ScreenPlay {

View File

@ -1,6 +1,5 @@
#include "screenplaymanager.h"
#include "ScreenPlay/screenplaymanager.h"
#include <QScopeGuard>
#include <doctest/doctest.h>
namespace ScreenPlay {
@ -93,10 +92,12 @@ void ScreenPlayManager::init(
});
QObject::connect(socket, &QWebSocket::disconnected, this, [this, socket]() {
m_connections.removeOne(socket);
setIsKDEConnected(false);
qInfo() << "Disconnected connection count: " << m_connections.count();
});
m_connections.push_back(socket);
setIsKDEConnected(true);
// socket->flush();
});
}
@ -171,7 +172,7 @@ bool ScreenPlayManager::createWallpaper(
for (auto& wallpaper : m_screenPlayWallpapers) {
if (wallpaper->screenNumber().length() == 1) {
if (monitors.at(0) == wallpaper->screenNumber().at(0)) {
wallpaper->replace(
return wallpaper->replace(
path,
previewImage,
file,
@ -180,8 +181,6 @@ bool ScreenPlayManager::createWallpaper(
type,
m_settings->checkWallpaperVisible());
m_monitorListModel->setWallpaperMonitor(wallpaper, monitorIndex);
return true;
}
}
i++;
@ -470,6 +469,7 @@ void ScreenPlayManager::newConnection()
m_unconnectedClients.push_back(std::move(connection));
}
/*!
\brief Removes a wallpaper from the given appID. Returns true on success.
*/
@ -721,9 +721,17 @@ bool ScreenPlayManager::loadProfiles()
return true;
}
TEST_CASE("Loads profiles.json")
bool ScreenPlayManager::isKDEConnected() const
{
GlobalVariables globalVariables;
ScreenPlayManager manager;
return m_isKDEConnected;
}
void ScreenPlayManager::setIsKDEConnected(bool isKDEConnected)
{
if (m_isKDEConnected == isKDEConnected)
return;
m_isKDEConnected = isKDEConnected;
emit isKDEConnectedChanged(isKDEConnected);
}
}

View File

@ -1,4 +1,4 @@
#include "screenplaywallpaper.h"
#include "ScreenPlay/screenplaywallpaper.h"
namespace ScreenPlay {
@ -239,7 +239,7 @@ void ScreenPlayWallpaper::setSDKConnection(std::unique_ptr<SDKConnection> connec
/*!
\brief Replaces the current wallpaper with the given one.
*/
void ScreenPlayWallpaper::replace(
bool ScreenPlayWallpaper::replace(
const QString& absolutePath,
const QString& previewImage,
const QString& file,
@ -250,11 +250,11 @@ void ScreenPlayWallpaper::replace(
{
if (m_isExiting)
return;
return false;
if (!m_connection) {
qWarning() << "Cannot replace for unconnected wallpaper!";
return;
return false;
}
m_previewImage = previewImage;
@ -272,8 +272,9 @@ void ScreenPlayWallpaper::replace(
obj.insert("file", file);
obj.insert("checkWallpaperVisible", checkWallpaperVisible);
m_connection->sendMessage(QJsonDocument(obj).toJson(QJsonDocument::Compact));
const bool success = m_connection->sendMessage(QJsonDocument(obj).toJson(QJsonDocument::Compact));
emit requestSave();
return success;
}
}

View File

@ -1,4 +1,4 @@
#include "screenplaywidget.h"
#include "ScreenPlay/screenplaywidget.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "sdkconnection.h"
#include "ScreenPlay/sdkconnection.h"
namespace ScreenPlay {

View File

@ -1,4 +1,4 @@
#include "settings.h"
#include "ScreenPlay/settings.h"
#include "ScreenPlayUtil/util.h"
#include <QFileInfo>
@ -40,6 +40,11 @@ Settings::Settings(const std::shared_ptr<GlobalVariables>& globalVariables,
: QObject(parent)
, m_globalVariables { globalVariables }
{
const QString qtVersion = QString("Qt Version: %1.%2.%3").arg(QT_VERSION_MAJOR).arg(QT_VERSION_MINOR).arg(QT_VERSION_PATCH);
setGitBuildHash(COMPILE_INFO + qtVersion);
#ifdef SCREENPLAY_STEAM
setSteamVersion(true);
#endif
#ifdef Q_OS_WIN
setDesktopEnvironment(DesktopEnvironment::Windows);
#endif
@ -99,11 +104,7 @@ Settings::Settings(const std::shared_ptr<GlobalVariables>& globalVariables,
}
initInstalledPath();
setupWidgetAndWindowPaths();
const QString qtVersion = QString("Qt Version: %1.%2.%3").arg(QT_VERSION_MAJOR).arg(QT_VERSION_MINOR).arg(QT_VERSION_PATCH);
setGitBuildHash(COMPILE_INFO + qtVersion);
setSteamVersion(!(QString(SCREENPLAY_STEAM).compare("OFF", Qt::CaseInsensitive) ? false : true));
}
/*!
@ -120,7 +121,7 @@ void Settings::writeJsonFileFromResource(const QString& filename)
if (!directory.exists()) {
directory.mkpath(directory.path());
}
QFile defaultSettings(":/" + filename + ".json");
QFile defaultSettings(":/qml/ScreenPlayApp/" + filename + ".json");
file.open(QIODevice::WriteOnly | QIODevice::Text);
defaultSettings.open(QIODevice::ReadOnly | QIODevice::Text);
@ -195,8 +196,19 @@ void Settings::restoreDefault(const QString& appConfigLocation, const QString& s
void Settings::initInstalledPath()
{
// If empty use steam workshop location
if (QString(m_qSettings.value("ScreenPlayContentPath").toString()).isEmpty()) {
const QString contentPath = m_qSettings.value("ScreenPlayContentPath").toString();
// Steamless
if (!steamVersion() && contentPath.isEmpty()) {
const QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
m_qSettings.setValue("ScreenPlayContentPath", QUrl::fromUserInput(path));
m_qSettings.sync();
m_globalVariables->setLocalStoragePath(path);
return;
}
// Steam
if (contentPath.isEmpty()) {
/*
* ! We must use this (ugly) method, because to stay FOSS we cannot call the steamAPI here !
@ -233,10 +245,10 @@ void Settings::initInstalledPath()
} else {
qWarning() << "The following path could not be resolved to search for workshop content: " << path;
}
} else {
m_globalVariables->setLocalStoragePath(QUrl::fromUserInput(m_qSettings.value("ScreenPlayContentPath").toString()));
return;
}
m_globalVariables->setLocalStoragePath(QUrl::fromUserInput(contentPath));
}
/*!

View File

@ -1,6 +1,8 @@
#include "util.h"
#include "ScreenPlay/util.h"
#if defined(Q_OS_WIN)
#include <sentry.h>
#endif
namespace ScreenPlay {
@ -95,49 +97,161 @@ void Util::openFolderInExplorer(const QString& url) const
explorer.startDetached();
}
/*!
\brief Removes file///: or file:// from the url/string
*/
QString Util::toLocal(const QString& url)
{
return ScreenPlayUtil::toLocal(url);
}
/*!
\brief Exports a given project into a .screenplay 7Zip file.
*/
bool Util::exportProject(QString& contentPath, QString& exportPath)
{
contentPath = ScreenPlayUtil::toLocal(contentPath);
exportPath = ScreenPlayUtil::toLocal(exportPath);
QDir dir(contentPath);
bool success = true;
if (!dir.exists()) {
qWarning() << "Directory does not exist!" << dir;
return false;
}
QStringList files;
for (auto& item : dir.entryInfoList(QDir::Files)) {
files.append(item.absoluteFilePath());
}
m_compressor = std::make_unique<QArchive::DiskCompressor>(exportPath);
m_compressor->setArchiveFormat(QArchive::SevenZipFormat);
m_compressor->addFiles(files);
/* Connect Signals with Slots (in this case lambda functions). */
QObject::connect(m_compressor.get(), &QArchive::DiskCompressor::started, [&]() {
qInfo() << "[+] Starting Compressor... ";
});
QObject::connect(m_compressor.get(), &QArchive::DiskCompressor::finished, [&]() {
qInfo() << "[+] Compressed File(s) Successfully!";
return;
});
QObject::connect(m_compressor.get(), &QArchive::DiskCompressor::error, [&](short code, QString file) {
qInfo() << "[-] An error has occured :: " << QArchive::errorCodeToString(code) << " :: " << file;
return;
});
QObject::connect(m_compressor.get(), &QArchive::DiskCompressor::progress, [&](QString file, int proc, int total, qint64 br, qint64 bt) {
qInfo() << "Progress::" << file << ":: Done ( " << proc << " / " << total << ") " << (br * 100 / bt) << "%.";
return;
});
m_compressor->start();
return true;
}
/*!
\brief Imports a given project from a .screenplay zip file.
*/
bool Util::importProject(QString& archivePath, QString& extractionPath)
{
archivePath = ScreenPlayUtil::toLocal(archivePath);
extractionPath = ScreenPlayUtil::toLocal(extractionPath);
QFileInfo fileInfo(archivePath);
if (!fileInfo.fileName().endsWith(".screenplay")) {
qWarning() << "Unsupported file type: " << fileInfo.fileName() << ". We only support '.screenplay' files.";
return false;
}
const QString name = fileInfo.fileName().remove(".screenplay");
const auto timestamp = QDateTime::currentDateTime().toString("ddMMyyyyhhmmss-");
extractionPath = extractionPath + "/" + timestamp + name + "/";
QDir dir(extractionPath);
if (dir.exists()) {
qWarning() << "Directory does already exist!" << dir;
return false;
}
if (!dir.mkdir(extractionPath)) {
qWarning() << "Unable to create directory:" << dir;
return false;
}
m_extractor = std::make_unique<QArchive::DiskExtractor>(archivePath, extractionPath);
QObject::connect(m_extractor.get(), &QArchive::DiskExtractor::started, [&]() {
qInfo() << "[+] Starting Extractor... ";
});
QObject::connect(m_extractor.get(), &QArchive::DiskExtractor::finished, [&]() {
qInfo() << "[+] Extracted File(s) Successfully!";
return;
});
QObject::connect(m_extractor.get(), &QArchive::DiskExtractor::error, [&](short code) {
if (code == QArchive::ArchivePasswordNeeded || code == QArchive::ArchivePasswordIncorrect) {
return;
}
qInfo() << "[-] An error has occured :: " << QArchive::errorCodeToString(code);
return;
});
QObject::connect(m_extractor.get(), &QArchive::DiskExtractor::info, [&](QJsonObject info) {
qInfo() << "ARCHIVE CONTENTS:: " << info;
return;
});
QObject::connect(m_extractor.get(), &QArchive::DiskExtractor::progress,
[&](QString file, int proc, int total, qint64 br, qint64 bt) {
qInfo() << "Progress(" << proc << "/" << total << "): "
<< file << " : " << (br * 100 / bt) << "% done.";
});
m_extractor->setCalculateProgress(true);
m_extractor->getInfo();
m_extractor->start();
return true;
}
/*!
\brief Loads all content of the legal folder in the qrc into a property string of this class.
allLicenseLoaded is emited when loading is finished.
*/
void Util::Util::requestAllLicenses()
{
if (m_requestAllLicensesFuture.isRunning())
return;
QtConcurrent::run([this]() {
m_requestAllLicensesFuture = QtConcurrent::run([this]() {
QString tmp;
QFile file;
QTextStream out(&file);
file.setFileName(":/legal/Font Awesome Free License.txt");
file.setFileName(":/qml/ScreenPlayApp/legal/Font Awesome Free License.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
file.setFileName(":/legal/gpl-3.0.txt");
file.setFileName(":/qml/ScreenPlayApp/legal/gpl-3.0.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
file.setFileName(":/legal/gpl-3.0.txt");
file.setFileName(":/qml/ScreenPlayApp/legal/gpl-3.0.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
file.setFileName(":/legal/OFL.txt");
file.setFileName(":/qml/ScreenPlayApp/legal/OFL.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
file.setFileName(":/legal/OpenSSL.txt");
file.setFileName(":/qml/ScreenPlayApp/legal/OpenSSL.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
file.setFileName(":/legal/Qt LGPLv3.txt");
file.setFileName(":/qml/ScreenPlayApp/legal/Qt LGPLv3.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
@ -152,18 +266,16 @@ void Util::Util::requestAllLicenses()
*/
void Util::Util::requestDataProtection()
{
QtConcurrent::run([this]() {
QString tmp;
QFile file;
QTextStream out(&file);
QString tmp;
QFile file;
QTextStream out(&file);
file.setFileName(":/legal/DataProtection.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
file.setFileName(":/qml/ScreenPlayApp/legal/DataProtection.txt");
file.open(QIODevice::ReadOnly | QIODevice::Text);
tmp += out.readAll();
file.close();
emit this->allDataProtectionLoaded(tmp);
});
emit this->allDataProtectionLoaded(tmp);
}
static const char*
@ -221,6 +333,7 @@ void Util::logToGui(QtMsgType type, const QMessageLogContext& context, const QSt
if (utilPointer != nullptr)
utilPointer->appendDebugMessages(log);
#if defined(Q_OS_WIN)
sentry_value_t crumb
= sentry_value_new_breadcrumb("default", qUtf8Printable(msg));
@ -238,6 +351,7 @@ void Util::logToGui(QtMsgType type, const QMessageLogContext& context, const QSt
sentry_value_set_by_key(crumb, "data", location);
sentry_add_breadcrumb(crumb);
#endif
}
/*!

View File

@ -1,4 +1,4 @@
#include "wizards.h"
#include "ScreenPlay/wizards.h"
#include "ScreenPlayUtil/util.h"
@ -31,7 +31,12 @@ void Wizards::createQMLWidget(const QString& title,
const QString& previewThumbnail,
const QVector<QString>& tags)
{
QtConcurrent::run([=]() {
if (m_wizardFuture.isRunning()) {
qWarning() << "Another wizard is already running! Abort.";
return;
}
m_wizardFuture = QtConcurrent::run([=]() {
std::optional<QString> folderName = createTemporaryFolder();
if (!folderName.has_value()) {
@ -49,7 +54,7 @@ void Wizards::createQMLWidget(const QString& title,
obj.insert("type", "qmlWidget");
obj.insert("file", "main.qml");
if (!Util::writeFileFromQrc(":/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
qWarning() << "Could not write " << licenseFile;
emit widgetCreationFinished(WizardResult::WriteLicenseFileError);
return;
@ -92,7 +97,12 @@ void Wizards::createHTMLWidget(const QString& title,
const QString& previewThumbnail,
const QVector<QString>& tags)
{
QtConcurrent::run([=]() {
if (m_wizardFuture.isRunning()) {
qWarning() << "Another wizard is already running! Abort.";
return;
}
m_wizardFuture = QtConcurrent::run([=]() {
std::optional<QString> folderName = createTemporaryFolder();
if (!folderName.has_value()) {
@ -110,7 +120,7 @@ void Wizards::createHTMLWidget(const QString& title,
obj.insert("type", "htmlWidget");
obj.insert("file", "index.html");
if (!Util::writeFileFromQrc(":/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
qWarning() << "Could not write " << licenseFile;
emit widgetCreationFinished(WizardResult::WriteLicenseFileError);
return;
@ -155,7 +165,12 @@ void Wizards::createHTMLWallpaper(
const QString& previewThumbnail,
const QVector<QString>& tags)
{
QtConcurrent::run([=]() {
if (m_wizardFuture.isRunning()) {
qWarning() << "Another wizard is already running! Abort.";
return;
}
m_wizardFuture = QtConcurrent::run([=]() {
std::optional<QString> folderName = createTemporaryFolder();
if (!folderName.has_value()) {
@ -173,7 +188,7 @@ void Wizards::createHTMLWallpaper(
obj.insert("type", "htmlWallpaper");
obj.insert("file", "index.html");
if (!Util::writeFileFromQrc(":/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
qWarning() << "Could not write " << licenseFile;
emit widgetCreationFinished(WizardResult::WriteLicenseFileError);
return;
@ -217,7 +232,12 @@ void Wizards::createQMLWallpaper(
const QString& previewThumbnail,
const QVector<QString>& tags)
{
QtConcurrent::run([=]() {
if (m_wizardFuture.isRunning()) {
qWarning() << "Another wizard is already running! Abort.";
return;
}
m_wizardFuture = QtConcurrent::run([=]() {
std::optional<QString> folderName = createTemporaryFolder();
if (!folderName.has_value()) {
@ -242,7 +262,7 @@ void Wizards::createQMLWallpaper(
}
}
if (!Util::writeFileFromQrc(":/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
qWarning() << "Could not write " << licenseFile;
emit widgetCreationFinished(WizardResult::WriteLicenseFileError);
return;
@ -270,7 +290,12 @@ void Wizards::createGifWallpaper(
const QString& file,
const QVector<QString>& tags)
{
auto con = QtConcurrent::run([=]() {
if (m_wizardFuture.isRunning()) {
qWarning() << "Another wizard is already running! Abort.";
return;
}
m_wizardFuture = QtConcurrent::run([=]() {
std::optional<QString> folderName = createTemporaryFolder();
if (!folderName.has_value()) {
@ -290,7 +315,7 @@ void Wizards::createGifWallpaper(
obj.insert("tags", ScreenPlayUtil::fillArray(tags));
obj.insert("type", "gifWallpaper");
if (!Util::writeFileFromQrc(":/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
if (!Util::writeFileFromQrc(":/qml/ScreenPlayApp/assets/wizards/" + licenseFile, workingPath + "/" + licenseFile)) {
qWarning() << "Could not write " << licenseFile;
emit widgetCreationFinished(WizardResult::WriteLicenseFileError);
return;
@ -320,7 +345,12 @@ void Wizards::createWebsiteWallpaper(
const QUrl& url,
const QVector<QString>& tags)
{
QtConcurrent::run([=]() {
if (m_wizardFuture.isRunning()) {
qWarning() << "Another wizard is already running! Abort.";
return;
}
m_wizardFuture = QtConcurrent::run([=]() {
std::optional<QString> folderName = createTemporaryFolder();
if (!folderName.has_value()) {

View File

@ -32,8 +32,8 @@
**
****************************************************************************/
#include "app.h"
#include "create.h"
#include "ScreenPlay/app.h"
#include "ScreenPlay/create.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QCoreApplication>
@ -42,23 +42,25 @@
#include <QGuiApplication>
#include <QQuickItem>
#include <QtTest>
#define DOCTEST_CONFIG_IMPLEMENT
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
#include <doctest/doctest.h>
Q_IMPORT_QML_PLUGIN(ScreenPlayAppPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin)
#ifdef SCREENPLAY_STEAM
Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin)
#endif
class ScreenPlayTest : public QObject {
Q_OBJECT
private slots:
void initTestCase()
{
Q_INIT_RESOURCE(ScreenPlayQML);
Q_INIT_RESOURCE(ScreenPlayAssets);
app.init();
m_window = qobject_cast<QQuickWindow*>(app.mainWindowEngine()->rootObjects().first());
m_window = qobject_cast<QQmlApplicationEngine*>(app.mainWindowEngine()->rootObjects().first());
m_window->addImportPath(QGuiApplication::instance()->applicationDirPath() + "/qml");
QVERIFY(m_window);
QVERIFY(QTest::qWaitForWindowExposed(m_window));
//QVERIFY(QTest::qWaitForWindowExposed(m_window.));
QTest::qWait(1000);
m_installedSidebar = m_window->findChild<QQuickItem*>("installedSidebar");
@ -71,7 +73,7 @@ private slots:
void import_convert_video();
private:
QQuickWindow* m_window = nullptr;
QQmlApplicationEngine* m_window = nullptr;
QQuickItem* m_installedSidebar = nullptr;
ScreenPlay::App app;
};

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More