Salome HOME
Merge branch 'BR_PYTHON_PLUGIN' of newgeom:newgeom.git into Dev_0.6.1
[modules/shaper.git] / src / Config / Config_FeatureMessage.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D\r
2 \r
3 #ifndef CONFIG_MESSAGE_H\r
4 #define CONFIG_MESSAGE_H\r
5 \r
6 #include <Config_def.h>\r
7 #include <Events_Message.h>\r
8 \r
9 #include <string>\r
10 \r
11 /*\r
12  * Class to pass a feature entry extracted from xml file.\r
13  * Example of the feature entry:\r
14  * <feature id="Part" text="New part" tooltip="Creates a new part" icon=":pictures/part_ico.png"/>\r
15  */\r
16 class Config_FeatureMessage : public Events_Message\r
17 {\r
18   std::string myId;  //Feature unique id\r
19   std::string myText;  //Represents action's text\r
20   std::string myTooltip;  //Represents action's tooltip\r
21   std::string myIcon;  //Represents action's icon\r
22   std::string myKeysequence;  //Represents action's key sequence\r
23 \r
24   std::string myGroupId;  //Id of feature's group\r
25   std::string myWorkbenchId;  //Id of feature's workbench\r
26   std::string myDocumentKind;  // kind of the document of the workbench (all documents if empty)\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   /// Event ID that feature is loaded in workbench (GUI)\r
35   inline static const char* GUI_EVENT()\r
36   {\r
37     static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded");\r
38     return MY_GUI_EVENT_ID;\r
39   }\r
40   inline static const char* MODEL_EVENT()\r
41   {\r
42     static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded");\r
43     return MY_MODEL_EVENT_ID;\r
44   }\r
45 \r
46   //const Events_ID theID, const void* theSender = 0\r
47   CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);\r
48   CONFIG_EXPORT virtual ~Config_FeatureMessage();\r
49 \r
50   //Auto-generated getters/setters\r
51   CONFIG_EXPORT const std::string& icon() const;\r
52   CONFIG_EXPORT const std::string& id() const;\r
53   CONFIG_EXPORT const std::string& keysequence() const;\r
54   CONFIG_EXPORT const std::string& text() const;\r
55   CONFIG_EXPORT const std::string& tooltip() const;\r
56   CONFIG_EXPORT const std::string& groupId() const;\r
57   CONFIG_EXPORT const std::string& workbenchId() const;\r
58   CONFIG_EXPORT const std::string& documentKind() const;\r
59   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
60   CONFIG_EXPORT const std::string& nestedFeatures() const;\r
61   CONFIG_EXPORT bool isUseInput() const;\r
62   CONFIG_EXPORT bool isInternal() const;\r
63 \r
64   CONFIG_EXPORT void setIcon(const std::string& icon);\r
65   CONFIG_EXPORT void setId(const std::string& id);\r
66   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
67   CONFIG_EXPORT void setText(const std::string& text);\r
68   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
69   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
70   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
71   CONFIG_EXPORT void setDocumentKind(const std::string& documentKind);\r
72   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
73   CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);\r
74   CONFIG_EXPORT void setUseInput(bool isUseInput);\r
75   CONFIG_EXPORT void setInternal(bool isInternal);\r
76 };\r
77 \r
78 #endif // CONFIG_MESSAGE_H\r