当前位置: 首页>>代码示例>>Python>>正文


Python PyUtils.getProxyClass方法代码示例

本文整理汇总了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()
开发者ID:MontyThibault,项目名称:cartwheel-3d-Research-Modifications,代码行数:35,代码来源:NodeData.py


注:本文中的PyUtils.getProxyClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。