Salome HOME
Updated events for Model and minor other changes
[modules/shaper.git] / src / Config / Config_FeatureMessage.h
1 #ifndef CONFIG_MESSAGE_H\r
2 #define CONFIG_MESSAGE_H\r
3 \r
4 #include <Config.h>\r
5 #include <Event_Message.h>\r
6 \r
7 #include <string>\r
8 \r
9 /*\r
10  * Class to pass a feature entry extracted from xml file.\r
11  * Example of the feature entry:\r
12  * <feature id="Part" text="New part" tooltip="Creates a new part" icon=":pictures/part_ico.png"/>\r
13  */\r
14 class Config_FeatureMessage: public Event_Message\r
15 {\r
16   std::string myId;  //Feature unique id\r
17   std::string myText; //Represents action's text\r
18   std::string myTooltip;  //Represents action's tooltip\r
19   std::string myIcon; //Represents action's icon\r
20   std::string myKeysequence;  //Represents action's key sequence\r
21 \r
22   std::string myGroupId;  //Id of feature's group\r
23   std::string myWorkbenchId;  //Id of feature's workbench\r
24   std::string myPluginLibrary;  //Name of feature's library\r
25 \r
26 public:\r
27   //const Event_ID theID, const void* theSender = 0\r
28   CONFIG_EXPORT Config_FeatureMessage(const Event_ID theId, const void* theParent = 0);\r
29 \r
30   //TODO(sbh): Implement static method to extract event id [SEID]\r
31   //static const char* eventId() { return ""; }\r
32 \r
33   //Auto-generated getters/setters\r
34   CONFIG_EXPORT const std::string& icon() const;\r
35   CONFIG_EXPORT const std::string& id() const;\r
36   CONFIG_EXPORT const std::string& keysequence() const;\r
37   CONFIG_EXPORT const std::string& text() const;\r
38   CONFIG_EXPORT const std::string& tooltip() const;\r
39 \r
40   CONFIG_EXPORT const std::string& groupId() const;\r
41   CONFIG_EXPORT const std::string& workbenchId() const;\r
42   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
43 \r
44   CONFIG_EXPORT void setIcon(const std::string& icon);\r
45   CONFIG_EXPORT void setId(const std::string& id);\r
46   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
47   CONFIG_EXPORT void setText(const std::string& text);\r
48   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
49 \r
50   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
51   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
52   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
53 };\r
54 \r
55 #endif // CONFIG_MESSAGE_H