OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MenuClickableEntryCfg.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10
11namespace ot {
12
14 public:
16 MenuClickableEntryCfg(const std::string& _name, const std::string& _text, const std::string& _iconPath = std::string());
18 virtual ~MenuClickableEntryCfg();
19
20 MenuClickableEntryCfg& operator = (const MenuClickableEntryCfg& _other);
21
25 virtual void addToJsonObject(ot::JsonValue& _object, ot::JsonAllocator& _allocator) const override;
26
30 virtual void setFromJsonObject(const ot::ConstJsonObject& _object) override;
31
32 void setName(const std::string& _name) { m_name = _name; };
33 const std::string& getName(void) const { return m_name; };
34
35 void setText(const std::string& _text) { m_text = _text; };
36 const std::string& getText(void) const { return m_text; };
37
38 void setIconPath(const std::string& _iconPath) { m_iconPath = _iconPath; };
39 const std::string& getIconPath(void) const { return m_iconPath; };
40
41 void setToolTip(const std::string& _toolTip) { m_toolTip = _toolTip; };
42 const std::string& getToolTip(void) const { return m_toolTip; };
43
44 private:
45 std::string m_name;
46 std::string m_text;
47 std::string m_iconPath;
48 std::string m_toolTip;
49 };
50
51}
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
Definition MenuClickableEntryCfg.h:13
void setName(const std::string &_name)
Definition MenuClickableEntryCfg.h:32
const std::string & getText(void) const
Definition MenuClickableEntryCfg.h:36
const std::string & getIconPath(void) const
Definition MenuClickableEntryCfg.h:39
void setToolTip(const std::string &_toolTip)
Definition MenuClickableEntryCfg.h:41
void setText(const std::string &_text)
Definition MenuClickableEntryCfg.h:35
void setIconPath(const std::string &_iconPath)
Definition MenuClickableEntryCfg.h:38
const std::string & getToolTip(void) const
Definition MenuClickableEntryCfg.h:42
const std::string & getName(void) const
Definition MenuClickableEntryCfg.h:33
Definition MenuEntryCfg.h:20
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