Package NetworkEditor :: Module items :: Class NetworkNode
[hide private]
[frames] | no frames]

Class NetworkNode

source code

               object --+            
                        |            
itemBase.NetworkItemsBase --+        
                            |        
        itemBase.NetworkItems --+    
                                |    
                  NetworkNodeBase --+
                                    |
                                   NetworkNode
Known Subclasses:
macros.MacroInputNode, macros.MacroNode, macros.MacroOutputNode

This class implements a node that is represented using a Polygon

Instance Methods [hide private]
  __init__(self, name='NoName', sourceCode=None, originalClass=None, constrkw=None, library=None, progbar=0, autoRun=True, **kw)
  isExpanded(self)
returns True if widgets inside the node as displayed
  editorVisible(self)
returns True if the node Editor is visible
  getColor(self)
  setColor(self, color)
  getFont(self)
  setFont(self, font)
  select(self)
  deselect(self)
  resizeIcon(self, dx=0, dy=0)
  addInputPort(self, name=None, balloon=None, _previousWidgetDescr=None, required=True, datatype='None', width=None, height=None, singleConnection=True, _modified=False, beforeConnect=None, afterConnect=None, beforeDisconnect=None, afterDisconnect=None, updateSignature=True, shape=None, color=None, cast=True, originalDatatype=None)
Create input port and creates icon NOTE: this method does not update the description
  refreshInputPortData(self)
  addOutputPort(self, name=None, datatype='None', width=None, height=None, balloon=None, _modified=False, beforeConnect=None, afterConnect=None, beforeDisconnect=None, afterDisconnect=None, updateSignature=True, shape=None, color=None)
Create output port and creates icon NOTE: this method does not update the description nor the function's signature
  deletePort(self, p, resize=True, updateSignature=True)
Delete a port from a node.
  deletePortByName(self, portName, resize=True, updateSignature=True)
delete a port by specifying a port name (port names are unique within a given node).
  showSpecialPorts(self, tagModified=True, event=None)
  hideSpecialPorts(self, tagModified=True, event=None)
  addSpecialPorts(self)
add special ports to special ports list.
  buildSmallIcon(self, canvas, posx, posy, font=None)
build node proxy icon (icons in library categories
  deleteSmallIcon(self, canvas, item)
  buildNodeIcon(self, canvas, posx, posy, small=False)
  setProgressBar(self, percent)
update node's progress bar.
  updatePosXPosY(self)
set node.posx and node.posy after node has been moved
  setModifiedTag(self)
THIS METHOD REMAINS FOR BACKWARDS COMPATIBILITY WITH OLD NETWORKS! Sets self._modified=True

Inherited from NetworkNodeBase: addSaveNodeMenuEntries, autoResize, autoResizeX, autoResizeY, buildIcons, checkIfNodeForSavingIsDefined, compareToOrigNodeDescr, computeFunction, configure, cut_cb, delete_cb, edit, editComputeFunction_cb, evalString, getAfterConnectionsSourceCode, getComputeFunctionSourceCode, getConnections, getDescr, getHeaderBlock, getInConnections, getInitBlock, getInputPortByName, getNodeDefinitionSourceCode, getNodeSourceCode, getNodeSourceCodeForDoit, getNodeSourceCodeForInstanciation, getNodeSourceCodeForModifications, getNodeSourceCodeForNode, getNodeSourceCodeForPorts, getNodeSourceCodeForWidgetValue, getNodeSourceCodeForWidgets, getOutConnections, getOutputPortByName, getOutputPortByType, getPortsCreationSourceCode, getSize, getSourceCode, getSpecialInputPortByName, getSpecialOutputPortByName, getStateDefinitionCode, getUniqueNodeName, getWidgetByName, getWidgetsCreationSourceCode, getWidgetsForMaster, getWidthForLabel, getWidthForNodeWidgets, getWidthForPorts, growDown, growRight, hideInNodeWidgets, isMacro, isModified, ischild, move, moveSelectedNodeEnd, outputData, rename, resetModifiedTag, resetTags, safeName, saveSource, saveSource_cb, schedule, scheduleChildren, schedule_cb, setFunction, showInNodeWidgets, startMoveOneNode, toggleNodeExpand_cb, toggleParamPanel_cb, updateCode

Inherited from itemBase.NetworkItems: __repr__, afterAddingToNetwork, afterRemovingFromNetwork, beforeAddingToNetwork, beforeRemovingFromNetwork, deleteIcon, editNodeMenu, freeze, gettags, hideParamPanel, highlight, introspect, postItemMenu, run, toggleAutoRun_cb, toggleFrozen_cb, unfreeze, unhighlight

Inherited from itemBase.NetworkItems (private): _introspectCB

Inherited from itemBase.NetworkItemsBase: delEditor, getEditor, setEditor

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__


Properties [hide private]

Inherited from itemBase.NetworkItemsBase: editor

Inherited from object: __class__


Method Details [hide private]

__init__(self, name='NoName', sourceCode=None, originalClass=None, constrkw=None, library=None, progbar=0, autoRun=True, **kw)
(Constructor)

source code 
None
Overrides: NetworkNodeBase.__init__

isExpanded(self)

source code 
returns True if widgets inside the node as displayed

editorVisible(self)

source code 
returns True if the node Editor is visible

getColor(self)

source code 
None

setColor(self, color)

source code 
None

getFont(self)

source code 
None

setFont(self, font)

source code 
None

select(self)

source code 
None
Overrides: itemBase.NetworkItems.select

deselect(self)

source code 
None
Overrides: itemBase.NetworkItems.deselect

resizeIcon(self, dx=0, dy=0)

source code 
None

addInputPort(self, name=None, balloon=None, _previousWidgetDescr=None, required=True, datatype='None', width=None, height=None, singleConnection=True, _modified=False, beforeConnect=None, afterConnect=None, beforeDisconnect=None, afterDisconnect=None, updateSignature=True, shape=None, color=None, cast=True, originalDatatype=None)

source code 
Create input port and creates icon NOTE: this method does not update the description

refreshInputPortData(self)

source code 
None

addOutputPort(self, name=None, datatype='None', width=None, height=None, balloon=None, _modified=False, beforeConnect=None, afterConnect=None, beforeDisconnect=None, afterDisconnect=None, updateSignature=True, shape=None, color=None)

source code 
Create output port and creates icon NOTE: this method does not update the description nor the function's signature

deletePort(self, p, resize=True, updateSignature=True)

source code 
Delete a port from a node. Removes it from the list of ports, updates the portsDescr list and return the descriptin of the deleted port, renumber all ports after this ports and mark them modified. Update code.
Overrides: itemBase.NetworkItems.deletePort
(inherited documentation)

deletePortByName(self, portName, resize=True, updateSignature=True)

source code 
delete a port by specifying a port name (port names are unique within a given node).

showSpecialPorts(self, tagModified=True, event=None)

source code 
None

hideSpecialPorts(self, tagModified=True, event=None)

source code 
None

addSpecialPorts(self)

source code 
add special ports to special ports list. But do not build icons

buildSmallIcon(self, canvas, posx, posy, font=None)

source code 
build node proxy icon (icons in library categories

deleteSmallIcon(self, canvas, item)

source code 
None

buildNodeIcon(self, canvas, posx, posy, small=False)

source code 
None

setProgressBar(self, percent)

source code 
update node's progress bar. percent should be between 0.0 and 1.0

updatePosXPosY(self)

source code 
set node.posx and node.posy after node has been moved

setModifiedTag(self)

source code 
THIS METHOD REMAINS FOR BACKWARDS COMPATIBILITY WITH OLD NETWORKS! Sets self._modified=True