Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
SetExpressionCursorEvent (Visualization::Item *parentContainer, Model::Node *node, int offset) | |
virtual void | execute () |
Public Member Functions inherited from Visualization::CustomSceneEvent | |
CustomSceneEvent (EventFunction f) | |
CustomSceneEvent (QEvent::Type type) | |
virtual | ~CustomSceneEvent () |
void | setEventFunction (EventFunction f) |
Static Public Attributes | |
static const QEvent::Type | EventType = static_cast<QEvent::Type> (QEvent::registerEventType()) |
Static Public Attributes inherited from Visualization::CustomSceneEvent | |
static const QEvent::Type | EventType = static_cast<QEvent::Type> (QEvent::registerEventType()) |
Private Member Functions | |
bool | tryToSetOffset (Visualization::Item *item) |
Private Attributes | |
Model::Node * | node_ |
int | offset_ |
QList< Visualization::Item * > | parentContainerChain_ |
Instead of just storing the visualization that contains the visualization node, this field stores all ancestors of that visualization. More... | |
bool | reposted_ {} |
Additional Inherited Members | |
Public Types inherited from Visualization::CustomSceneEvent | |
using | EventFunction = std::function< void()> |
OOInteraction::SetExpressionCursorEvent::SetExpressionCursorEvent | ( | Visualization::Item * | parentContainer, |
Model::Node * | node, | ||
int | offset | ||
) |
|
virtual |
Reimplemented from Visualization::CustomSceneEvent.
|
private |
|
static |
|
private |
|
private |
|
private |
Instead of just storing the visualization that contains the visualization node, this field stores all ancestors of that visualization.
The reason is that when this cursor event object is constructed, before an update, a parent container is provided that might turn out to be the wrong container after the update. For example the expression node, might be recognized as a special expression and its visualization might be transferred somewhere else.
Having the entire chain of parents makes it possible to assure that:
|
private |