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
36namespace GpgFrontend::UI {
37
43class 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
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: VerifyDetailsDialog.cpp:33