diff options
author | Saturneric <[email protected]> | 2022-01-15 02:47:45 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-15 02:47:45 +0000 |
commit | c692b99171e38acc0b8a162bab4a5f3f5641aeb9 (patch) | |
tree | 839411cb304dd6ada05fef9780a994a3d7f3aa8b /src/ui/data_struct/SettingsObject.h | |
parent | <doc, refactor>(ci): Tidy up code of core and related parts (diff) | |
download | GpgFrontend-c692b99171e38acc0b8a162bab4a5f3f5641aeb9.tar.gz GpgFrontend-c692b99171e38acc0b8a162bab4a5f3f5641aeb9.zip |
<doc, refactor>(ui): Tidy up part of the code of ui and related parts
1. Rename related entities.
2. Add comments.
Diffstat (limited to '')
-rw-r--r-- | src/ui/data_struct/SettingsObject.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/ui/data_struct/SettingsObject.h b/src/ui/data_struct/SettingsObject.h index af63b74f..3d26ae4b 100644 --- a/src/ui/data_struct/SettingsObject.h +++ b/src/ui/data_struct/SettingsObject.h @@ -31,20 +31,51 @@ namespace GpgFrontend::UI { +/** + * @brief + * + */ class SettingsObject : public nlohmann::json { public: + /** + * @brief Construct a new Settings Object object + * + * @param settings_name + */ explicit SettingsObject(std::string settings_name); + /** + * @brief Construct a new Settings Object object + * + * @param _sub_json + */ explicit SettingsObject(nlohmann::json _sub_json, bool); + /** + * @brief Destroy the Settings Object object + * + */ ~SettingsObject(); + /** + * @brief + * + * @param key + * @param default_value + * @return nlohmann::json& + */ nlohmann::json& Check(const std::string& key, nlohmann::json default_value); + /** + * @brief + * + * @param key + * @return SettingsObject + */ SettingsObject Check(const std::string& key); private: - std::string settings_name_; + std::string settings_name_; ///< }; } // namespace GpgFrontend::UI |