Salome HOME
Concealed objects now also ersaed in the viewer
[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_def.h>\r
5 #include <Events_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 Events_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 myDocumentKind;  // kind of the document of the workbench (all documents if empty)\r
25   std::string myPluginLibrary;  //Name of feature's library\r
26 \r
27   bool myUseInput;  //Action is being checked until user commit the operation\r
28   bool myInternal;  //Internal feature without GUI representation\r
29   std::string myNestedFeatures;\r
30 \r
31  public:\r
32   /// Event ID that feature is loaded in workbench (GUI)\r
33   inline static const char* GUI_EVENT()\r
34   {\r
35     static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded");\r
36     return MY_GUI_EVENT_ID;\r
37   }\r
38   inline static const char* MODEL_EVENT()\r
39   {\r
40     static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded");\r
41     return MY_MODEL_EVENT_ID;\r
42   }\r
43 \r
44   //const Events_ID theID, const void* theSender = 0\r
45   CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);\r
46   CONFIG_EXPORT virtual ~Config_FeatureMessage();\r
47 \r
48   //Auto-generated getters/setters\r
49   CONFIG_EXPORT const std::string& icon() const;\r
50   CONFIG_EXPORT const std::string& id() const;\r
51   CONFIG_EXPORT const std::string& keysequence() const;\r
52   CONFIG_EXPORT const std::string& text() const;\r
53   CONFIG_EXPORT const std::string& tooltip() const;\r
54   CONFIG_EXPORT const std::string& groupId() const;\r
55   CONFIG_EXPORT const std::string& workbenchId() const;\r
56   CONFIG_EXPORT const std::string& documentKind() const;\r
57   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
58   CONFIG_EXPORT const std::string& nestedFeatures() const;\r
59   CONFIG_EXPORT bool isUseInput() const;\r
60   CONFIG_EXPORT bool isInternal() const;\r
61 \r
62   CONFIG_EXPORT void setIcon(const std::string& icon);\r
63   CONFIG_EXPORT void setId(const std::string& id);\r
64   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
65   CONFIG_EXPORT void setText(const std::string& text);\r
66   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
67   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
68   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
69   CONFIG_EXPORT void setDocumentKind(const std::string& documentKind);\r
70   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
71   CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);\r
72   CONFIG_EXPORT void setUseInput(bool isUseInput);\r
73   CONFIG_EXPORT void setInternal(bool isInternal);\r
74 };\r
75 \r
76 #endif // CONFIG_MESSAGE_H\r