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


Python TreeNode.__init__方法代码示例

本文整理汇总了Python中liblarch.TreeNode.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TreeNode.__init__方法的具体用法?Python TreeNode.__init__怎么用?Python TreeNode.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在liblarch.TreeNode的用法示例。


在下文中一共展示了TreeNode.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from liblarch import TreeNode [as 别名]
# 或者: from liblarch.TreeNode import __init__ [as 别名]
    def __init__(self, ze_id, requester, newtask=False):
        TreeNode.__init__(self, ze_id)
        # the id of this task in the project should be set
        # tid is a string ! (we have to choose a type and stick to it)
        assert(isinstance(ze_id, str) or isinstance(ze_id, str))
        self.tid = str(ze_id)
        self.set_uuid(uuid.uuid4())
        self.remote_ids = {}
        self.content = ""
        self.title = _("My new task")
        # available status are: Active - Done - Dismiss - Note
        self.status = self.STA_ACTIVE
        self.closed_date = Date.no_date()
        self.due_date = Date.no_date()
        self.start_date = Date.no_date()
        self.can_be_deleted = newtask
        # tags
        self.tags = []
        self.req = requester
        self.__main_treeview = requester.get_main_view()
        # If we don't have a newtask, we will have to load it.
        self.loaded = newtask
        # Should not be necessary with the new backends
#        if self.loaded:
#            self.req._task_loaded(self.tid)
        self.attributes = {}
        self._modified_update()
开发者ID:kunaaljain,项目名称:gtg,代码行数:29,代码来源:task.py

示例2: __init__

# 需要导入模块: from liblarch import TreeNode [as 别名]
# 或者: from liblarch.TreeNode import __init__ [as 别名]
    def __init__(self, name, req, attributes={}):
        """Construct a tag.

        @param name: The name of the tag. Should be a string, generally
            a short one.
        @param attributes: Allow having initial set of attributes without
            calling _save callback
        """
        TreeNode.__init__(self, name)
        self._name = saxutils.unescape(str(name))
        self.req = req
        self._save = None
        self._attributes = {'name': self._name}
        for key, value in attributes.iteritems():
            self.set_attribute(key, value)

        self.viewcount = None
开发者ID:lefred,项目名称:backend_gtgonline,代码行数:19,代码来源:tag.py

示例3: __init__

# 需要导入模块: from liblarch import TreeNode [as 别名]
# 或者: from liblarch.TreeNode import __init__ [as 别名]
 def __init__(self, tid, label,viewtree):
     TreeNode.__init__(self, tid)
     self.label = label
     self.tid = tid
     self.vt = viewtree
开发者ID:panks,项目名称:liblarch,代码行数:7,代码来源:main.py

示例4: __init__

# 需要导入模块: from liblarch import TreeNode [as 别名]
# 或者: from liblarch.TreeNode import __init__ [as 别名]
 def __init__(self,node_id):
     TreeNode.__init__(self,node_id)
     #A team cannot have parents. This is arbitrarly done for the purpose
     #of this example.
     self.set_parents_enabled(False)
开发者ID:broussea,项目名称:liblarch,代码行数:7,代码来源:contact_list.py

示例5: __init__

# 需要导入模块: from liblarch import TreeNode [as 别名]
# 或者: from liblarch.TreeNode import __init__ [as 别名]
 def __init__(self,tid):
     TreeNode.__init__(self, tid)
     self.colors = []
开发者ID:panks,项目名称:liblarch,代码行数:5,代码来源:test.py


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