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, const nlohmann::json& default_value);
73 
80  SettingsObject Check(const std::string& key);
81 
82  private:
83  std::string settings_name_;
84 };
85 } // namespace GpgFrontend::UI
86 
87 #endif // GPGFRONTEND_SETTINGSOBJECT_H
GpgFrontend::UI
Definition: FileReadTask.cpp:31
GpgFrontend::SingletonFunctionObject< DataObjectOperator >::GetInstance
static DataObjectOperator & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
GpgFrontend::UI::SettingsObject::~SettingsObject
~SettingsObject()
Destroy the Settings Object object.
Definition: SettingsObject.cpp:100
GpgFrontend::UI::SettingsObject::Check
nlohmann::json & Check(const std::string &key, const nlohmann::json &default_value)
Definition: SettingsObject.cpp:31
GpgFrontend::UI::SettingsObject::SettingsObject
SettingsObject(std::string settings_name)
Construct a new Settings Object object.
Definition: SettingsObject.cpp:76
GpgFrontend::UI::SettingsObject
The SettingsObject class This class is used to store settings for the application securely.
Definition: SettingsObject.h:43