OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsStackItemCfg.h
Go to the documentation of this file.
1
5// ###########################################################################################################################################################################################################################################################################################################################
6
7#pragma once
8
9// OpenTwin header
11
12#define OT_FactoryKey_GraphicsStackItem "OT_GIStack"
13
14namespace ot {
15
18 public:
24
26 virtual ~GraphicsStackItemCfg();
27
29 virtual GraphicsItemCfg* createCopy(void) const override;
30
34 virtual void addToJsonObject(JsonValue& _object, JsonAllocator& _allocator) const override;
35
39 virtual void setFromJsonObject(const ConstJsonObject& _object) override;
40
42 virtual std::string getFactoryKey(void) const override { return std::string(OT_FactoryKey_GraphicsStackItem); };
43
49 void addItemTop(ot::GraphicsItemCfg* _item, bool _isMaster, bool _isSlave);
50
56 void addItemBottom(ot::GraphicsItemCfg* _item, bool _isMaster, bool _isSlave);
57
60 const std::list<GraphicsStackItemCfgEntry>& items(void) const { return m_items; };
61
62 private:
63 void memClear(void);
64
65 std::list<GraphicsStackItemCfgEntry> m_items;
66
67 };
68
69}
#define OT_FactoryKey_GraphicsStackItem
Definition GraphicsStackItemCfg.h:12
#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 GraphicsStackItemCfg.h:17
const std::list< GraphicsStackItemCfgEntry > & items(void) const
Returns a list with all items in the stack 0: bottom, n: top.
Definition GraphicsStackItemCfg.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 GraphicsStackItemCfg.h:42
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
Definition GraphicsStackItemCfg.h:19
ot::GraphicsItemCfg * item
Definition GraphicsStackItemCfg.h:20
bool isMaster
Definition GraphicsStackItemCfg.h:21
bool isSlave
Definition GraphicsStackItemCfg.h:22