;i= >ddlmZddlmZdZGddZdS)) OrderedDict)Nodecd t|tsdSn#YdSxYwt|dS)NFnodeName) issubclassrhasattr)clss SC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\pyqtgraph/flowchart/NodeLibrary.py isNodeClassr sC#t$$ 5 uu 3 # ##scNeZdZdZdZd dZdZdZdZe dZ d Z d S) NodeLibraryz A library of flowchart Node types. Custom libraries may be built to provide each flowchart with a specific set of allowed Node types. cRt|_t|_dSN)rnodeListnodeTreeselfs r __init__zNodeLibrary.__init__s#  #  Fc$t|stdt|z|j}|s||jvrtd|z||j|<|D]0}|j}|D]}||vrt ||<||} |||<1dS)ah Register a new node type. If the type's name is already in use, an exception will be raised (unless override=True). ============== ========================================================= **Arguments:** nodeClass a subclass of Node (must have typ.nodeName) paths list of tuples specifying the location(s) this type will appear in the library tree. override if True, overwrite any class having the same name ============== ========================================================= z Object %s is not a Node subclassz*Node type name '%s' is already registered.N)r Exceptionstrrrrr)r nodeClasspathsoverridenamepathrootns r addNodeTypezNodeLibrary.addNodeTypes9%% Q>YOPP P! QDDM11H4OPP P' d # #D=D  D==)mmDGAw"DJJ  # #rc^ |j|S#t$rtd|zwxYw)NzNo node type called '%s')rKeyErrorr)rrs r getNodeTypezNodeLibrary.getNodeType8sC ?=& & ? ? ?6=>> > ?s ,c|jSr)rrs r getNodeTreezNodeLibrary.getNodeTree>s }rct}|j|_||j|_|S)z0 Return a copy of this library. )rrcopytreeCopyr)rlibs r r(zNodeLibrary.copyAs<mm}))++ }}T]33  rct}|D]7\}}t|r|||<t|||<8|Sr)ritemsr rr))treer(kvs r r)zNodeLibrary.treeCopyJs]}}::<< 2 2CAa1~~ 2Q%..q11Q rct)z6 Reload Node classes in this library. )NotImplementedErrorrs r reloadzNodeLibrary.reloadTs"###rN)F) __name__ __module__ __qualname____doc__rr!r$r&r( staticmethodr)r2rr rrs &&&####<??? \$$$$$rrN) collectionsrrr rr8rr r:st######$$$H$H$H$H$H$H$H$H$H$H$r