CPropertyBoolean.cpp 675 B

1234567891011121314151617181920212223242526272829
  1. #include "CPropertyBoolean.h"
  2. #include "WallpaperEngine/Core/Core.h"
  3. using namespace WallpaperEngine::Core::Projects;
  4. CPropertyBoolean* CPropertyBoolean::fromJSON (json data, const std::string& name)
  5. {
  6. json::const_iterator value = data.find ("value");
  7. json::const_iterator text = data.find ("type");
  8. return new CPropertyBoolean (
  9. *value,
  10. name,
  11. *text
  12. );
  13. }
  14. bool CPropertyBoolean::getValue ()
  15. {
  16. return &this->m_value;
  17. }
  18. CPropertyBoolean::CPropertyBoolean (bool value, const std::string& name, const std::string& text) :
  19. CProperty (name, Type, text),
  20. m_value (value)
  21. {
  22. }
  23. const std::string CPropertyBoolean::Type = "bool";