SHAPER
9.12.0
|
A class for processing overconstraint situation. More...
Public Member Functions | |
PartSet_OverconstraintListener (ModuleBase_IWorkshop *theWorkshop) | |
Constructor. More... | |
void | setActive (const bool &theActive) |
If active state is changed, update fully defined state and sketch sub-entities color. More... | |
void | getCustomColor (const ObjectPtr &theObject, std::vector< int > &theColor) |
Returns true if the object belongs to internal container of conflicting objects. More... | |
virtual void | processEvent (const std::shared_ptr< Events_Message > &theMessage) |
Redefinition of Events_Listener method. More... | |
bool | isConflictingObject (const ObjectPtr &theObject) const |
const std::set< ObjectPtr > & | conflictingObjects () const |
const std::set< ObjectPtr > & | objectsToRemove () const |
bool | isFullyConstrained () const |
virtual EVENTS_EXPORT bool | groupMessages () |
Listener that needs mostly grouped messages received returns true in this method. More... | |
Protected Member Functions | |
bool | appendConflictingObjects (const std::set< ObjectPtr > &theObjects) |
Append objects to the internal container of conflicting object, redisplay necessary objects. More... | |
bool | repairConflictingObjects (const std::set< ObjectPtr > &theObjects) |
Removes objects from internal container of conflicting object, redisplay necessary objects. More... | |
void | redisplayObjects (const std::set< ObjectPtr > &theObjects) |
Sends update object signal for each object in the container and flush it. More... | |
void | groupWhileFlush (const std::shared_ptr< Events_Message > &theMessage) |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners) More... | |
EVENTS_EXPORT void | flushGrouped (const Events_ID &theID) |
Sends myGroups on flush finish. More... | |
A class for processing overconstraint situation.
It contains is a list of sketch constraints with conflicts.
PartSet_OverconstraintListener::PartSet_OverconstraintListener | ( | ModuleBase_IWorkshop * | theWorkshop | ) |
Constructor.
theWorkshop | a current workshop to obtain AIS presentation from displayer |
void PartSet_OverconstraintListener::setActive | ( | const bool & | theActive | ) |
If active state is changed, update fully defined state and sketch sub-entities color.
theActive | a state |
returned to default state, no custom color for it
void PartSet_OverconstraintListener::getCustomColor | ( | const ObjectPtr & | theObject, |
std::vector< int > & | theColor | ||
) |
Returns true if the object belongs to internal container of conflicting objects.
theObject | an object to be checked |
theColor | the output container to be filled in [red, green, blue] values |
|
virtual |
Redefinition of Events_Listener method.
Implements Events_Listener.
|
protected |
Append objects to the internal container of conflicting object, redisplay necessary objects.
theObjects | a list of new conflicting objects |
|
protected |
Removes objects from internal container of conflicting object, redisplay necessary objects.
theObjects | a list of repaired objects |
|
protected |
Sends update object signal for each object in the container and flush it.
theObjects | a list of object to be redisplayed |
|
inlinevirtualinherited |
Listener that needs mostly grouped messages received returns true in this method.
In this case during the message is flushed, all the new messages are grouped, not sended immideately and then sent in the end of flush.
Reimplemented in SketchSolver_Manager, and SketchPlugin_OverConstraintsResolver.
|
protectedinherited |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners)
|
protectedinherited |
Sends myGroups on flush finish.