18#define OT_FactoryKey_GraphicsPolygonItem "OT_GIPoly"
41 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
56 void setPoints(
const std::list<Point2DD>& _points) { m_points = _points; };
59 std::list<Point2DD>&
getPoints(
void) {
return m_points; };
62 const std::list<Point2DD>&
getPoints(
void)
const {
return m_points; };
67 void setBackgroundPainter(
Painter2D* _painter);
106 std::list<Point2DD> m_points;
#define OT_FactoryKey_GraphicsPolygonItem
Definition GraphicsPolygonItemCfg.h:18
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 GraphicsPolygonItemCfg.h:24
bool getFillPolygon(void) const
If fill polygon is enabled the polygon will be filled, otherwise only the outline will be drawn.
Definition GraphicsPolygonItemCfg.h:102
double getOutlineWidth(void) const
Outline width.
Definition GraphicsPolygonItemCfg.h:95
void setOutlinePainter(Painter2D *_painter)
Set the outline painter. The item takes ownership of the painter.
Definition GraphicsPolygonItemCfg.h:85
const OutlineF & getOutline(void) const
Outlin.
Definition GraphicsPolygonItemCfg.h:81
void setPoints(const std::list< Point2DD > &_points)
Set the outline points.
Definition GraphicsPolygonItemCfg.h:56
const std::list< Point2DD > & getPoints(void) const
Outline points const reference.
Definition GraphicsPolygonItemCfg.h:62
const Painter2D * getOutlinePainter(void) const
Outline painter.
Definition GraphicsPolygonItemCfg.h:88
const Painter2D * getBackgroundPainter(void) const
Background painter.
Definition GraphicsPolygonItemCfg.h:70
void setFillPolygon(bool _fill)
Set the fill property.
Definition GraphicsPolygonItemCfg.h:99
void setOutline(const OutlineF &_outline)
Set the outline.
Definition GraphicsPolygonItemCfg.h:78
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 GraphicsPolygonItemCfg.h:44
std::list< Point2DD > & getPoints(void)
Outline points reference.
Definition GraphicsPolygonItemCfg.h:59
void addPoint(const Point2DD &_pt)
Will append the provided point to the point list.
Definition GraphicsPolygonItemCfg.h:52
void setOutlineWidth(double _w)
Set the outline width.
Definition GraphicsPolygonItemCfg.h:92
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