-// Copyright (C) 2014-2021 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
MAYBE_UNUSED static const char * EVENT_PLUGIN_LOADED = "PluginLoaded";
/// The active document becomes another one
MAYBE_UNUSED static const char * EVENT_DOCUMENT_CHANGED = "CurrentDocumentChanged";
+/// All documents closed
+MAYBE_UNUSED static const char * EVENT_DOCUMENTS_CLOSED = "AllDocumentsClosed";
/// Event ID that order of objects in group is changed,
/// so, tree must be fully recreated (movement of feature)
/// 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";
+MAYBE_UNUSED static const char * EVENT_CHECK_CONSTRAINTS = "CheckConstrains";
+
+MAYBE_UNUSED static const char * EVENT_REMOVE_CONSTRAINTS = "RemoveConstrains";
+
+/// Event ID that license of specified features is checked and valid
+MAYBE_UNUSED static const char * EVENT_FEATURE_LICENSE_VALID = "FeaturesLicenseValid";
+
+/// To send preferences information: create part on init or not
+MAYBE_UNUSED static const char * EVENT_CREATE_PART_ON_START = "CreatePartOnStart";
+
+
/// Message that feature was changed (used for Object Browser update): moved, updated and deleted
class MODELAPI_EXPORT ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup
{
}
/// Creates an empty message
- MODELAPI_EXPORT ModelAPI_ImportParametersMessage(const Events_ID theID, const void* theSender = 0);
+ MODELAPI_EXPORT ModelAPI_ImportParametersMessage(const Events_ID theID,
+ const void* theSender = 0);
/// The virtual destructor
MODELAPI_EXPORT virtual ~ModelAPI_ImportParametersMessage();
std::list< std::shared_ptr<GeomAPI_Shape> > myShapes;
};
+///Message that sends the constraints to check or remove
+class ModelAPI_CheckConstraintsMessage : public Events_Message
+{
+public:
+ /// Creates an empty message
+ MODELAPI_EXPORT ModelAPI_CheckConstraintsMessage(
+ const Events_ID theID, const void* theSender = 0);
+ /// The virtual destructor
+ MODELAPI_EXPORT virtual ~ModelAPI_CheckConstraintsMessage();
+
+ ///Get list of constrains
+ MODELAPI_EXPORT const std::set<ObjectPtr>& constraints() const;
+
+ ///Set list of constrains
+ MODELAPI_EXPORT void setConstraints(const std::set<ObjectPtr>& theConstraints);
+
+private:
+ std::set<ObjectPtr> myConstraints;
+};
+
+
+/// 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<std::string>& theFeatures);
+ /// Returns list of features with valid license
+ MODELAPI_EXPORT const std::set<std::string>& features() const;
+
+private:
+ std::set<std::string> myFeatures;
+};
+
#endif