OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertyPainter2D.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTGui/Property.h"
11
12namespace ot {
13
14 class Painter2D;
15
18 public:
20 PropertyPainter2D(const PropertyBase& _base);
21
25
28 PropertyPainter2D(Painter2D* _painter, PropertyFlags _flags = PropertyFlags(NoFlags));
29
32 PropertyPainter2D(const Painter2D* _painter, PropertyFlags _flags = PropertyFlags(NoFlags));
33
36 PropertyPainter2D(const std::string& _name, Painter2D* _painter, PropertyFlags _flags = PropertyFlags(NoFlags));
37
40 PropertyPainter2D(const std::string& _name, const Painter2D* _painter, PropertyFlags _flags = PropertyFlags(NoFlags));
41 virtual ~PropertyPainter2D();
42
43 static std::string propertyTypeString(void) { return "Painter2D"; };
44 virtual std::string getPropertyType(void) const override { return PropertyPainter2D::propertyTypeString(); };
45
46 virtual Property* createCopy(void) const override;
47
50 void setPainter(Painter2D* _painter);
51 const Painter2D* getPainter(void) const { return m_painter; };
52
53 protected:
58 virtual void getPropertyData(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
59
63 virtual void setPropertyData(const ot::ConstJsonObject& _object) override;
64
65 private:
66 Painter2D* m_painter;
67 };
68
69}
#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
Definition Painter2D.h:17
The PropertyBase class is used to hold general Property information.
Definition PropertyBase.h:25
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21
Definition PropertyPainter2D.h:16
static std::string propertyTypeString(void)
Definition PropertyPainter2D.h:43
virtual std::string getPropertyType(void) const override
Definition PropertyPainter2D.h:44
const Painter2D * getPainter(void) const
Definition PropertyPainter2D.h:51
Definition Connector.h:8
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