14#define OT_FactoryKey_GraphicsTextItem "OT_GIText"
34 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
39 void setText(
const std::string& _text) { m_text = _text; };
40 const std::string&
getText(
void)
const {
return m_text; };
69 bool m_textIsReference;
#define OT_FactoryKey_GraphicsTextItem
Definition GraphicsTextItemCfg.h:14
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
The Color class is used to represent RGBA colors with integer values.
Definition Color.h:72
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
Definition GraphicsTextItemCfg.h:18
void setText(const std::string &_text)
Definition GraphicsTextItemCfg.h:39
void setTextFont(const Font &_font)
Definition GraphicsTextItemCfg.h:42
bool getTextIsReference(void) const
If enabled the set text will be used as a key for the string map.
Definition GraphicsTextItemCfg.h:63
void setTextIsReference(bool _isReference)
Sets the text is reference mode.
Definition GraphicsTextItemCfg.h:59
const Painter2D * getTextPainter(void) const
Definition GraphicsTextItemCfg.h:50
void setTextPainter(Painter2D *_painter)
Sets the text painter. The item takes ownership of the painter.
Definition GraphicsTextItemCfg.h:49
void setTextLineWidth(double _width)
Definition GraphicsTextItemCfg.h:52
void setTextColor(const Color &_color)
Definition GraphicsTextItemCfg.h:45
void setTextStyle(const OutlineF &_style)
Definition GraphicsTextItemCfg.h:54
const Font & getTextFont(void) const
Definition GraphicsTextItemCfg.h:43
const OutlineF & getTextStyle(void) const
Definition GraphicsTextItemCfg.h:55
const std::string & getText(void) const
Definition GraphicsTextItemCfg.h:40
virtual std::string getFactoryKey(void) const override
Returns the key that is used to create an instance of this class in the simple factory.
Definition GraphicsTextItemCfg.h:37
The OutlineF class is used to describe how a outline should look like.
Definition Outline.h:161
Definition Painter2D.h:17
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30