X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_FeatureMessage.h;h=f890f44c3f8f42f743e6774a0e996b126eb2d8ab;hb=60e95a5502a6940c6c27ce5d561b3c684b0b0a4f;hp=752169fb4d0bb673653ed465d3881663ee15abfc;hpb=85496126f5139ba1b15861e7fd8bbbc23b835fd9;p=modules%2Fshaper.git diff --git a/src/Config/Config_FeatureMessage.h b/src/Config/Config_FeatureMessage.h index 752169fb4..f890f44c3 100644 --- a/src/Config/Config_FeatureMessage.h +++ b/src/Config/Config_FeatureMessage.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + #ifndef CONFIG_MESSAGE_H #define CONFIG_MESSAGE_H @@ -6,31 +8,42 @@ #include -/// Event ID that feature is loaded (comes with Config_FeatureMessage) -static const char * EVENT_FEATURE_LOADED = "FeatureLoaded"; - -/* - * Class to pass a feature entry extracted from xml file. +/*! + * \class Config_FeatureMessage + * \brief Class to pass a feature entry extracted from xml file. * Example of the feature entry: * */ -class Config_FeatureMessage: public Events_Message +class Config_FeatureMessage : public Events_Message { std::string myId; //Feature unique id - std::string myText; //Represents action's text + std::string myText; //Represents action's text std::string myTooltip; //Represents action's tooltip - std::string myIcon; //Represents action's icon + std::string myIcon; //Represents action's icon std::string myKeysequence; //Represents action's key sequence std::string myGroupId; //Id of feature's group std::string myWorkbenchId; //Id of feature's workbench + std::string myDocumentKind; // kind of the document of the workbench (all documents if empty) std::string myPluginLibrary; //Name of feature's library - bool myUseInput; //Action is being checked until user commit the operation - bool myInternal; //Internal feature without GUI representation + bool myUseInput; //Action is being checked until user commit the operation + bool myInternal; //Internal feature without GUI representation std::string myNestedFeatures; -public: + public: + /// Event ID that feature is loaded in workbench (GUI) + inline static const char* GUI_EVENT() + { + static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded"); + return MY_GUI_EVENT_ID; + } + inline static const char* MODEL_EVENT() + { + static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded"); + return MY_MODEL_EVENT_ID; + } + //const Events_ID theID, const void* theSender = 0 CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0); CONFIG_EXPORT virtual ~Config_FeatureMessage(); @@ -41,9 +54,9 @@ public: CONFIG_EXPORT const std::string& keysequence() const; CONFIG_EXPORT const std::string& text() const; CONFIG_EXPORT const std::string& tooltip() const; - CONFIG_EXPORT const std::string& groupId() const; CONFIG_EXPORT const std::string& workbenchId() const; + CONFIG_EXPORT const std::string& documentKind() const; CONFIG_EXPORT const std::string& pluginLibrary() const; CONFIG_EXPORT const std::string& nestedFeatures() const; CONFIG_EXPORT bool isUseInput() const; @@ -56,6 +69,7 @@ public: CONFIG_EXPORT void setTooltip(const std::string& tooltip); CONFIG_EXPORT void setGroupId(const std::string& groupId); CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId); + CONFIG_EXPORT void setDocumentKind(const std::string& documentKind); CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary); CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures); CONFIG_EXPORT void setUseInput(bool isUseInput);