OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsFlowItem.h
Go to the documentation of this file.
1
5// ###########################################################################################################################################################################################################################################################################################################################
6
7#pragma once
8
9// OpenTwin header
12
13namespace ot {
14
17 public:
19 Input, // Triangle
21 InputOptional, // Circle
22 Output, // Triangle
24 OutputOptional // Circle
25 };
26
28 GraphicsFlowItem(const std::string& _name);
29 GraphicsFlowItem(const std::string& _name, const std::string& _title);
30 virtual ~GraphicsFlowItem();
31
32 void setName(const std::string& _name) { m_builder.setName(_name); };
33 const std::string& name(void) const { return m_builder.name(); };
34
35 void setTitle(const std::string& _title) { m_builder.setTitle(_title); };
36 const std::string& title(void) const { return m_builder.title(); };
37
38 void setToolTip(const std::string& _toolTip) { m_builder.setToolTip(_toolTip); };
39
40 void setTitleColor(const ot::Color& _color) { m_builder.setTitleBackgroundGradientColor(_color); };
41
42 void setBackgroundImagePath(const std::string& _path) { m_builder.setBackgroundImagePath(_path); };
43
44 void setLeftTitleCornerImagePath(const std::string& _path) { m_builder.setLeftTitleCornerImagePath(_path); };
45
46 void setRightTitleCornerImagePath(const std::string& _path) { m_builder.setRightTitleCornerImagePath(_path); };
47
48 void addConnector(const std::string& _name, FlowConnectorType _type, const std::string& _tip = std::string());
49 void addConnector(const std::string& _name, const std::string& _title, FlowConnectorType _type, const std::string& _tip = std::string());
50
53 GraphicsItemCfg* createGraphicsItem(void) const { return m_builder.createGraphicsItem(); };
54
55 private:
56 void ini(void);
57
59 };
60
61}
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_GUIAPI_API_EXPORT
Definition OTGuiAPIAPIExport.h:6
The Color class is used to represent RGBA colors with integer values.
Definition Color.h:72
Definition GraphicsFlowItemBuilder.h:103
Definition GraphicsFlowItem.h:15
GraphicsItemCfg * createGraphicsItem(void) const
Creates a GraphicsItemCfg in the "OpenTwin flow block" style that takes the current configuration int...
Definition GraphicsFlowItem.h:53
void setBackgroundImagePath(const std::string &_path)
Definition GraphicsFlowItem.h:42
const std::string & title(void) const
Definition GraphicsFlowItem.h:36
FlowConnectorType
Definition GraphicsFlowItem.h:18
@ InputSecondary
Definition GraphicsFlowItem.h:20
@ Input
Definition GraphicsFlowItem.h:19
@ InputOptional
Definition GraphicsFlowItem.h:21
@ OutputSecondary
Definition GraphicsFlowItem.h:23
@ Output
Definition GraphicsFlowItem.h:22
void setTitleColor(const ot::Color &_color)
Definition GraphicsFlowItem.h:40
void setTitle(const std::string &_title)
Definition GraphicsFlowItem.h:35
void setLeftTitleCornerImagePath(const std::string &_path)
Definition GraphicsFlowItem.h:44
void setToolTip(const std::string &_toolTip)
Definition GraphicsFlowItem.h:38
void setRightTitleCornerImagePath(const std::string &_path)
Definition GraphicsFlowItem.h:46
void setName(const std::string &_name)
Definition GraphicsFlowItem.h:32
const std::string & name(void) const
Definition GraphicsFlowItem.h:33
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
Definition Connector.h:8