OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::StyleValue Class Reference

#include "StyleValue.h"

Inheritance diagram for ot::StyleValue:
ot::Serializable

Public Member Functions

 StyleValue ()
 
 StyleValue (const StyleValue &_other)
 
virtual ~StyleValue ()
 
StyleValueoperator= (const StyleValue &_other)
 
virtual void addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
void setKey (const std::string &_key)
 
const std::string & key (void) const
 
void setQss (const std::string &_qss)
 
const std::string & qss (void) const
 
void setColor (const ot::Color &_color)
 
const ot::Colorcolor (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0
 Add the object contents to the provided JSON object.
 

Constructor & Destructor Documentation

◆ StyleValue() [1/2]

ot::StyleValue::StyleValue ( )

◆ StyleValue() [2/2]

ot::StyleValue::StyleValue ( const StyleValue & _other)

◆ ~StyleValue()

ot::StyleValue::~StyleValue ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::StyleValue::addToJsonObject ( JsonValue & _object,
JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_documentThe JSON document (used to get the allocator)
_objectThe JSON object to add the contents to

◆ color()

const ot::Color & ot::StyleValue::color ( void ) const
inline

◆ key()

const std::string & ot::StyleValue::key ( void ) const
inline

◆ operator=()

ot::StyleValue & ot::StyleValue::operator= ( const StyleValue & _other)

◆ qss()

const std::string & ot::StyleValue::qss ( void ) const
inline

◆ setColor()

void ot::StyleValue::setColor ( const ot::Color & _color)
inline

◆ setFromJsonObject()

void ot::StyleValue::setFromJsonObject ( const ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setKey()

void ot::StyleValue::setKey ( const std::string & _key)
inline

◆ setQss()

void ot::StyleValue::setQss ( const std::string & _qss)
inline

The documentation for this class was generated from the following files: