SHAPER
9.13.0
|
It provides reentrant create operations in sketch, that is when all inputs are valid, automatic validation of the creation and switch the created entity to edit mode ('internal' edit operation), with the ability to simultaneously create the next entity of same type (re-entrance of the operation). More...
Public Slots | |
void | onAutoConstraints (bool isOn) |
The slot is called when user checks "Automatic constraints" button. More... | |
Public Member Functions | |
PartSet_SketcherReentrantMgr (ModuleBase_IWorkshop *theWorkshop) | |
Constructor. More... | |
bool | isInternalEditActive () const |
Return true if the current edit operation is an internal. More... | |
void | updateInternalEditActiveState () |
Stop internal edit if the operation feature is invalid. More... | |
bool | processEnter (const std::string &thePreviousAttributeID) |
if the internal flags allow it and the manager is active, it starts an internal edit operation for the created operation. More... | |
void | operationStarted (ModuleBase_Operation *theOperation) |
Resets the internal flags. More... | |
bool | operationCommitted (ModuleBase_Operation *theOperation) |
Resets the internal flags. More... | |
void | operationAborted (ModuleBase_Operation *theOperation) |
Resets the internal flags. More... | |
bool | processMouseMoved (ModuleBase_IViewWindow *theWnd, QMouseEvent *theEvent) |
Return true if the manager processes the mouse move event It happens if the current operation is an internal edit operation and the first control can be filled by the mouse move event. More... | |
bool | processMousePressed (ModuleBase_IViewWindow *theWnd, QMouseEvent *theEvent) |
Return true if the manager processes the mouse press event. More... | |
bool | processMouseReleased (ModuleBase_IViewWindow *theWnd, QMouseEvent *theEvent) |
Return true if the manager processes the mouse enter event It happens if the current operation is an internal edit operation. More... | |
bool | canBeCommittedByPreselection () |
It is called by the current operation filling with the preselection. More... | |
void | setReentrantMessage (const std::shared_ptr< Events_Message > &theMessage) |
Fills reentrant message during restarting operation. More... | |
std::shared_ptr< Events_Message > | reentrantMessage () const |
Returnss reentrant message. More... | |
void | setReentrantPreSelection (const std::shared_ptr< Events_Message > &theMessage) |
Put current selection into reentrant message. More... | |
bool | isAutoConstraints () const |
bool | isLastAutoConstraint (const ObjectPtr &theObj) const |
It provides reentrant create operations in sketch, that is when all inputs are valid, automatic validation of the creation and switch the created entity to edit mode ('internal' edit operation), with the ability to simultaneously create the next entity of same type (re-entrance of the operation).
OK valids the current edition and exits from the operation (no re-entrance). Cancel removes (undo) the entity currently edited and exits from the operation (no re-entrance).
PartSet_SketcherReentrantMgr::PartSet_SketcherReentrantMgr | ( | ModuleBase_IWorkshop * | theWorkshop | ) |
Constructor.
theWorkshop | a workshop instance |
bool PartSet_SketcherReentrantMgr::isInternalEditActive | ( | ) | const |
Return true if the current edit operation is an internal.
void PartSet_SketcherReentrantMgr::updateInternalEditActiveState | ( | ) |
Stop internal edit if the operation feature is invalid.
bool PartSet_SketcherReentrantMgr::processEnter | ( | const std::string & | thePreviousAttributeID | ) |
if the internal flags allow it and the manager is active, it starts an internal edit operation for the created operation.
thePreviousAttributeID | an index of the previous active attribute |
void PartSet_SketcherReentrantMgr::operationStarted | ( | ModuleBase_Operation * | theOperation | ) |
Resets the internal flags.
theOperation | a started operation |
bool PartSet_SketcherReentrantMgr::operationCommitted | ( | ModuleBase_Operation * | theOperation | ) |
Resets the internal flags.
theOperation | a started operation |
void PartSet_SketcherReentrantMgr::operationAborted | ( | ModuleBase_Operation * | theOperation | ) |
Resets the internal flags.
theOperation | a started operation |
bool PartSet_SketcherReentrantMgr::processMouseMoved | ( | ModuleBase_IViewWindow * | theWnd, |
QMouseEvent * | theEvent | ||
) |
Return true if the manager processes the mouse move event It happens if the current operation is an internal edit operation and the first control can be filled by the mouse move event.
The operation is restarted.
before restarting of operation we need to clear selection, as it may take part in new feature creation, e.g. tangent arc. But it is not necessary as it was processed by mouse release when the operation was restarted.
bool PartSet_SketcherReentrantMgr::processMousePressed | ( | ModuleBase_IViewWindow * | theWnd, |
QMouseEvent * | theEvent | ||
) |
Return true if the manager processes the mouse press event.
bool PartSet_SketcherReentrantMgr::processMouseReleased | ( | ModuleBase_IViewWindow * | theWnd, |
QMouseEvent * | theEvent | ||
) |
Return true if the manager processes the mouse enter event It happens if the current operation is an internal edit operation.
The operation is restarted. If the first widget of the started operation is the point 2d, it processes this mouse event
selection should be obtained from workshop before ask if the operation can be started as the canStartOperation method performs commit/abort of previous operation. Sometimes commit/abort may cause selection clear(Sketch operation) as a result it will be lost and is not used for preselection.
bool PartSet_SketcherReentrantMgr::canBeCommittedByPreselection | ( | ) |
It is called by the current operation filling with the preselection.
Returns false if the reentrant mode of the operation is not empty.
|
inline |
Fills reentrant message during restarting operation.
theMessage | reentrant message |
|
inline |
Returnss reentrant message.
void PartSet_SketcherReentrantMgr::setReentrantPreSelection | ( | const std::shared_ptr< Events_Message > & | theMessage | ) |
Put current selection into reentrant message.
theMessage | a message of reentrant operation |
|
slot |
The slot is called when user checks "Automatic constraints" button.
isOn | a state of the check box |