|
Krita Source Code Documentation
|
#include <kis_node_graph_listener.h>
Inheritance diagram for KisNodeGraphListener:Public Member Functions | |
| virtual void | aboutToAddANode (KisNode *parent, int index) |
| virtual void | aboutToMoveNode (KisNode *node, int oldIndex, int newIndex) |
| virtual void | aboutToRemoveANode (KisNode *parent, int index) |
| virtual KisNode * | graphOverlayNode () const |
| int | graphSequenceNumber () const |
| virtual void | invalidateAllFrames () |
| virtual void | invalidateFrames (const KisTimeSpan &range, const QRect &rect) |
| virtual void | keyframeChannelAboutToBeRemoved (KisNode *node, KisKeyframeChannel *channel) |
| virtual void | keyframeChannelHasBeenAdded (KisNode *node, KisKeyframeChannel *channel) |
| KisNodeGraphListener () | |
| virtual void | nodeChanged (KisNode *node) |
| virtual void | nodeCollapsedChanged (KisNode *node) |
| virtual void | nodeHasBeenAdded (KisNode *parent, int index, KisNodeAdditionFlags flags) |
| virtual void | nodeHasBeenMoved (KisNode *node, int oldIndex, int newIndex) |
| virtual void | nodeHasBeenRemoved (KisNode *parent, int index) |
| virtual void | notifySelectionChanged () |
| Private () | |
| virtual void | requestProjectionUpdate (KisNode *node, const QVector< QRect > &rects, KisProjectionUpdateFlags flags) |
| virtual void | requestTimeSwitch (int time) |
| virtual | ~KisNodeGraphListener () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Attributes | |
| int | sequenceNumber |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Implementations of this class are called by nodes whenever the node graph changes. These implementations can then Q_EMIT the right signals so Qt interview models can be updated before and after changes.
The reason for this go-between is that we don't want our nodes to be QObjects, nor to have sig-slot connections between every node and every mode.
It also manages the sequence number of the graph. This is a number which can be used as a checksum for whether the graph has changed from some period of time or not.
Definition at line 15 of file kis_node_graph_listener.cpp.
| KisNodeGraphListener::KisNodeGraphListener | ( | ) |
Definition at line 21 of file kis_node_graph_listener.cpp.
|
virtual |
Definition at line 26 of file kis_node_graph_listener.cpp.
Inform the model that we're going to add a node.
Reimplemented in KisImage.
Definition at line 30 of file kis_node_graph_listener.cpp.
References m_d.
Inform the model we're about to start moving a node (which includes removing and adding the same node)
Definition at line 50 of file kis_node_graph_listener.cpp.
References m_d.
Inform the model we're going to remove a node.
Reimplemented in KisImage.
Definition at line 40 of file kis_node_graph_listener.cpp.
References m_d.
|
virtual |
Reimplemented in KisImage.
Definition at line 106 of file kis_node_graph_listener.cpp.
| int KisNodeGraphListener::graphSequenceNumber | ( | ) | const |
Returns the sequence of the graph.
Every time some operation performed, which might change the hierarchy of the nodes, the sequence number grows by one. So if you have any information about the graph which was acquired when the sequence number was X and now it has become Y, it means your information is outdated.
It is used in the scheduler for checking whether queued walkers should be regenerated.
Definition at line 60 of file kis_node_graph_listener.cpp.
References m_d.
|
virtual |
|
virtual |
Reimplemented in KisImage.
Definition at line 95 of file kis_node_graph_listener.cpp.
|
virtual |
|
virtual |
Inform the model that a keyframe channel has been added or removed.
Reimplemented in KisImage.
Definition at line 65 of file kis_node_graph_listener.cpp.
|
virtual |
Inform the model we're done adding a node.
Reimplemented in KisImage.
Definition at line 35 of file kis_node_graph_listener.cpp.
References m_d.
Inform the model we're done moving the node: it has been removed and added successfully
Definition at line 55 of file kis_node_graph_listener.cpp.
References m_d.
Inform the model we're done removing a node.
Definition at line 45 of file kis_node_graph_listener.cpp.
References m_d.
|
virtual |
Inform the model that one of the selections in the graph is changed. The sender is not passed to the function (at least for now) because the UI should decide itself whether it needs to fetch new selection of not.
Reimplemented in KisImage.
Definition at line 87 of file kis_node_graph_listener.cpp.
|
inline |
Definition at line 17 of file kis_node_graph_listener.cpp.
|
virtual |
Inform the model that a node has been changed (setDirty)
Reimplemented in KisImage, and KisScratchPadNodeListener.
Definition at line 91 of file kis_node_graph_listener.cpp.
|
virtual |
Reimplemented in KisImage.
Definition at line 101 of file kis_node_graph_listener.cpp.
|
private |
Definition at line 121 of file kis_node_graph_listener.h.
| int KisNodeGraphListener::sequenceNumber |
Definition at line 18 of file kis_node_graph_listener.cpp.