15#define OT_FactoryKey_GraphicsLineItem "OT_GILine"
42 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
75 void setWidth(
double _width) { m_lineStyle.setWidth(_width); };
76 double getWidth(
void)
const {
return m_lineStyle.width(); };
#define OT_FactoryKey_GraphicsLineItem
Definition GraphicsLineItemCfg.h:15
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
Definition GraphicsLineItemCfg.h:21
const OutlineF & getLineStyle(void) const
Definition GraphicsLineItemCfg.h:87
void setFrom(double _x, double _y)
Set the line origin relative to the item's position. The coordinates must be greater or equal 0.
Definition GraphicsLineItemCfg.h:53
const Point2DD & getTo(void) const
Line destination relative to the item's position.
Definition GraphicsLineItemCfg.h:71
double getWidth(void) const
Definition GraphicsLineItemCfg.h:76
void setPainter(Painter2D *_painter)
Set the background painter. The item takes ownership of the painter.
Definition GraphicsLineItemCfg.h:81
const Point2DD & getFrom(void) const
Line origin relative to the item's position.
Definition GraphicsLineItemCfg.h:60
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 GraphicsLineItemCfg.h:45
void setTo(const Point2DD &_pt)
Set the line destination relative to the item's position. The coordinates must be greater or equal 0.
Definition GraphicsLineItemCfg.h:68
void setLineStyle(const OutlineF &_style)
Definition GraphicsLineItemCfg.h:86
void setTo(double _x, double _y)
Set the line destination relative to the item's position. The coordinates must be greater or equal 0.
Definition GraphicsLineItemCfg.h:64
void setFrom(const Point2DD &_pt)
Set the line origin relative to the item's position. The coordinates must be greater or equal 0.
Definition GraphicsLineItemCfg.h:57
void setWidth(double _width)
Set the line width. The value must be greater or equal to 0.
Definition GraphicsLineItemCfg.h:75
const Painter2D * getPainter(void) const
Background painter.
Definition GraphicsLineItemCfg.h:84
The OutlineF class is used to describe how a outline should look like.
Definition Outline.h:161
Definition Painter2D.h:17
2D Point with double values
Definition Point2D.h:144
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