X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Events.h;h=247f51bc3cb1422429b60b19077425c8d8a4d466;hb=766ce5d72bbae841d6c042befdf95e7d945039e1;hp=61b4d7bf09aed0c84a794cd33a41bb6f70400647;hpb=264b53a6292f1a50fbe94ffc62b931c4a047c256;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Events.h b/src/ModelAPI/ModelAPI_Events.h index 61b4d7bf0..247f51bc3 100644 --- a/src/ModelAPI/ModelAPI_Events.h +++ b/src/ModelAPI/ModelAPI_Events.h @@ -119,10 +119,12 @@ MAYBE_UNUSED static const char * EVENT_DOF_OBJECTS = "DoFObjects"; /// Event ID that requests updates visual attributes for presentations MAYBE_UNUSED static const char * EVENT_VISUAL_ATTRIBUTES = "UpdateVisualAttributes"; - /// Event ID that 1D-fillet failed (comes with ModelAPI_ShapesFailedMessage) MAYBE_UNUSED static const char * EVENT_OPERATION_SHAPES_FAILED = "OperationShapesFailed"; +/// Event ID that license of specified features is checked and valid +MAYBE_UNUSED static const char * EVENT_FEATURE_LICENSE_VALID = "FeaturesLicenseValid"; + /// Message that feature was changed (used for Object Browser update): moved, updated and deleted class MODELAPI_EXPORT ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup { @@ -657,4 +659,28 @@ private: std::list< std::shared_ptr > myShapes; }; +/// Message that sends the features which license is checked and valid +class ModelAPI_FeaturesLicenseValidMessage : public Events_Message +{ +public: + /// Creates an message + MODELAPI_EXPORT + ModelAPI_FeaturesLicenseValidMessage(const Events_ID theID, const void* theSender = 0); + /// Default destructor + MODELAPI_EXPORT virtual ~ModelAPI_FeaturesLicenseValidMessage(); + /// Static. Returns EventID of the message. + MODELAPI_EXPORT static Events_ID eventId() + { + return Events_Loop::eventByName(EVENT_FEATURE_LICENSE_VALID); + } + + /// Sets list of features with valid license + MODELAPI_EXPORT void setFeatures(const std::set& theFeatures); + /// Returns list of features with valid license + MODELAPI_EXPORT const std::set& features() const; + +private: + std::set myFeatures; +}; + #endif