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

Formatting

This commit is contained in:
Elias Steurer 2023-12-03 11:45:20 +01:00
parent e17e2abd9d
commit 716397ce3a
38 changed files with 2310 additions and 2385 deletions

View File

@ -49,11 +49,11 @@ set(HEADER
set(QML
# cmake-format: sort
main.qml
qml/Community/CommunityView.qml
qml/Community/CommunityNavItem.qml
qml/Community/CommunityView.qml
qml/Community/XMLNewsfeed.qml
qml/Create/CreateView.qml
qml/Create/CreateSidebar.qml
qml/Create/CreateView.qml
qml/Create/StartInfo.qml
qml/Create/StartInfoLinkImage.qml
qml/Create/Wizard.qml
@ -75,28 +75,28 @@ set(QML
qml/Create/Wizards/QMLWidget.qml
qml/Create/Wizards/WebsiteWallpaper.qml
qml/Create/Wizards/WizardPage.qml
qml/Installed/InstalledView.qml
qml/Installed/InstalledNavigation.qml
qml/Installed/InstalledView.qml
qml/Installed/InstalledWelcomeScreen.qml
qml/Installed/ScreenPlayItem.qml
qml/Installed/ScreenPlayItemImage.qml
qml/Installed/Sidebar.qml
qml/Monitors/DefaultVideoControls.qml
qml/Monitors/MonitorsView.qml
qml/Monitors/MonitorSelection.qml
qml/Monitors/MonitorSelectionItem.qml
qml/Monitors/MonitorsProjectSettingItem.qml
qml/Monitors/MonitorsView.qml
qml/Monitors/SaveNotification.qml
qml/Navigation/ExitPopup.qml
qml/Navigation/Navigation.qml
qml/Settings/SettingBool.qml
qml/Settings/SettingsView.qml
qml/Settings/SettingsButton.qml
qml/Settings/SettingsComboBox.qml
qml/Settings/SettingsExpander.qml
qml/Settings/SettingsHeader.qml
qml/Settings/SettingsHorizontalSeperator.qml
qml/Settings/SettingsPage.qml
qml/Settings/SettingsView.qml
qml/TrayIcon.qml
qml/Workshop/WorkshopView.qml)
@ -280,14 +280,11 @@ target_include_directories(
PUBLIC inc/public/
PRIVATE src/)
# Note making this public is so that *_qmltyperegistrations.cpp
# can find the needed include
# Note making this public is so that *_qmltyperegistrations.cpp can find the needed include
target_include_directories(ScreenPlayApp PUBLIC src/ inc/public/ScreenPlay)
# ScreenPlayApp is our qml module needed for compiling
# of all classes and most importanly for QML_ELEMENT.
# So our app is mostly a module that then link to
# ScreenPlay executable.
# ScreenPlayApp is our qml module needed for compiling of all classes and most importanly for QML_ELEMENT. So our app is mostly a module
# that then link to ScreenPlay executable.
qt_add_qml_module(
ScreenPlayApp
URI
@ -410,7 +407,6 @@ if(APPLE)
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME TRUE
XCODE_ATTRIBUTE_EXECUTABLE_NAME ${PROJECT_NAME})
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
@ -437,9 +433,8 @@ if(APPLE)
endif()
# Must be called here, because we need to change the
# OUTPUT_LOCATION for macos
qt_add_lrelease(${PROJECT_NAME} TS_FILES ${TS_FILES} )
# Must be called here, because we need to change the OUTPUT_LOCATION for macos
qt_add_lrelease(${PROJECT_NAME} TS_FILES ${TS_FILES})
# Note: We need the variables in the lib and exe!
generate_cmake_variable_header(${PROJECT_NAME})

View File

@ -25,8 +25,8 @@
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlay/profilelistmodel.h"
#include "ScreenPlay/settings.h"
#include "ScreenPlayUtil/util.h"
#include "ScreenPlayUtil/projectfile.h"
#include "ScreenPlayUtil/util.h"
#include <memory>

View File

@ -15,7 +15,6 @@
#include "ScreenPlay/globalvariables.h"
#include "ScreenPlayUtil/util.h"
#include "ScreenPlayUtil/util.h"
#include <memory>

View File

@ -104,8 +104,8 @@ ApplicationWindow {
}
Component.onCompleted: {
print("Settings.Language.Pl_PL",Settings.Language.Pl_PL)
print(App.settings.theme,Settings.Theme.Light);
print("Settings.Language.Pl_PL", Settings.Language.Pl_PL);
print(App.settings.theme, Settings.Theme.Light);
setTheme(App.settings.theme);
stackView.push("qrc:/qml/ScreenPlayApp/qml/Installed/InstalledView.qml", {
"sidebar": sidebar

View File

@ -6,7 +6,6 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Rectangle {

View File

@ -6,7 +6,6 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Item {

View File

@ -6,7 +6,6 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
Item {

View File

@ -6,7 +6,6 @@ import Qt5Compat.GraphicalEffects
import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Item {

View File

@ -5,7 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Item {

View File

@ -5,7 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {

View File

@ -5,7 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {

View File

@ -6,7 +6,6 @@ import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
Item {
id: root

View File

@ -6,7 +6,6 @@ import Qt5Compat.GraphicalEffects
import ScreenPlayApp
import ScreenPlay
Item {
id: wrapperError

View File

@ -5,7 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
Item {

View File

@ -6,7 +6,6 @@ import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
Item {
id: root

View File

@ -6,7 +6,6 @@ import QtQuick.Layouts
import QtQuick.Dialogs
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
import "../../"

View File

@ -6,7 +6,6 @@ import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
Item {
id: root

View File

@ -5,8 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
Item {

View File

@ -6,7 +6,6 @@ import QtQuick.Layouts
import QtQuick.Dialogs
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
import "../../"

View File

@ -5,7 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {

View File

@ -5,7 +5,6 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil as Util
WizardPage {

View File

@ -7,7 +7,6 @@ import QtQuick.Window
import ScreenPlayApp
import ScreenPlay
FocusScope {
id: root

View File

@ -7,7 +7,6 @@ import QtQuick.Controls.Material.impl
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
import "../Monitors"
Item {

View File

@ -4,6 +4,7 @@ import QtQuick.Controls.Material
import ScreenPlayApp
import ScreenPlay
import ScreenPlayUtil
Item {
id: root

View File

@ -14,7 +14,6 @@ Item {
property Item modalSource
Flickable {
id: flickableWrapper
@ -147,19 +146,58 @@ Item {
Component.onCompleted: comboBox.currentIndex = comboBox.indexOfValue(App.settings.language)
model: ListModel {
id: lmLangauge
ListElement { value: Settings.Language.En_US; text: "English" }
ListElement { value: Settings.Language.De_DE; text: "German" }
ListElement { value: Settings.Language.Pl_PL; text: "Polish" }
ListElement { value: Settings.Language.It_IT; text: "Italian" }
ListElement { value: Settings.Language.Zh_CN; text: "Chinese - Simplified" }
ListElement { value: Settings.Language.Ru_RU; text: "Russian" }
ListElement { value: Settings.Language.Fr_FR; text: "French" }
ListElement { value: Settings.Language.Es_ES; text: "Spanish" }
ListElement { value: Settings.Language.Ko_KR; text: "Korean" }
ListElement { value: Settings.Language.Vi_VN; text: "Vietnamese" }
ListElement { value: Settings.Language.Pt_BR; text: "Portuguese (Brazil)" }
ListElement { value: Settings.Language.Tr_TR; text: "Turkish" }
ListElement { value: Settings.Language.Nl_NL; text: "Dutch" }
ListElement {
value: Settings.Language.En_US
text: "English"
}
ListElement {
value: Settings.Language.De_DE
text: "German"
}
ListElement {
value: Settings.Language.Pl_PL
text: "Polish"
}
ListElement {
value: Settings.Language.It_IT
text: "Italian"
}
ListElement {
value: Settings.Language.Zh_CN
text: "Chinese - Simplified"
}
ListElement {
value: Settings.Language.Ru_RU
text: "Russian"
}
ListElement {
value: Settings.Language.Fr_FR
text: "French"
}
ListElement {
value: Settings.Language.Es_ES
text: "Spanish"
}
ListElement {
value: Settings.Language.Ko_KR
text: "Korean"
}
ListElement {
value: Settings.Language.Vi_VN
text: "Vietnamese"
}
ListElement {
value: Settings.Language.Pt_BR
text: "Portuguese (Brazil)"
}
ListElement {
value: Settings.Language.Tr_TR
text: "Turkish"
}
ListElement {
value: Settings.Language.Nl_NL
text: "Dutch"
}
}
onActivated: {
App.settings.setLanguage(settingsLanguage.comboBox.currentValue);
@ -179,9 +217,18 @@ Item {
comboBox {
Component.onCompleted: comboBox.currentIndex = comboBox.indexOfValue(App.settings.theme)
model: ListModel {
ListElement { value: Settings.Theme.System; text: qsTr("System Default") }
ListElement { value: Settings.Theme.Dark; text: qsTr("Dark") }
ListElement { value: Settings.Theme.Light; text: qsTr("Light") }
ListElement {
value: Settings.Theme.System
text: qsTr("System Default")
}
ListElement {
value: Settings.Theme.Dark
text: qsTr("Dark")
}
ListElement {
value: Settings.Theme.Light
text: qsTr("Light")
}
}
onActivated: {
App.settings.setTheme(settingsTheme.comboBox.currentValue);
@ -225,16 +272,30 @@ Item {
comboBox {
Component.onCompleted: comboBox.currentIndex = comboBox.indexOfValue(App.settings.videoFillMode)
model: ListModel {
ListElement { value: Video.FillMode.Stretch; text: qsTr("Stretch") }
ListElement { value: Video.FillMode.Fill; text: qsTr("Fill") }
ListElement { value: Video.FillMode.Contain; text: qsTr("Contain") }
ListElement { value: Video.FillMode.Cover; text: qsTr("Cover") }
ListElement { value: Video.FillMode.Scale_Down; text: qsTr("Scale-Down") }
ListElement {
value: Video.FillMode.Stretch
text: qsTr("Stretch")
}
ListElement {
value: Video.FillMode.Fill
text: qsTr("Fill")
}
ListElement {
value: Video.FillMode.Contain
text: qsTr("Contain")
}
ListElement {
value: Video.FillMode.Cover
text: qsTr("Cover")
}
ListElement {
value: Video.FillMode.Scale_Down
text: qsTr("Scale-Down")
}
}
onActivated: {
App.settings.setVideoFillMode(cbVideoFillMode.comboBox.currentValue)
App.settings.setVideoFillMode(cbVideoFillMode.comboBox.currentValue);
}
}
}
}
@ -462,7 +523,4 @@ Item {
}
}
}
}

View File

@ -72,6 +72,7 @@ if(${SCREENPLAY_TESTS})
qt_add_executable(tst_ScreenPlayShader src/TestMain.cpp)
target_link_libraries(tst_ScreenPlayShader PRIVATE Qt::Quick ${PROJECT_NAME}plugin)
if(APPLE)
set_target_properties(tst_ScreenPlayShader PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
set_target_properties(tst_ScreenPlayShader PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
endif()
endif()

View File

@ -42,27 +42,27 @@ set(QML
set(SOURCES
# cmake-format: sort
src/httpfileserver.cpp
src/archive.cpp
src/contenttypes.cpp
src/exitcodes.cpp
src/httpfileserver.cpp
src/logginghandler.cpp
src/projectfile.cpp
src/exitcodes.cpp
src/steamenumsgenerated.cpp
src/util.cpp
src/archive.cpp)
src/util.cpp)
set(HEADER
# cmake-format: sort
inc/public/ScreenPlayUtil/archive.h
inc/public/ScreenPlayUtil/contenttypes.h
inc/public/ScreenPlayUtil/steamenumsgenerated.h
inc/public/ScreenPlayUtil/exitcodes.h
inc/public/ScreenPlayUtil/HelpersCommon.h
inc/public/ScreenPlayUtil/httpfileserver.h
inc/public/ScreenPlayUtil/ListPropertyHelper.h
inc/public/ScreenPlayUtil/logginghandler.h
inc/public/ScreenPlayUtil/projectfile.h
inc/public/ScreenPlayUtil/PropertyHelpers.h
inc/public/ScreenPlayUtil/ListPropertyHelper.h
inc/public/ScreenPlayUtil/HelpersCommon.h
inc/public/ScreenPlayUtil/archive.h
inc/public/ScreenPlayUtil/steamenumsgenerated.h
inc/public/ScreenPlayUtil/util.h)
if(APPLE)
@ -77,8 +77,7 @@ qt_add_library(
${PROJECT_NAME}
STATIC
${SOURCES}
${HEADER}
)
${HEADER})
qt_add_qml_module(
${PROJECT_NAME}
@ -103,15 +102,13 @@ target_include_directories(
PUBLIC inc/public/
PRIVATE src/)
# Note making this public is so thatscreenplayutil_qmltyperegistrations.cpp
# can find the #include <contenttypes.h> include
# Note making this public is so thatscreenplayutil_qmltyperegistrations.cpp can find the #include <contenttypes.h> include
target_include_directories(${PROJECT_NAME} PUBLIC inc/public/ScreenPlayUtil)
target_include_directories(${PROJECT_NAME}plugin PUBLIC inc/public/ScreenPlayUtil)
target_link_libraries(
${PROJECT_NAME}
PUBLIC
Qt6::Core
PUBLIC Qt6::Core
Qt6::Quick
Qt6::Gui
fmt::fmt-header-only

View File

@ -5,4 +5,3 @@ Steam::Steam()
{
}
}

View File

@ -20,7 +20,7 @@ Rectangle {
// macOS only supports h264 via the native Qt MM
if (Qt.platform.os === "osx") {
print(ContentTypes.InstalledType.VideoWallpaper )
print(ContentTypes.InstalledType.VideoWallpaper);
if ((Wallpaper.videoCodec === Video.VideoCodec.VP8 || Wallpaper.videoCodec === Video.VideoCodec.VP9)) {
loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaWebView.qml";
} else {

View File

@ -269,6 +269,7 @@ if(${SCREENPLAY_TESTS})
target_link_libraries(tst_ScreenPlayWeather PRIVATE Qt6::Quick ${PROJECT_NAME}plugin)
if(APPLE)
set_target_properties(tst_ScreenPlayWeather PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
set_target_properties(tst_ScreenPlayWeather PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
endif()
endif()

View File

@ -2,7 +2,6 @@ import QtQuick
import QtQuick.Controls
import QtWebEngine
import ScreenPlayWidget
import ScreenPlayUtil as Util
Item {

View File

@ -140,7 +140,8 @@ if(${SCREENPLAY_STEAM})
SteamSDK)
if(APPLE)
set_target_properties(tst_ScreenPlayWorkshop PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
set_target_properties(tst_ScreenPlayWorkshop PROPERTIES RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/")
endif()
endif()
endif()

View File

@ -11,10 +11,10 @@
#include "workshopitem.h"
// Steam
#include "ScreenPlayUtil/steamenumsgenerated.h"
#include "cstring"
#include "stdlib.h"
#include "steam/steam_api.h"
#include "ScreenPlayUtil/steamenumsgenerated.h"
/*!
\class Steam Workshop List Model