當前位置: 首頁>>代碼示例>>Python>>正文


Python DotMaker.get_dots方法代碼示例

本文整理匯總了Python中cylc.gui.dot_maker.DotMaker.get_dots方法的典型用法代碼示例。如果您正苦於以下問題:Python DotMaker.get_dots方法的具體用法?Python DotMaker.get_dots怎麽用?Python DotMaker.get_dots使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cylc.gui.dot_maker.DotMaker的用法示例。


在下文中一共展示了DotMaker.get_dots方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from cylc.gui.dot_maker import DotMaker [as 別名]
# 或者: from cylc.gui.dot_maker.DotMaker import get_dots [as 別名]
    def __init__(self, cfg, updater, ttreeview, ttree_paths, info_bar, theme,
                 dot_size):

        super(TreeUpdater, self).__init__()

        self.action_required = False
        self.quit = False
        self.cleared = True
        self.autoexpand = True

        self.count = 0

        self.cfg = cfg
        self.updater = updater
        self.info_bar = info_bar
        self.last_update_time = None
        self.ancestors = {}
        self.descendants = []
        self.fam_state_summary = {}
        self._prev_id_named_paths = {}
        self._prev_data = {}
        self._prev_fam_data = {}

        self.autoexpand_states = [
            'queued', 'ready', 'expired', 'submitted', 'running', 'failed']
        self._last_autoexpand_me = []
        # Dict of paths vs all descendant node states
        self.ttree_paths = ttree_paths
        self.should_group_families = ("text" not in self.cfg.ungrouped_views)
        self.ttreeview = ttreeview
        # Hierarchy of models: view <- sorted <- filtered <- base model
        self.ttreestore = ttreeview.get_model().get_model().get_model()
        self._prev_tooltip_task_id = None
        if hasattr(self.ttreeview, "set_has_tooltip"):
            self.ttreeview.set_has_tooltip(True)
            try:
                self.ttreeview.connect('query-tooltip',
                                       self.on_query_tooltip)
            except TypeError:
                # Lower PyGTK version.
                pass

        # Cache the latest ETC calculation for active ids.
        self._id_tetc_cache = {}

        # Generate task state icons.
        dotm = DotMaker(theme, size=dot_size)
        self.dots = dotm.get_dots()
開發者ID:aosprey,項目名稱:cylc,代碼行數:50,代碼來源:updater_tree.py

示例2: __init__

# 需要導入模塊: from cylc.gui.dot_maker import DotMaker [as 別名]
# 或者: from cylc.gui.dot_maker.DotMaker import get_dots [as 別名]
    def __init__(self, cfg, updater, treeview, info_bar, theme, dot_size):

        super(DotUpdater, self).__init__()

        self.quit = False
        self.cleared = True
        self.action_required = False
        self.autoexpand = True
        self.should_hide_headings = False
        self.should_group_families = ("dot" not in cfg.ungrouped_views)
        self.should_transpose_view = False
        self.is_transposed = False
        self.defn_order_on = True

        self.cfg = cfg
        self.updater = updater
        self.theme = theme
        self.info_bar = info_bar
        self.last_update_time = None
        self.state_summary = {}
        self.fam_state_summary = {}
        self.ancestors_pruned = {}
        self.descendants = []
        self.point_strings = []

        self.led_headings = []
        self.led_treeview = treeview
        self.led_treestore = treeview.get_model()
        self._prev_tooltip_task_id = None
        if hasattr(self.led_treeview, "set_has_tooltip"):
            self.led_treeview.set_has_tooltip(True)
            try:
                self.led_treeview.connect('query-tooltip',
                                          self.on_query_tooltip)
            except TypeError:
                # Lower PyGTK version.
                pass

        self.task_list = []
        self.family_tree = {}
        self.expanded_rows = []
        self.selected_rows = []

        # generate task state icons
        dotm = DotMaker(theme, size=dot_size)
        self.dots = dotm.get_dots()
開發者ID:m214089,項目名稱:cylc,代碼行數:48,代碼來源:updater_dot.py


注:本文中的cylc.gui.dot_maker.DotMaker.get_dots方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。