Handles drags-and-drops and performs node instantiation for the editor window.
|
| VuoEditorGraph () |
| Creates an empty canvas upon which nodes and cables can be rendered.
|
|
void | setCompiler (VuoCompiler *compiler) |
| Specifies a compiler instance to be used by this graph (for, e.g., instantiating dropped nodes).
|
|
VuoRendererNode * | createNode (QString nodeClassName, string displayName="", double x=0, double y=0) |
| Instantiates a node of class nodeClass .
|
|
QAction * | getContextMenuDeleteSelectedAction (void) |
|
vector< VuoRendererNode * > | getNodes () |
| Returns an ordered list of the nodes contained in this scene, starting with those that existed in the original composition and continuing with those created anew.
|
|
vector< VuoRendererCable * > | getCables () |
| Returns an ordered list of the cables contained in this scene, sorted primarily by the creation order of their 'From' nodes, and secondarily by lexicographic order of the full cable declarations.
|
|
void | printGraph (stringstream &output, string header="", string footer="") |
| Prints the .vuo representation of this graph, making use of the optional input header and footer .
|
|
void | printSubgraphWithElements (stringstream &output, vector< VuoRendererNode * > nodes, vector< VuoRendererCable * > cables, string header="", string footer="", bool forcePositionPrinting=false, qreal xPositionOffset=0, qreal yPositionOffset=0) |
| Prints the .vuo representation of the subgraph with the provided input elements.
|
|
set< VuoRendererCable * > | getCablesInternalToSubgraph (QList< QGraphicsItem * > subgraphComponents) |
| Returns the set of cables creating internal connections within the set of input subgraphComponents .
|
|
string | getNodeDeclaration (const VuoRendererNode *node, bool forcePositionPrinting=false, qreal xPositionOffset=0, qreal yPositionOffset=0) const |
| Returns a string containing the declaration of this node as it would appear in a .vuo file.
|
|
string | getAvailableNodeName (string displayName) |
| Returns a unique Graphviz node name based on the node's displayName , with a counter appended if necessary.
|
|
void | cancelCableDrag (void) |
| Cancel the current cable drag operation, if applicable.
|
|
void | run (string graphPath) |
| Builds the graph at graphPath and runs the resulting executable.
|
|
void | stop (void) |
| Stops the running graph.
|
|
bool | isRunning (void) |
| Returns true if the graph is running.
|
|
| VuoRendererGraph () |
| Creates an empty canvas upon which nodes and cables can be rendered.
|
|
void | setParser (VuoCompilerGraphvizParser *parser) |
| Specifies a Graphviz parser instance to be used by this graph.
|
|
VuoRendererNode * | createNode (VuoNode *node) |
| Creates a renderer detail for the specified node.
|
|
VuoRendererNode * | addNode (VuoNode *node) |
| Creates a renderer detail for the specified node and adds it to the canvas.
|
|
VuoRendererNode * | addExistingNode (VuoRendererNode *rn) |
| Adds a pre-existing renderer node to the canvas.
|
|
VuoRendererCable * | createCable (VuoCable *c) |
| Creates a renderer detail for the specified cable.
|
|
VuoRendererCable * | addCable (VuoCable *cable) |
| Creates a renderer detail for the specified cable and adds it to the canvas.
|
|
VuoRendererCable * | addExistingCable (VuoRendererCable *rc) |
| Adds a pre-existing renderer cable to the canvas.
|
|
void | loadComposition (void) |
| Loads the composition associated with the input parser if one is provided, and with the graph's member parser otherwise.
|
|
VuoRendererNode * | getNodeNameTaken (string name) |
| Returns a pointer to the VuoRendererNode currently assigned the input Graphviz identifier, or NULL if the identifier is unassigned.
|
|
void | collapseTypecastNodes (void) |
| Once all nodes and cables have been added to the scene, call this to convert each freestanding typecast node into a mini-node attached to its destination node.
|
|
VuoRendererTypecastPort * | collapseTypecastNode (VuoRendererNode *rn) |
| Convert a freestanding typecast node into a mini-node attached to its destination node; returns a pointer to the newly collapsed node.
|
|
VuoRendererNode * | uncollapseTypecastNode (VuoRendererTypecastPort *typecast) |
| Convert a collapsed typecast mini-node back into a freestanding node.
|
|
void | removePortEligibilityHighlighting (void) |
| Removes connection eligibility highlighting from all ports in the scene.
|
|
void | setAnyNodeHasBeenRepositioned (bool repositioned) |
| Sets a boolean indicating whether any node in this graph has been repositioned since the graph was first loaded.
|
|
bool | getAnyNodeHasBeenRepositioned (void) const |
| Returns a boolean indicating whether any node in this graph has been repositioned since the graph was first loaded.
|
|
|
void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) |
| Decide whether we can accept the dragged data.
|
|
void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event) |
| Decide what to do with the dragged data as it leaves.
|
|
void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) |
| Decide what to do with the moved drag-drop data.
|
|
void | dropEvent (QGraphicsSceneDragDropEvent *event) |
| Handle the dropped data.
|
|
void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| Handle mouse press events.
|
|
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Handle mouse release events.
|
|
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| Handle mouse move events.
|
|
void | keyPressEvent (QKeyEvent *event) |
| Handle keypress events.
|
|
void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| Display a node's context menu.
|
|
VuoRendererCable * | findNearbyCable (QPointF scenePos) |
| Returns a pointer to the cable that should be selected if the user clicks at position scenePos , or NULL if no cable is within selection range.
|
|