linux-wallpaperengine/src/WallpaperEngine/Core/Projects/CPropertyText.cpp
Alexis Maiquez cf37fe388c Added support for usersettings in the bloom
Added casting for integer to double in json loading
Added support for dumping all available properties

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-01-31 21:37:38 +01:00

33 lines
701 B
C++

#include <sstream>
#include "CPropertyText.h"
#include "WallpaperEngine/Core/Core.h"
using namespace WallpaperEngine::Core::Projects;
CPropertyText* CPropertyText::fromJSON (json data, const std::string& name)
{
json::const_iterator text = data.find ("type");
return new CPropertyText (
name,
*text
);
}
std::string CPropertyText::dump () const
{
std::stringstream ss;
ss
<< this->m_name << " - text" << std::endl
<< "\t" << "Value: " << this->m_text;
return ss.str();
}
CPropertyText::CPropertyText (const std::string& name, const std::string& text) :
CProperty (name, Type, text)
{
}
const std::string CPropertyText::Type = "text";