本文整理汇总了Python中PyUtils.getProxyClass方法的典型用法代码示例。如果您正苦于以下问题:Python PyUtils.getProxyClass方法的具体用法?Python PyUtils.getProxyClass怎么用?Python PyUtils.getProxyClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyUtils
的用法示例。
在下文中一共展示了PyUtils.getProxyClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import PyUtils [as 别名]
# 或者: from PyUtils import getProxyClass [as 别名]
def __init__(self, memberName, object, tree, treeItemId, container = None, index = None):
"""Subclasses must calls this constructor.
Pass a string giving the member name for this node (member should be either App.Proxys.Member.Object or App.Proxys.Member.ObjectList.
Pass the object to observe, the member information for this object (from App.Proxys.Member).
Also pass the tree and the treeItemId where this object is found.
In container, pass the object that contains this node (in an HAS_A or HAS_MANY relationship)
In index, pass the index of this node within its container (in an HAS_MANY relationship)
"""
super( NodeData, self ).__init__()
self._memberName = memberName
self._object = object
self._tree = tree
self._treeItemId = treeItemId
self._container = container
self._index = index
if object is None :
self._proxyClass = None
iconIndex = getIconIndex( '../data/ui/noneIcon.png' )
else:
object.addObserver( self )
self._proxyClass = PyUtils.getProxyClass(object)
iconIndex = getIconIndex( self._proxyClass.getIcon() )
self._tree.SetItemImage( self._treeItemId, iconIndex )
self._subMemberNodes = []
if self._proxyClass is not None :
for subMember in self._proxyClass.getObjectMembers():
self._subMemberNodes.append( _createSubMemberNode(subMember, self._tree, self._treeItemId, object) )
tree.SetItemPyData( treeItemId, self )
# Initial update
self.update()