From 22007061eb674f2a4d97aeaac90242797f7369c0 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 7 Jan 2013 10:45:03 -0500 Subject: [PATCH] Updated flowchart documentation --- flowchart/Flowchart.py | 11 ++++++++--- flowchart/Node.py | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/flowchart/Flowchart.py b/flowchart/Flowchart.py index 6b1352d5..5d7dc093 100644 --- a/flowchart/Flowchart.py +++ b/flowchart/Flowchart.py @@ -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 diff --git a/flowchart/Node.py b/flowchart/Node.py index e6e98d1a..cd73b42b 100644 --- a/flowchart/Node.py +++ b/flowchart/Node.py @@ -229,7 +229,11 @@ class Node(QtCore.QObject): return "" % (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):