[libcalamaresui] Expose Branding strings to QML

This commit is contained in:
Camilo Higuita 2019-12-13 14:22:15 +01:00 committed by Adriaan de Groot
parent ca13d1670e
commit 1f2f1a657e
2 changed files with 12 additions and 3 deletions

View File

@ -3,6 +3,7 @@
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org> * Copyright 2017-2019, Adriaan de Groot <groot@kde.org>
* Copyright 2018, Raul Rodrigo Segura (raurodse) * Copyright 2018, Raul Rodrigo Segura (raurodse)
* Copyright 2019, Camilo Higuita <milo.h@aol.com>
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -74,7 +75,8 @@ const QStringList Branding::s_imageEntryStrings =
{ {
"productLogo", "productLogo",
"productIcon", "productIcon",
"productWelcome" "productWelcome",
"productWallpaper"
}; };
const QStringList Branding::s_styleEntryStrings = const QStringList Branding::s_styleEntryStrings =

View File

@ -3,6 +3,7 @@
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org> * Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
* Copyright 2018, Raul Rodrigo Segura (raurodse) * Copyright 2018, Raul Rodrigo Segura (raurodse)
* Copyright 2019, Camilo Higuita <milo.h@aol.com>
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -48,7 +49,7 @@ public:
* e.g. *Branding::ProductName to get the string value for * e.g. *Branding::ProductName to get the string value for
* the product name. * the product name.
*/ */
enum StringEntry : short enum StringEntry
{ {
ProductName, ProductName,
Version, Version,
@ -62,13 +63,16 @@ public:
KnownIssuesUrl, KnownIssuesUrl,
ReleaseNotesUrl ReleaseNotesUrl
}; };
Q_ENUM( StringEntry )
enum ImageEntry : short enum ImageEntry : short
{ {
ProductLogo, ProductLogo,
ProductIcon, ProductIcon,
ProductWelcome ProductWelcome,
ProductWallpaper
}; };
Q_ENUM( ImageEntry )
enum StyleEntry : short enum StyleEntry : short
{ {
@ -77,6 +81,7 @@ public:
SidebarTextSelect, SidebarTextSelect,
SidebarTextHighlight SidebarTextHighlight
}; };
Q_ENUM( StyleEntry )
/** @brief Setting for how much the main window may expand. */ /** @brief Setting for how much the main window may expand. */
enum class WindowExpansion enum class WindowExpansion
@ -85,6 +90,7 @@ public:
Fullscreen, Fullscreen,
Fixed Fixed
}; };
Q_ENUM( WindowExpansion )
/** @brief Setting for the main window size. /** @brief Setting for the main window size.
* *
* The units are pixels (Pixies) or something-based-on-fontsize (Fonties), which * The units are pixels (Pixies) or something-based-on-fontsize (Fonties), which
@ -96,6 +102,7 @@ public:
Pixies, Pixies,
Fonties Fonties
}; };
Q_ENUM( WindowDimensionUnit )
class WindowDimension : public NamedSuffix< WindowDimensionUnit, WindowDimensionUnit::None > class WindowDimension : public NamedSuffix< WindowDimensionUnit, WindowDimensionUnit::None >
{ {
public: public: