示例#1
0
def init_tree_style(t, ts):
    if not ts:
        ts = TreeStyle()

    if not ts.layout_fn:
        cl = t.__class__
        try:
            ts_template = _DEFAULT_STYLE[cl]
        except KeyError, e:
            pass
        else:
            apply_template(ts, ts_template)
示例#2
0
def init_tree_style(t, ts):
    if not ts:
        ts = TreeStyle()

    if not ts.layout_fn:
        cl = t.__class__
        try:
            ts_template = _DEFAULT_STYLE[cl]
        except KeyError, e:
            pass
        else:
            apply_template(ts, ts_template)
示例#3
0
文件: drawer.py 项目: xguse/ete
def init_scene(t, layout, ts):
    global _QApp

    if not ts:
        ts = TreeStyle()

    if layout and not ts.layout_fn: 
        ts.layout_fn  = layout
    elif not layout and not ts.layout_fn:
        cl = t.__class__
        try:
            ts_template = _DEFAULT_STYLE[cl]
        except KeyError, e:
            pass
        else:
            apply_template(ts, ts_template)
示例#4
0
def init_scene(t, layout, ts):
    global _QApp

    if not ts:
        ts = TreeStyle()

    if layout and not ts.layout_fn:
        ts.layout_fn = layout
    elif not layout and not ts.layout_fn:
        cl = t.__class__
        try:
            ts_template = _DEFAULT_STYLE[cl]
        except KeyError, e:
            pass
        else:
            apply_template(ts, ts_template)
示例#5
0
def init_tree_style(t, ts):
    custom_ts = True
    if not ts:
        custom_ts = False
        ts = TreeStyle()

    if not ts.layout_fn:
        cl = t.__class__
        try:
            ts_template = _DEFAULT_STYLE[cl]
        except KeyError, e:
            pass
        else:
            if not custom_ts:
                apply_template(ts, ts_template)
            else:
                ts.layout_fn = ts_template.get("layout_fn", None)
示例#6
0
文件: app.py 项目: xenofonstam/test
 def run_me_1(self, json_data, json_datas):
     return templates.apply_template(json_data)