# flowchart.Flowchart

class pyqtgraph.flowchart.Flowchart(terminals=None, name=None, filePath=None, library=None)
  __init__(terminals=None, name=None, filePath=None, library=None)
  addNode(node, name, pos=None)

    Add an existing Node to this flowchart.

    See also: createNode()

  chartGraphicsItem()

    Return the graphicsItem that displays the internal nodes and connections of this flowchart.

    Note that the similar method graphicsItem() is inherited from Node and returns the external graphical representation of this flowchart.

  clear()

    Remove all nodes from this flowchart except the original input/output nodes.

  connectTerminals(term1, term2)

    Connect two terminals together within this flowchart.

  createNode(nodeType, name=None, pos=None)

    Create a new Node and add it to this flowchart.

  internalTerminal(term)

    If the terminal belongs to the external Node, return the corresponding internal terminal

  loadFile(fileName=None, startDir=None)

    Load a flowchart (`*.fc`) file.

  nodeOutputChanged(startNode)

    Triggered when a node’s output values have changed. (NOT called during process()) Propagates new data forward through network.

  output()

    Return a dict of the values on the Flowchart’s output terminals.

  process(**args)

    Process data through the flowchart, returning the output.

    Keyword arguments must be the names of input terminals. The return value is a dict with one key per output terminal.

  processOrder()

    Return the order of operations required to process this chart. The order returned should look like [(‘p’, node1), (‘p’, node2), (‘d’, terminal1), …] where each tuple specifies either (p)rocess this node or (d)elete the result from this terminal

  removeNode(node)

    Remove a Node from this flowchart.

  restoreState(state, clear=False)

    Restore the state of this flowchart from a previous call to saveState().

  saveFile(fileName=None, startDir=None, suggestedFileName='flowchart.fc')

    Save this flowchart to a .fc file

  saveState()

    Return a serializable data structure representing the current state of this flowchart.

  setInput(**args)

    Set the input values of the flowchart. This will automatically propagate the new values throughout the flowchart, (possibly) causing the output to change.

  widget()

    Return the control widget for this flowchart.

    This widget provides GUI access to the parameters for each node and a graphical representation of the flowchart.

previous

Visual Programming with Flowcharts

next

flowchart.Node