CUserSettingBoolean.h 815 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "CUserSettingValue.h"
  3. namespace WallpaperEngine::Core::Projects
  4. {
  5. class CProperty;
  6. }
  7. namespace WallpaperEngine::Core::UserSettings
  8. {
  9. class CUserSettingBoolean : public CUserSettingValue
  10. {
  11. public:
  12. static CUserSettingBoolean* fromJSON (nlohmann::json& data);
  13. static CUserSettingBoolean* fromScalar (bool value);
  14. static std::string Type;
  15. bool processValue (const std::vector<Projects::CProperty*>& properties);
  16. bool getDefaultValue ();
  17. private:
  18. CUserSettingBoolean (bool hasCondition, bool hasSource, bool defaultValue, std::string source, std::string expectedValue);
  19. bool m_default;
  20. bool m_hasCondition;
  21. bool m_hasSource;
  22. std::string m_source;
  23. std::string m_expectedValue;
  24. };
  25. }