Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.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 Config_FeatureMessage\r
13  * \brief Class to pass a feature entry extracted from xml file.\r
14  * Example of the feature entry:\r
15  * \code\r
16  * <feature id="Part" text="New part" tooltip="Creates a new part" icon=":pictures/part_ico.png"/>\r
17  * \endcode\r
18  */\r
19 class Config_FeatureMessage : public Events_Message\r
20 {\r
21   std::string myId;  //Feature unique id\r
22   std::string myText;  //Represents action's text\r
23   std::string myTooltip;  //Represents action's tooltip\r
24   std::string myIcon;  //Represents action's icon\r
25   std::string myKeysequence;  //Represents action's key sequence\r
26 \r
27   std::string myGroupId;  //Id of feature's group\r
28   std::string myWorkbenchId;  //Id of feature's workbench\r
29   std::string myDocumentKind;  // kind of the document of the workbench (all documents if empty)\r
30   std::string myPluginLibrary;  //Name of feature's library\r
31 \r
32   bool myUseInput;  //Action is being checked until user commit the operation\r
33   bool myInternal;  //Internal feature without GUI representation\r
34   std::string myNestedFeatures;\r
35 \r
36  public:\r
37   /// Event ID that feature is loaded in workbench (GUI)\r
38   inline static const char* GUI_EVENT()\r
39   {\r
40     static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded");\r
41     return MY_GUI_EVENT_ID;\r
42   }\r
43   inline static const char* MODEL_EVENT()\r
44   {\r
45     static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded");\r
46     return MY_MODEL_EVENT_ID;\r
47   }\r
48 \r
49   //const Events_ID theID, const void* theSender = 0\r
50   CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);\r
51   CONFIG_EXPORT virtual ~Config_FeatureMessage();\r
52 \r
53   //Auto-generated getters/setters\r
54   CONFIG_EXPORT const std::string& icon() const;\r
55   CONFIG_EXPORT const std::string& id() const;\r
56   CONFIG_EXPORT const std::string& keysequence() const;\r
57   CONFIG_EXPORT const std::string& text() const;\r
58   CONFIG_EXPORT const std::string& tooltip() const;\r
59   CONFIG_EXPORT const std::string& groupId() const;\r
60   CONFIG_EXPORT const std::string& workbenchId() const;\r
61   CONFIG_EXPORT const std::string& documentKind() const;\r
62   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
63   CONFIG_EXPORT const std::string& nestedFeatures() const;\r
64   CONFIG_EXPORT bool isUseInput() const;\r
65   CONFIG_EXPORT bool isInternal() const;\r
66 \r
67   CONFIG_EXPORT void setIcon(const std::string& icon);\r
68   CONFIG_EXPORT void setId(const std::string& id);\r
69   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
70   CONFIG_EXPORT void setText(const std::string& text);\r
71   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
72   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
73   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
74   CONFIG_EXPORT void setDocumentKind(const std::string& documentKind);\r
75   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
76   CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);\r
77   CONFIG_EXPORT void setUseInput(bool isUseInput);\r
78   CONFIG_EXPORT void setInternal(bool isInternal);\r
79 };\r
80 \r
81 #endif // CONFIG_MESSAGE_H\r