Updated flowchart documentation

This commit is contained in:
Luke Campagnola 2013-01-07 10:45:03 -05:00
parent 685f085396
commit 22007061eb
2 changed files with 13 additions and 4 deletions

View File

@ -113,8 +113,11 @@ class Flowchart(Node):
self.inputNode.setOutput(**args)
def outputChanged(self):
self.widget().outputChanged(self.outputNode.inputValues())
self.sigOutputChanged.emit(self)
## called when output of internal node has changed
vals = self.outputNode.inputValues()
self.widget().outputChanged(vals)
self.setOutput(**vals)
#self.sigOutputChanged.emit(self)
def output(self):
return self.outputNode.inputValues()
@ -261,7 +264,9 @@ class Flowchart(Node):
def process(self, **args):
"""
Process data through the flowchart, returning the output.
Keyword arguments must be the names of input terminals
Keyword arguments must be the names of input terminals.
The return value is a dict with one key per output terminal.
"""
data = {} ## Stores terminal:value pairs

View File

@ -229,7 +229,11 @@ class Node(QtCore.QObject):
return "<Node %s @%x>" % (self.name(), id(self))
def ctrlWidget(self):
"""Return this Node's control widget."""
"""Return this Node's control widget.
By default, Nodes have no control widget. Subclasses may reimplement this
method to provide a custom widget. This method is called by Flowcharts
when they are constructing their Node list."""
return None
def bypass(self, byp):