mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Instead of relying on the order in which the apps are passed at compile time, the look of the Home app is defined in a config file, and depends on the country chosen. Change-Id: If7f56a284e0001d6d75ece1e7efdf5fd1d0a9978
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
#ifndef COUNTRY_PREFERENCES_H
|
|
#define COUNTRY_PREFERENCES_H
|
|
|
|
#include <poincare/preferences.h>
|
|
|
|
class CountryPreferences {
|
|
public:
|
|
enum class AvailableExamModes : uint8_t {
|
|
StandardOnly,
|
|
All
|
|
};
|
|
|
|
enum class MethodForQuartiles : uint8_t {
|
|
MedianOfSublist,
|
|
CumulatedFrequency
|
|
};
|
|
|
|
enum class HomeAppsLayout : uint8_t {
|
|
Default,
|
|
HidePython,
|
|
};
|
|
|
|
constexpr CountryPreferences(AvailableExamModes availableExamModes, MethodForQuartiles methodForQuartiles, Poincare::Preferences::UnitFormat unitFormat, HomeAppsLayout homeAppsLayout) :
|
|
m_availableExamModes(availableExamModes),
|
|
m_methodForQuartiles(methodForQuartiles),
|
|
m_unitFormat(unitFormat),
|
|
m_homeAppsLayout(homeAppsLayout)
|
|
{}
|
|
|
|
constexpr AvailableExamModes availableExamModes() const { return m_availableExamModes; }
|
|
constexpr MethodForQuartiles methodForQuartiles() const { return m_methodForQuartiles; }
|
|
constexpr Poincare::Preferences::UnitFormat unitFormat() const { return m_unitFormat; }
|
|
constexpr HomeAppsLayout homeAppsLayout() const { return m_homeAppsLayout; }
|
|
|
|
private:
|
|
const AvailableExamModes m_availableExamModes;
|
|
const MethodForQuartiles m_methodForQuartiles;
|
|
const Poincare::Preferences::UnitFormat m_unitFormat;
|
|
const HomeAppsLayout m_homeAppsLayout;
|
|
};
|
|
|
|
#endif
|