20 #ifndef PartSet_OverconstraintListener_H
21 #define PartSet_OverconstraintListener_H
23 #include <Events_Listener.h>
24 #include <ModelAPI_Object.h>
56 void getCustomColor(
const ObjectPtr& theObject, std::vector<int>& theColor);
59 virtual void processEvent(
const std::shared_ptr<Events_Message>& theMessage);
62 bool isConflictingObject(
const ObjectPtr& theObject)
const
64 return (myConflictingObjects.find(theObject) != myConflictingObjects.end());
67 const std::set<ObjectPtr>& conflictingObjects()
const
69 return myConflictingObjects;
72 const std::set<ObjectPtr>& objectsToRemove()
const
74 return myObjectsToRemove;
77 bool isFullyConstrained()
const {
return myIsFullyConstrained; }
102 static QString getObjectsInfo(
const std::set<ObjectPtr>& theObjects);
108 std::set<ObjectPtr> myConflictingObjects;
109 std::set<ObjectPtr> myObjectsToRemove;
110 bool myIsFullyConstrained;
Base interface for any event listener.
Definition: Events_Listener.h:37
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
Implementation of Partset module.
Definition: PartSet_Module.h:69
A class for processing overconstraint situation.
Definition: PartSet_OverconstraintListener.h:40
void setActive(const bool &theActive)
If active state is changed, update fully defined state and sketch sub-entities color.
Definition: PartSet_OverconstraintListener.cpp:74
void getCustomColor(const ObjectPtr &theObject, std::vector< int > &theColor)
Returns true if the object belongs to internal container of conflicting objects.
Definition: PartSet_OverconstraintListener.cpp:97
virtual void processEvent(const std::shared_ptr< Events_Message > &theMessage)
Redefinition of Events_Listener method.
Definition: PartSet_OverconstraintListener.cpp:121
void redisplayObjects(const std::set< ObjectPtr > &theObjects)
Sends update object signal for each object in the container and flush it.
Definition: PartSet_OverconstraintListener.cpp:334
bool appendConflictingObjects(const std::set< ObjectPtr > &theObjects)
Append objects to the internal container of conflicting object, redisplay necessary objects.
Definition: PartSet_OverconstraintListener.cpp:271
bool repairConflictingObjects(const std::set< ObjectPtr > &theObjects)
Removes objects from internal container of conflicting object, redisplay necessary objects.
Definition: PartSet_OverconstraintListener.cpp:313
PartSet_OverconstraintListener(ModuleBase_IWorkshop *theWorkshop)
Constructor.
Definition: PartSet_OverconstraintListener.cpp:59