Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
NoteNodeChange (QSet< Node * > &modifiedTargets, QSet< Node * > &removedTargets, const UndoCommand *command) | |
virtual void | redo () |
virtual void | undo () |
Public Member Functions inherited from Model::UndoCommand | |
UndoCommand (Node *target, const QString &text) | |
virtual | ~UndoCommand () |
virtual Node * | insertedNode () const |
Returns the node that this command inserted into the tree, or nullptr if no node was inserted. More... | |
bool | isUndone () const |
Returns whether the command has been undone since it was applied. More... | |
virtual Node * | owned () const |
Returns the node owned by this command or nullptr if no node is owned. More... | |
virtual Node * | removedNode () const |
Returns the node that this command removed from the tree, or nullptr if no node was removed. More... | |
Node * | target () const |
Private Member Functions | |
void | markNodeAndChildrenAsRemoved (Node *node) const |
void | unmarkRemovals (Node *insertedNode) const |
It could happen than a subtree which is removed earlier in the undostack, is reinserted at a later time in the command stack. More... | |
Private Attributes | |
Node * | insertedNode_ {} |
QSet< Node * > & | modifiedTargets_ |
Node * | removedNode_ {} |
QSet< Node * > & | removedTargets_ |
Node * | target_ {} |
Model::NoteNodeChange::NoteNodeChange | ( | QSet< Node * > & | modifiedTargets, |
QSet< Node * > & | removedTargets, | ||
const UndoCommand * | command | ||
) |
|
private |
|
virtual |
Reimplemented from Model::UndoCommand.
|
virtual |
Reimplemented from Model::UndoCommand.
|
private |
It could happen than a subtree which is removed earlier in the undostack, is reinserted at a later time in the command stack.
In such cases we should not report these nodes as removed. (MAYBE)
TODO: Think about whether we:
|
private |
|
private |
|
private |
|
private |
|
private |