1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Change widget and wallpaper types to use enums

Apparently this is the only way for qml to work
 * https://www.kdab.com/new-qt-5-8-meta-object-support-namespaces/

moc needs full enum namespace info see QTBUG-58454

    void createWallpaper(
        const ScreenPlay::Enums::WallpaperType type,
        const ScreenPlay::Enums::FillMode fillMode,
        const QString& absoluteStoragePath,
        const QString& previewImage,
        QVector<int> monitorIndex,
        const float volume,
        const bool saveToProfilesConfigFile);
This commit is contained in:
Elias Steurer 2020-05-14 16:45:50 +02:00
parent 0f87f8dac7
commit 52fb670d55
19 changed files with 144 additions and 162 deletions

View File

@ -60,7 +60,7 @@ set(headers app.h
set(resources Resources.qrc)
add_executable(ScreenPlay ${src} ${headers} ${resources})
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")

View File

@ -86,12 +86,18 @@ App::App()
qRegisterMetaType<InstalledListFilter*>();
qRegisterMetaType<MonitorListModel*>();
qRegisterMetaType<ProfileListModel*>();
qRegisterMetaType<GlobalVariables::FillMode>();
qRegisterMetaType<GlobalVariables::WallpaperType>();
qRegisterMetaType<GlobalVariables::WidgetType>();
qmlRegisterUncreatableType<GlobalVariables>("ScreenPlay.GlobalVariables", 1, 0, "GlobalVariables", "Error only for enums");
qRegisterMetaType<Enums::FillMode>();
qRegisterMetaType<Enums::WallpaperType>();
qRegisterMetaType<Enums::WidgetType>();
// Registers the enums from globalvariables.
// Apparently this is the only way for qml to work
// https://www.kdab.com/new-qt-5-8-meta-object-support-namespaces/
qmlRegisterUncreatableMetaObject(ScreenPlay::Enums::staticMetaObject,
"ScreenPlayEnums",
1, 0,
"ScreenPlayEnums",
"Error: only enums");
qmlRegisterAnonymousType<GlobalVariables>("ScreenPlay", 1);
qmlRegisterAnonymousType<ScreenPlayManager>("ScreenPlay", 1);

View File

@ -15,18 +15,18 @@ import "qml/Common"
import "qml/Installed"
import "qml/Navigation"
import "qml/Workshop"
import "qml/Community"
ApplicationWindow {
id: window
color: {
if(Material.theme === Material.Dark){
if (Material.theme === Material.Dark) {
return Qt.darker(Material.background)
} else {
return Material.background
return Material.background
}
}
// Set visible if the -silent parameter was not set (see app.cpp end of constructor).
visible: false
width: 1400
@ -34,18 +34,17 @@ ApplicationWindow {
title: "ScreenPlay Alpha - V0.10.1"
minimumHeight: 450
minimumWidth: 1050
onVisibilityChanged: {
if(window.visibility === 2){
onVisibilityChanged: {
if (window.visibility === 2) {
switchPage("Installed")
}
}
Material.accent: {
Material.accent: {
return Material.color(Material.Orange)
}
function setTheme(theme){
function setTheme(theme) {
switch (theme) {
case Settings.System:
window.Material.theme = Material.System
@ -112,7 +111,6 @@ ApplicationWindow {
anchors.fill: parent
}
Connections {
target: ScreenPlay.util
function onRequestNavigation(nav) {
@ -331,4 +329,5 @@ ApplicationWindow {
anchors.fill: pageLoader
z: 98
}
}

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.2
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.3
import QtQuick.XmlListModel 2.0
import QtQuick.XmlListModel 2.15
import ScreenPlay 1.0
GridView {
id: changelogFlickableWrapper
@ -12,40 +13,32 @@ GridView {
flickDeceleration: 5000
cellHeight: 205
cellWidth: 360
clip: true
model: feedModel
onCountChanged: print("count ",count)
Timer {
interval: 200
running: true
repeat: false
onTriggered: {
feedModel.source = "https://screen-play.app/index.php?option=com_content&view=category&layout=blog&id=10&format=feed&type=rss"
}
}
XmlListModel {
id: feedModel
query: "/rss/channel/item"
namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
onProgressChanged: print("progress ",progress)
source: "https://gitlab.com/kelteseth/ScreenPlay/-/tags?&format=atom"
query: "/entry"
XmlRole {
name: "title"
query: "title/string()"
}
XmlRole {
name: "backgroundImage"
query: "description/string()"
name: "content"
query: "content/string()"
}
XmlRole {
name: "link"
query: "link/string()"
}
XmlRole {
name: "pubDate"
query: "pubDate/string()"
}
XmlRole {
name: "category"
query: "category/string()"
name: "updated"
query: "updated/string()"
}
}
@ -98,35 +91,6 @@ GridView {
anchors.margins: 5
radius: 4
Image {
fillMode: Image.PreserveAspectCrop
anchors.fill: parent
source: {
var a = backgroundImage
var r = new RegExp(/<img[^>]+src="([^">]+)"/)
var url = r.exec(a)
return url[1].toString()
}
}
LinearGradient {
visible: true
opacity: .5
anchors.fill: parent
start: Qt.point(0, parent.height)
end: Qt.point(0, parent.height - 150)
gradient: Gradient {
GradientStop {
position: 0.0
color: "#BB000000"
}
GradientStop {
position: 1.0
color: "#00000000"
}
}
}
Text {
id: txtTitle
text: title
@ -137,7 +101,7 @@ GridView {
left: parent.left
margins: 20
}
color: "white"
color: "#333333"
font.family: ScreenPlay.settings.font
font.weight: Font.Normal
font.pointSize: 18
@ -145,9 +109,7 @@ GridView {
}
Text {
id: txtPubDate
text: {
return pubDate.replace("+0000", "")
}
text: updated
anchors {
right: parent.right
rightMargin: 20

View File

@ -76,7 +76,7 @@ Item {
font.family: ScreenPlay.settings.font
opacity: buttonActive ? 1 : .25
font.pointSize: 14
color: Material.theme === Material.Light ? Qt.lighter(Material.foreground) : Qt.darker(Material.foreground)
color: Material.foreground
wrapMode: Text.WrapAnywhere
maximumLineCount: 1

View File

@ -4,7 +4,7 @@ import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Dialogs 1.2
import ScreenPlay 1.0
import ScreenPlay.Settings 1.0
import "../../../Common"

View File

@ -6,8 +6,7 @@ import QtQuick.Layouts 1.12
import QtQuick.Controls.Material 2.12
import ScreenPlay 1.0
import ScreenPlay.GlobalVariables 1.0
import ScreenPlay.Settings 1.0
import ScreenPlayEnums 1.0
import "../Monitors"
import "../Common" as SP
@ -20,13 +19,13 @@ Item {
property real navHeight
property string type
property var typeEnum: GlobalVariables.QMLWallpaper
property var typeEnum: ScreenPlayEnums.QMLWallpaper
property string activeScreen
function isWallpaper() {
if (typeEnum === GlobalVariables.VideoWallpaper
|| typeEnum === GlobalVariables.HTMLWallpaper
|| typeEnum === GlobalVariables.QMLWallpaper) {
if (typeEnum === ScreenPlayEnums.VideoWallpaper
|| typeEnum === ScreenPlayEnums.HTMLWallpaper
|| typeEnum === ScreenPlayEnums.QMLWallpaper) {
return true
} else {
return false
@ -35,8 +34,8 @@ Item {
function isWidget() {
if (typeEnum === GlobalVariables.HTMLWidget
|| typeEnum === GlobalVariables.QMLWidget) {
if (typeEnum === ScreenPlayEnums.HTMLWidget
|| typeEnum === ScreenPlayEnums.QMLWidget) {
return true
} else {
return false
@ -69,27 +68,27 @@ Item {
switch (type) {
case "videoWallpaper":
root.typeEnum = GlobalVariables.VideoWallpaper
root.typeEnum = ScreenPlayEnums.VideoWallpaper
state = "videoWallpaper"
return
case "htmlWallpaper":
state = "activeScene"
root.typeEnum = GlobalVariables.HTMLWallpaper
root.typeEnum = ScreenPlayEnums.HTMLWallpaper
return
case "qmlWallpaper":
state = "activeScene"
root.typeEnum = GlobalVariables.QMLWallpaper
root.typeEnum = ScreenPlayEnums.QMLWallpaper
return
case "godotWallpaper":
state = "activeScene"
return
case "qmlWidget":
state = "activeWidget"
root.typeEnum = GlobalVariables.QMLWidget
root.typeEnum = ScreenPlayEnums.QMLWidget
return
case "htmlWidget":
state = "activeWidget"
root.typeEnum = GlobalVariables.HTMLWidget
root.typeEnum = ScreenPlayEnums.HTMLWidget
return
case "standaloneWidget":
state = "activeWidget"
@ -324,19 +323,19 @@ Item {
model: [{
"value": GlobalVariables.Stretch,
"value": ScreenPlayEnums.Stretch,
"text": qsTr("Stretch")
}, {
"value": GlobalVariables.Fill,
"value": ScreenPlayEnums.Fill,
"text": qsTr("Fill")
}, {
"value": GlobalVariables.Contain,
"value": ScreenPlayEnums.Contain,
"text": qsTr("Contain")
}, {
"value": GlobalVariables.Cover,
"value": ScreenPlayEnums.Cover,
"text": qsTr("Cover")
}, {
"value": GlobalVariables.Scale_Down,
"value": ScreenPlayEnums.Scale_Down,
"text": qsTr("Scale-Down")
}]
}
@ -380,6 +379,14 @@ Item {
if (activeMonitors.length === 0)
return
print(root.typeEnum,
cbVideoFillMode.currentValue,
ScreenPlay.globalVariables.localStoragePath + "/" + activeScreen,
ScreenPlay.installedListModel.get( activeScreen).screenPreview,
activeMonitors,
(Math.round( sliderVolume.value * 100) / 100),
true)
ScreenPlay.screenPlayManager.createWallpaper(
root.typeEnum,
cbVideoFillMode.currentValue,

View File

@ -5,8 +5,8 @@ import QtQuick.Controls.Material 2.2
import QtQuick.Layouts 1.3
import ScreenPlay 1.0
import ScreenPlay.Settings 1.0
import ScreenPlay.GlobalVariables 1.0
import ScreenPlayEnums 1.0
import "../Common/" as SP
@ -86,19 +86,19 @@ ColumnLayout {
model: [{
"value": Settings.Stretch,
"value": ScreenPlayEnums.Stretch,
"text": qsTr("Stretch")
}, {
"value": Settings.Fill,
"value": ScreenPlayEnums.Fill,
"text": qsTr("Fill")
}, {
"value": Settings.Contain,
"value": ScreenPlayEnums.Contain,
"text": qsTr("Contain")
}, {
"value": Settings.Cover,
"value": ScreenPlayEnums.Cover,
"text": qsTr("Cover")
}, {
"value": Settings.Scale_Down,
"value": ScreenPlayEnums.Scale_Down,
"text": qsTr("Scale-Down")
}]
}

View File

@ -5,7 +5,7 @@ import QtQuick.Dialogs 1.2
import QtQuick.Controls.Material 2.2
import QtQuick.Layouts 1.3
import ScreenPlay.Settings 1.0
import ScreenPlay 1.0
Rectangle {

View File

@ -7,8 +7,8 @@ import QtGraphicalEffects 1.0
import Qt.labs.platform 1.0
import ScreenPlay 1.0
import ScreenPlay.Settings 1.0
import ScreenPlay.GlobalVariables 1.0
import ScreenPlayEnums 1.0
import "../Common"
@ -322,19 +322,19 @@ Item {
cbVideoFillMode.comboBox.currentValue)
model: [{
"value": GlobalVariables.Stretch,
"value": ScreenPlayEnums.Stretch,
"text": qsTr("Stretch")
}, {
"value": GlobalVariables.Fill,
"value": ScreenPlayEnums.Fill,
"text": qsTr("Fill")
}, {
"value": GlobalVariables.Contain,
"value": ScreenPlayEnums.Contain,
"text": qsTr("Contain")
}, {
"value": GlobalVariables.Cover,
"value": ScreenPlayEnums.Cover,
"text": qsTr("Cover")
}, {
"value": GlobalVariables.Scale_Down,
"value": ScreenPlayEnums.Scale_Down,
"text": qsTr("Scale-Down")
}]
}

View File

@ -16,6 +16,34 @@ namespace ScreenPlay {
*/
namespace Enums {
Q_NAMESPACE
enum class FillMode {
Stretch,
Fill,
Contain,
Cover,
Scale_Down
};
Q_ENUM_NS(FillMode)
enum class WallpaperType {
VideoWallpaper,
QMLWallpaper,
HTMLWallpaper
};
Q_ENUM_NS(WallpaperType)
enum class WidgetType {
QMLWidget,
HTMLWidget
};
Q_ENUM_NS(WidgetType)
}
class GlobalVariables : public QObject {
Q_OBJECT
@ -28,28 +56,8 @@ class GlobalVariables : public QObject {
public:
explicit GlobalVariables(QObject* parent = nullptr);
enum class FillMode {
Stretch,
Fill,
Contain,
Cover,
Scale_Down
};
Q_ENUM(FillMode)
enum class WallpaperType {
VideoWallpaper,
QMLWallpaper,
HTMLWallpaper
};
Q_ENUM(WallpaperType)
enum class WidgetType {
QMLWidget,
HTMLWidget
};
Q_ENUM(WidgetType)
/*!
\property GlobalVariables::localStoragePath

View File

@ -38,12 +38,12 @@ ScreenPlayManager::ScreenPlayManager(
if we call the method when using via the settings on startup to skip a unnecessary save.
*/
void ScreenPlayManager::createWallpaper(
const GlobalVariables::WallpaperType type,
const Enums::WallpaperType type,
const Enums::FillMode fillMode,
const QString& absoluteStoragePath,
const QString& previewImage,
QVector<int> monitorIndex,
const float volume,
const GlobalVariables::FillMode fillMode,
const bool saveToProfilesConfigFile)
{
if (m_telemetry) {
@ -88,13 +88,13 @@ void ScreenPlayManager::createWallpaper(
// Do not save on app start
if (saveToProfilesConfigFile) {
if (type == GlobalVariables::WallpaperType::VideoWallpaper) {
if (type == Enums::WallpaperType::VideoWallpaper) {
QJsonObject settings = wallpaper->getActiveSettingsJson();
saveWallpaperProfile("default", settings);
return;
}
if (type == GlobalVariables::WallpaperType::QMLWallpaper) {
if (type == Enums::WallpaperType::QMLWallpaper) {
QJsonObject settings;
settings.insert("monitors", monitors);
settings.insert("type", QVariant::fromValue(type).toString());
@ -114,7 +114,7 @@ void ScreenPlayManager::createWallpaper(
\brief Creates a ScreenPlayWidget object via a \a absoluteStoragePath and a \a preview image (relative path).
*/
void ScreenPlayManager::createWidget(
const GlobalVariables::WidgetType type,
const Enums::WidgetType type,
const QUrl& absoluteStoragePath,
const QString& previewImage)
{
@ -362,10 +362,10 @@ void ScreenPlayManager::loadWallpaperProfiles()
QString previewImage = wallpaperObj.value("previewImage").toString();
QString file = wallpaperObj.value("file").toString();
QString typeString = wallpaperObj.value("type").toString();
auto type = QStringToEnum<GlobalVariables::WallpaperType>(typeString, GlobalVariables::WallpaperType::VideoWallpaper);
auto fillMode = QStringToEnum<GlobalVariables::FillMode>(fillModeString, GlobalVariables::FillMode::Cover);
auto type = QStringToEnum<Enums::WallpaperType>(typeString, Enums::WallpaperType::VideoWallpaper);
auto fillMode = QStringToEnum<Enums::FillMode>(fillModeString, Enums::FillMode::Cover);
createWallpaper(type, absolutePath, previewImage, monitors, volume, fillMode, false);
createWallpaper(type, fillMode, absolutePath, previewImage, monitors, volume, false);
monitors.clear();
}
}

View File

@ -56,17 +56,18 @@ signals:
void activeWidgetsCounterChanged(int activeWidgetsCounter);
public slots:
// moc needs full enum namespace info see QTBUG-58454
void createWallpaper(
const GlobalVariables::WallpaperType type,
const ScreenPlay::Enums::WallpaperType type,
const ScreenPlay::Enums::FillMode fillMode,
const QString& absoluteStoragePath,
const QString& previewImage,
QVector<int> monitorIndex,
const float volume,
const GlobalVariables::FillMode fillMode,
const bool saveToProfilesConfigFile = true);
const bool saveToProfilesConfigFile);
void createWidget(
const GlobalVariables::WidgetType type,
const ScreenPlay::Enums::WidgetType type,
const QUrl& absoluteStoragePath,
const QString& previewImage);

View File

@ -19,8 +19,8 @@ ScreenPlayWallpaper::ScreenPlayWallpaper(const QVector<int>& screenNumber,
const QString& absolutePath,
const QString& previewImage,
const float volume,
const GlobalVariables::FillMode fillMode,
const GlobalVariables::WallpaperType type,
const Enums::FillMode fillMode,
const Enums::WallpaperType type,
const bool checkWallpaperVisible,
QObject* parent)
: QObject(parent)

View File

@ -25,7 +25,7 @@ class ScreenPlayWallpaper : public QObject {
Q_PROPERTY(QString absolutePath READ absolutePath WRITE setAbsolutePath NOTIFY absolutePathChanged)
Q_PROPERTY(QString previewImage READ previewImage WRITE setPreviewImage NOTIFY previewImageChanged)
Q_PROPERTY(QString appID READ appID WRITE setAppID NOTIFY appIDChanged)
Q_PROPERTY(GlobalVariables::WallpaperType type READ type WRITE setType NOTIFY typeChanged)
Q_PROPERTY(Enums::WallpaperType type READ type WRITE setType NOTIFY typeChanged)
public:
explicit ScreenPlayWallpaper(const QVector<int>& screenNumber,
@ -34,8 +34,8 @@ public:
const QString& absolutePath,
const QString& previewImage,
const float volume,
const GlobalVariables::FillMode fillMode,
const GlobalVariables::WallpaperType type,
const Enums::FillMode fillMode,
const Enums::WallpaperType type,
const bool checkWallpaperVisible,
QObject* parent = nullptr);
@ -45,7 +45,7 @@ public:
const QString& appID,
const QString& absolutePath,
const QString& previewImage,
const GlobalVariables::WallpaperType type,
const Enums::WallpaperType type,
const QJsonObject& profileJsonObject,
QObject* parent = nullptr);
@ -71,7 +71,7 @@ public:
return m_appID;
}
GlobalVariables::WallpaperType type() const
Enums::WallpaperType type() const
{
return m_type;
}
@ -105,7 +105,7 @@ signals:
void screenNumberChanged(QVector<int> screenNumber);
void previewImageChanged(QString previewImage);
void appIDChanged(QString appID);
void typeChanged(GlobalVariables::WallpaperType type);
void typeChanged(Enums::WallpaperType type);
void fileChanged(QString file);
void fillModeChanged(QString fillMode);
void absolutePathChanged(QString absolutePath);
@ -144,7 +144,7 @@ public slots:
emit appIDChanged(m_appID);
}
void setType(GlobalVariables::WallpaperType type)
void setType(Enums::WallpaperType type)
{
if (m_type == type)
return;
@ -210,7 +210,7 @@ private:
QVector<int> m_screenNumber;
QString m_previewImage;
GlobalVariables::WallpaperType m_type;
Enums::WallpaperType m_type;
QString m_appID;
QString m_file;
QString m_fillMode;

View File

@ -18,7 +18,7 @@ ScreenPlayWidget::ScreenPlayWidget(const QString& appID,
const QString& projectPath,
const QString& previewImage,
const QString& fullPath,
const GlobalVariables::WidgetType type)
const Enums::WidgetType type)
: QObject { nullptr }
, m_globalVariables { globalVariables }
, m_projectPath { projectPath }

View File

@ -19,7 +19,7 @@ class ScreenPlayWidget : public QObject {
Q_PROPERTY(QString previewImage READ previewImage WRITE setPreviewImage NOTIFY previewImageChanged)
Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged)
Q_PROPERTY(QString appID READ appID WRITE setAppID NOTIFY appIDChanged)
Q_PROPERTY(GlobalVariables::WidgetType type READ type WRITE setType NOTIFY typeChanged)
Q_PROPERTY(Enums::WidgetType type READ type WRITE setType NOTIFY typeChanged)
public:
explicit ScreenPlayWidget(
@ -28,7 +28,7 @@ public:
const QString& projectPath,
const QString& previewImage,
const QString& fullPath,
const GlobalVariables::WidgetType type);
const Enums::WidgetType type);
~ScreenPlayWidget() { }
@ -52,7 +52,7 @@ public:
return m_appID;
}
GlobalVariables::WidgetType type() const
Enums::WidgetType type() const
{
return m_type;
}
@ -94,7 +94,7 @@ public slots:
emit appIDChanged(m_appID);
}
void setType(GlobalVariables::WidgetType type)
void setType(Enums::WidgetType type)
{
if (m_type == type)
return;
@ -108,7 +108,7 @@ signals:
void previewImageChanged(QString previewImage);
void positionChanged(QPoint position);
void appIDChanged(QString appID);
void typeChanged(GlobalVariables::WidgetType type);
void typeChanged(Enums::WidgetType type);
private:
QProcess m_process;
@ -118,6 +118,6 @@ private:
QString m_previewImage;
QString m_appID;
QPoint m_position;
GlobalVariables::WidgetType m_type;
Enums::WidgetType m_type;
};
}

View File

@ -64,9 +64,9 @@ Settings::Settings(const std::shared_ptr<GlobalVariables>& globalVariables,
setHighPriorityStart(m_qSettings.value("ScreenPlayExecutable", false).toBool());
if (m_qSettings.contains("VideoFillMode")) {
auto value = m_qSettings.value("VideoFillMode").toString();
setVideoFillMode(QStringToEnum<GlobalVariables::FillMode>(value, GlobalVariables::FillMode::Cover));
setVideoFillMode(QStringToEnum<Enums::FillMode>(value, Enums::FillMode::Cover));
} else {
setVideoFillMode(GlobalVariables::FillMode::Cover);
setVideoFillMode(Enums::FillMode::Cover);
}
if (m_qSettings.contains("Theme")) {

View File

@ -1,10 +1,10 @@
#pragma once
#include <QApplication>
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QFontDatabase>
#include <QApplication>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
@ -49,7 +49,7 @@ class Settings : public QObject {
Q_PROPERTY(bool checkWallpaperVisible READ checkWallpaperVisible WRITE setCheckWallpaperVisible NOTIFY checkWallpaperVisibleChanged)
Q_PROPERTY(bool offlineMode READ offlineMode WRITE setOfflineMode NOTIFY offlineModeChanged)
Q_PROPERTY(GlobalVariables::FillMode videoFillMode READ videoFillMode WRITE setVideoFillMode NOTIFY videoFillModeChanged)
Q_PROPERTY(ScreenPlay::Enums::FillMode videoFillMode READ videoFillMode WRITE setVideoFillMode NOTIFY videoFillModeChanged)
Q_PROPERTY(Language language READ language WRITE setLanguage NOTIFY languageChanged)
Q_PROPERTY(Theme theme READ theme WRITE setTheme NOTIFY themeChanged)
@ -125,7 +125,7 @@ public:
return m_checkWallpaperVisible;
}
GlobalVariables::FillMode videoFillMode() const
ScreenPlay::Enums::FillMode videoFillMode() const
{
return m_videoFillMode;
}
@ -162,7 +162,7 @@ signals:
void silentStartChanged(bool silentStart);
void anonymousTelemetryChanged(bool anonymousTelemetry);
void checkWallpaperVisibleChanged(bool checkWallpaperVisible);
void videoFillModeChanged(GlobalVariables::FillMode videoFillMode);
void videoFillModeChanged(ScreenPlay::Enums::FillMode videoFillMode);
void languageChanged(Language language);
void fontChanged(QString font);
@ -191,7 +191,6 @@ public slots:
settings.sync();
} else {
settings.remove("ScreenPlay");
}
#endif
@ -282,7 +281,7 @@ public slots:
emit checkWallpaperVisibleChanged(m_checkWallpaperVisible);
}
void setVideoFillMode(GlobalVariables::FillMode videoFillMode)
void setVideoFillMode(ScreenPlay::Enums::FillMode videoFillMode)
{
if (m_videoFillMode == videoFillMode)
return;
@ -318,7 +317,7 @@ public slots:
if (m_theme == theme)
return;
setqSetting("Theme", QVariant::fromValue(theme).toString());
setqSetting("Theme", QVariant::fromValue(theme).toString());
m_theme = theme;
emit themeChanged(m_theme);
@ -342,9 +341,9 @@ private:
QString m_gitBuildHash;
QString m_decoder;
FillMode m_videoFillMode { FillMode::Cover };
ScreenPlay::Enums::FillMode m_videoFillMode { ScreenPlay::Enums::FillMode::Cover };
Language m_language { Language::En };
Theme m_theme { Theme::System };
QString m_font {"Roboto"};
QString m_font { "Roboto" };
};
}