Salome HOME
Merge branch 'master' of newgeom:newgeom
[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 <Events_Message.h>\r
6 \r
7 #include <string>\r
8 \r
9 /// Event ID that feature is loaded (comes with Config_FeatureMessage)\r
10 static const char * EVENT_FEATURE_LOADED = "FeatureLoaded";\r
11 \r
12 /*\r
13  * Class to pass a feature entry extracted from xml file.\r
14  * Example of the feature entry:\r
15  * <feature id="Part" text="New part" tooltip="Creates a new part" icon=":pictures/part_ico.png"/>\r
16  */\r
17 class Config_FeatureMessage: public Events_Message\r
18 {\r
19   std::string myId;  //Feature unique id\r
20   std::string myText; //Represents action's text\r
21   std::string myTooltip;  //Represents action's tooltip\r
22   std::string myIcon; //Represents action's icon\r
23   std::string myKeysequence;  //Represents action's key sequence\r
24 \r
25   std::string myGroupId;  //Id of feature's group\r
26   std::string myWorkbenchId;  //Id of feature's workbench\r
27   std::string myPluginLibrary;  //Name of feature's library\r
28 \r
29   bool myUseInput; //Action is being checked until user commit the operation\r
30   bool myInternal; //Internal feature without GUI representation\r
31   std::string myNestedFeatures;\r
32 \r
33 public:\r
34   //const Events_ID theID, const void* theSender = 0\r
35   CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);\r
36 \r
37   //Auto-generated getters/setters\r
38   CONFIG_EXPORT const std::string& icon() const;\r
39   CONFIG_EXPORT const std::string& id() const;\r
40   CONFIG_EXPORT const std::string& keysequence() const;\r
41   CONFIG_EXPORT const std::string& text() const;\r
42   CONFIG_EXPORT const std::string& tooltip() const;\r
43 \r
44   CONFIG_EXPORT const std::string& groupId() const;\r
45   CONFIG_EXPORT const std::string& workbenchId() const;\r
46   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
47   CONFIG_EXPORT const std::string& nestedFeatures() const;\r
48   CONFIG_EXPORT bool isUseInput() const;\r
49   CONFIG_EXPORT bool isInternal() const;\r
50 \r
51   CONFIG_EXPORT void setIcon(const std::string& icon);\r
52   CONFIG_EXPORT void setId(const std::string& id);\r
53   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
54   CONFIG_EXPORT void setText(const std::string& text);\r
55   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
56   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
57   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
58   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
59   CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);\r
60   CONFIG_EXPORT void setUseInput(bool isUseInput);\r
61   CONFIG_EXPORT void setInternal(bool isInternal);\r
62 };\r
63 \r
64 #endif // CONFIG_MESSAGE_H\r