GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
SettingsObject.h
1 
29 #ifndef GPGFRONTEND_SETTINGSOBJECT_H
30 #define GPGFRONTEND_SETTINGSOBJECT_H
31 
32 #include <utility>
33 
34 #include "core/function/DataObjectOperator.h"
35 
36 namespace GpgFrontend::UI {
37 
43 class SettingsObject : public nlohmann::json {
44  public:
50  explicit SettingsObject(std::string settings_name);
51 
57  explicit SettingsObject(nlohmann::json _sub_json, bool);
58 
64 
72  nlohmann::json& Check(const std::string& key,
73  const nlohmann::json& default_value);
74 
81  SettingsObject Check(const std::string& key);
82 
83  private:
84  std::string settings_name_;
85 };
86 } // namespace GpgFrontend::UI
87 
88 #endif // GPGFRONTEND_SETTINGSOBJECT_H
The SettingsObject class This class is used to store settings for the application securely.
Definition: SettingsObject.h:43
nlohmann::json & Check(const std::string &key, const nlohmann::json &default_value)
Definition: SettingsObject.cpp:31
SettingsObject(std::string settings_name)
Construct a new Settings Object object.
Definition: SettingsObject.cpp:76
~SettingsObject()
Destroy the Settings Object object.
Definition: SettingsObject.cpp:100
Definition: FileReadTask.cpp:29