OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MenuButtonDescription.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3#include <string>
4
5
6namespace ot {
7 class __declspec(dllexport) MenuButtonDescription
8 {
9 public:
10 MenuButtonDescription(const std::string& pageName, const std::string& groupName, const std::string& buttonName)
11 : _pageName(pageName), _groupName(groupName), _buttonName(buttonName)
12 {};
13 MenuButtonDescription(const std::string& pageName, const std::string& groupName, const std::string& subgroupName, const std::string& buttonName)
14 : _pageName(pageName), _groupName(groupName), _buttonName(buttonName), _subgroupName(subgroupName)
15 {};
16 MenuButtonDescription() {};
17
18 void SetDescription(const std::string& pageName, const std::string& groupName, const std::string& buttonName, const std::string& buttonText ="", const std::string& subgroupName = "")
19 {
20 _pageName = pageName;
21 _groupName = groupName;
22 _buttonName = buttonName;
23 _subgroupName = subgroupName;
24 if (buttonText == "")
25 {
26 _buttonText = buttonName;
27 }
28 else
29 {
30 _buttonText = buttonText;
31 }
32 }
33
34 const std::string GetPageName(void) { return _pageName; }
35 const std::string GetGroupName(void) { return _groupName; }
36 const std::string GetSubgroupName(void) { return _subgroupName; }
37 const std::string GetButtonName(void) { return _buttonName; }
38 const std::string GetButtonText(void) { return _buttonText; }
39
40 const std::string GetFullDescription()
41 {
42 if (_subgroupName == "")
43 {
44 return _pageName + ":" + _groupName + ":" + _buttonName;
45 }
46 else
47 {
48 return _pageName + ":" + _groupName + ":" + _subgroupName + ":" + _buttonName;
49 }
50 }
51 private:
52 std::string _pageName = "";
53 std::string _groupName = "";
54 std::string _subgroupName = "";
55 std::string _buttonName = "";
56 std::string _buttonText = "";
57 };
58}
Definition Connector.h:8