CPropertyText.cpp 701 B

123456789101112131415161718192021222324252627282930313233
  1. #include <sstream>
  2. #include "CPropertyText.h"
  3. #include "WallpaperEngine/Core/Core.h"
  4. using namespace WallpaperEngine::Core::Projects;
  5. CPropertyText* CPropertyText::fromJSON (json data, const std::string& name)
  6. {
  7. json::const_iterator text = data.find ("type");
  8. return new CPropertyText (
  9. name,
  10. *text
  11. );
  12. }
  13. std::string CPropertyText::dump () const
  14. {
  15. std::stringstream ss;
  16. ss
  17. << this->m_name << " - text" << std::endl
  18. << "\t" << "Value: " << this->m_text;
  19. return ss.str();
  20. }
  21. CPropertyText::CPropertyText (const std::string& name, const std::string& text) :
  22. CProperty (name, Type, text)
  23. {
  24. }
  25. const std::string CPropertyText::Type = "text";