|
__init__(self,
name='NoName',
sourceCode=None,
originalClass=None,
constrkw=None,
library=None,
progbar=0,
autoRun=True,
**kw)
|
|
configure(self,
**kw)
Configure a NetworkNode object.
|
|
getDescr(self)
returns a dict with the current configuration of this node
|
|
rename(self,
name,
tagModified=True)
Rename a node.
|
|
ischild(self,
node)
returns True is self is a child node of node
|
|
isMacro(self)
Returns False if this node is not a MacroNode, returns True if
MacroNode
|
|
startMoveOneNode(self,
event)
|
|
moveSelectedNodeEnd(self,
event)
|
|
isModified(self)
|
|
resetModifiedTag(self)
set _modified attribute to False in node, ports, widgets.
|
|
resetTags(self)
set _modified attribute to False in node, ports, widgets.
|
|
getInputPortByName(self,
name)
|
|
getOutputPortByName(self,
name)
|
|
getSpecialInputPortByName(self,
name)
|
|
getSpecialOutputPortByName(self,
name)
|
|
getInConnections(self)
|
|
getOutConnections(self)
|
|
getConnections(self)
|
|
getWidgetByName(self,
name)
|
|
getNodeDefinitionSourceCode(self,
networkName,
indent="",
ignoreOriginal=False)
This method builds the text-string to describe a network node
in a saved file.
|
|
getNodeSourceCodeForModifications(self,
networkName,
indent="",
ignoreOriginal=False)
Return the code that describes node modifications compared to the
original node (as described in a node library)
|
|
getNodeSourceCodeForInstanciation(self,
networkName="masterNet",
indent="",
ignoreOriginal=False,
full=0)
This method is called when saving a network.
|
|
getNodeSourceCodeForPorts(self,
networkName,
indent="",
ignoreOriginal=False,
full=0,
dummyNode=None,
nodeName=None)
Create code used to save a network which reflects changes of ports
compared to the port definitions in a given network node of a node
library.
|
|
getNodeSourceCodeForWidgets(self,
networkName,
indent="",
ignoreOriginal=False,
full=0,
dummyNode=None,
nodeName=None)
Create code used to save a network which reflects changes of
widgets compared to the widget definitions in a given network node of
a node library.
|
|
getNodeSourceCodeForWidgetValue(self,
networkName,
portIndex,
indent="",
ignoreOriginal=False,
full=0,
nodeName=None)
Returns code to set the widget value.
|
|
getNodeSourceCodeForNode(self,
networkName,
indent="",
ignoreOriginal=False,
full=0)
return code to configure a node with modifications compared to the
node definition in a node library.
|
|
getNodeSourceCodeForDoit(self,
networkName,
nodeName,
indent="",
ignoreOriginal=False,
full=0)
|
|
getAfterConnectionsSourceCode(self,
networkName,
indent="",
ignoreOriginal=False)
Here, we provide a hook for users to generate source code which
might be needed to adress certain events after connections were
formed: for example, connections might generate new ports.
|
|
compareToOrigNodeDescr(self)
compare this node to the original node as defined in a given node
library, such as StandardNodes.
|
|
checkIfNodeForSavingIsDefined(self,
lines,
networkName,
indent)
This method fixes a problem with saving macros that come from a
node library.
|
|
saveSource_cb(self,
dependencies=False)
the classname is extracted from the given filename
|
|
saveSource(self,
filename,
classname,
dependencies=False)
|
|
getNodeSourceCode(self,
className,
networkName='self.network',
indent="",
dependencies=False)
This method is called through the 'save source code' mechanism.
|
|
getHeaderBlock(self,
className,
indent="",
**kw)
Generate source code to import a node from a library or file.
|
|
getInitBlock(self,
className,
indent="",
**kw)
Generate source code to define the __init__() method of the node,
building the correct constrkw dict, etc.
|
|
getPortsCreationSourceCode(self,
ports,
ptype='input',
indent="",
**kw)
generates code to create ports using the inputportsDescr and
outputPortsDescr
|
|
getWidgetsCreationSourceCode(self,
indent="",
**kw)
generating code to create widgets using the widgetDescr
|
|
getComputeFunctionSourceCode(self,
indent="",
**kw)
|
|
outputData(self,
**kw)
|
|
setFunction(self,
source,
tagModified=True)
Set the node's compute function.
|
|
scheduleChildren(self,
portList=None)
run the children of this node in the same thread as the parent if
portList is None all children are scheduled, else only children of
the specified ports are scheduled
|
|
schedule_cb(self,
event=None)
|
|
schedule(self)
start an execution thread for the subtree under that node
|
|
computeFunction(self)
|
|
growRight(self,
id,
dx)
Expand (and shrink) the x-dimension of the node icon to (and from)
the right.
|
|
growDown(self,
id,
dy)
Expand (and shrink) the y-dimension of the node icon to (and from)
the top.
|
|
updateCode(self,
port='ip',
action=None,
tagModified=True,
**kw)
update signature of compute function in source code.
|
|
toggleNodeExpand_cb(self,
event=None)
|
|
getWidthForPorts(self,
maxi=None)
|
|
getWidthForLabel(self,
maxi=None)
|
|
getWidthForNodeWidgets(self,
maxi=None)
|
|
autoResizeX(self)
|
|
autoResizeY(self)
|
|
autoResize(self)
|
|
getSize(self)
returns size of this node as a tuple of (width, height) in
pixels
|
|
hideInNodeWidgets(self,
rescale=1)
|
|
showInNodeWidgets(self,
rescale=1)
|
|
getWidgetsForMaster(self,
masterName)
Return a dict of all widgets bound for a given master in a given
node (self).
|
|
buildIcons(self,
canvas,
posx,
posy,
small=False)
Build NODE icon with ports etc
|
|
addSaveNodeMenuEntries(self)
add 'save source code' and 'add to library' entried tonode
menu'
|
|
cut_cb(self,
event=None)
|
|
delete_cb(self,
event=None)
|
|
edit(self,
event=None)
|
|
editComputeFunction_cb(self,
event=None)
|
|
evalString(self,
str)
|
|
move(self,
dx,
dy,
absolute=True,
tagModified=True)
if absolute is set to False, the node moves about the increment
dx,dy.
|
|
getSourceCode(self)
|
|
toggleParamPanel_cb(self,
event=None)
|
|
getOutputPortByType(self,
type,
name=None)
|
|
getStateDefinitionCode(self,
nodeName,
indent='')
|
|
getUniqueNodeName(self)
|
|
safeName(self,
name)
remove all weird symbols from node name so that it becomes a
regular string usabel as a Python variable in a saved network
|
|
Inherited from itemBase.NetworkItems:
__repr__,
afterAddingToNetwork,
afterRemovingFromNetwork,
beforeAddingToNetwork,
beforeRemovingFromNetwork,
deleteIcon,
deletePort,
deselect,
editNodeMenu,
freeze,
gettags,
hideParamPanel,
highlight,
introspect,
postItemMenu,
run,
select,
toggleAutoRun_cb,
toggleFrozen_cb,
unfreeze,
unhighlight
Inherited from itemBase.NetworkItemsBase:
delEditor,
getEditor,
setEditor
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__str__
|