diff options
Diffstat (limited to 'src/common/settings_common.h')
| -rw-r--r-- | src/common/settings_common.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 2b5c72f41..664c807f1 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h | |||
| @@ -43,6 +43,17 @@ enum class Category : u32 { | |||
| 43 | MaxEnum, | 43 | MaxEnum, |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | enum class Specialization : u32 { | ||
| 47 | Default, | ||
| 48 | Time, | ||
| 49 | Hex, | ||
| 50 | List, | ||
| 51 | RuntimeList, | ||
| 52 | Scalar, | ||
| 53 | Countable, | ||
| 54 | Paired, | ||
| 55 | }; | ||
| 56 | |||
| 46 | bool IsConfiguringGlobal(); | 57 | bool IsConfiguringGlobal(); |
| 47 | void SetConfiguringGlobal(bool is_global); | 58 | void SetConfiguringGlobal(bool is_global); |
| 48 | 59 | ||
| @@ -64,7 +75,7 @@ public: | |||
| 64 | class BasicSetting { | 75 | class BasicSetting { |
| 65 | protected: | 76 | protected: |
| 66 | explicit BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, | 77 | explicit BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, |
| 67 | bool save_, bool runtime_modifiable_); | 78 | bool save_, bool runtime_modifiable_, Specialization spec); |
| 68 | 79 | ||
| 69 | public: | 80 | public: |
| 70 | virtual ~BasicSetting(); | 81 | virtual ~BasicSetting(); |
| @@ -181,6 +192,11 @@ public: | |||
| 181 | [[nodiscard]] enum Category Category() const; | 192 | [[nodiscard]] enum Category Category() const; |
| 182 | 193 | ||
| 183 | /** | 194 | /** |
| 195 | * @returns Extra metadata for data representation in frontend implementations. | ||
| 196 | */ | ||
| 197 | [[nodiscard]] enum Specialization Specialization() const; | ||
| 198 | |||
| 199 | /** | ||
| 184 | * Returns the label this setting was created with. | 200 | * Returns the label this setting was created with. |
| 185 | * | 201 | * |
| 186 | * @returns A reference to the label | 202 | * @returns A reference to the label |
| @@ -219,6 +235,8 @@ private: | |||
| 219 | const bool save; ///< Suggests if the setting should be saved and read to a frontend config | 235 | const bool save; ///< Suggests if the setting should be saved and read to a frontend config |
| 220 | const bool | 236 | const bool |
| 221 | runtime_modifiable; ///< Suggests if the setting can be modified while a guest is running | 237 | runtime_modifiable; ///< Suggests if the setting can be modified while a guest is running |
| 238 | const enum Specialization | ||
| 239 | specialization; ///< Extra data to identify representation of a setting | ||
| 222 | }; | 240 | }; |
| 223 | 241 | ||
| 224 | } // namespace Settings | 242 | } // namespace Settings |