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


Python Table.__init__方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: from efl.elementary.table import Table [as 別名]
# 或者: from efl.elementary.table.Table import __init__ [as 別名]
    def __init__(self, parent, commit, show_full_msg=False):
        self.commit = commit

        Table.__init__(self, parent,  padding=(5,5))
        self.show()

        pic = GravatarPict(self)
        pic.size_hint_align = 0.0, 0.0
        pic.email_set(commit.author_email)
        self.pack(pic, 0, 0, 1, 1)
        pic.show()

        if commit.committer and commit.committer != commit.author:
            committed = '<name>Committed by:</name> <b>{}</b><br>'.format(
                        commit.committer)
        else:
            committed = ''
        text = '<name>{}</name>  <b>{}</b>  {}<br>{}<br>{}'.format(
                commit.sha[:9], commit.author, format_date(commit.commit_date), 
                committed, utf8_to_markup(commit.title))
        if show_full_msg:
            text += '<br><br>{}'.format(utf8_to_markup(commit.message))
        en = Entry(self, text=text, line_wrap=ELM_WRAP_NONE,
                   size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        self.pack(en, 1, 0, 1, 1)
        en.show()
開發者ID:DaveMDS,項目名稱:egitu,代碼行數:28,代碼來源:utils.py

示例2: __init__

# 需要導入模塊: from efl.elementary.table import Table [as 別名]
# 或者: from efl.elementary.table.Table import __init__ [as 別名]
    def __init__(self, parent, *args, **kargs):
        self.repo = None
        self.win = parent
        self.themef = theme_file_get()
        self.colors = [(0,100,0,100), (0,0,100,100), (100,0,0,100),
                      (100,100,0,100), (0,100,100,100), (100,0,100,100)]

        Table.__init__(self, parent, homogeneous=True, padding=(0,0))
開發者ID:simotek,項目名稱:egitu,代碼行數:10,代碼來源:dagview.py

示例3: __init__

# 需要導入模塊: from efl.elementary.table import Table [as 別名]
# 或者: from efl.elementary.table.Table import __init__ [as 別名]
    def __init__(self, parent_widget, titles=None, initial_sort=0,
        ascending=True, *args, **kwargs):

        self.header = titles
        self.sort_column = initial_sort
        self.sort_column_ascending = ascending

        self.rows = []
        self.header_row = []

        Table.__init__(self, parent_widget, *args, **kwargs)

        if titles is not None:
            self.header_row_pack(titles)
開發者ID:JeffHoogland,項目名稱:eccess,代碼行數:16,代碼來源:sortedlist.py

示例4: __init__

# 需要導入模塊: from efl.elementary.table import Table [as 別名]
# 或者: from efl.elementary.table.Table import __init__ [as 別名]
    def __init__(self, parent, app):
        self.app = app
        self.commit = None
        self.win = parent

        Table.__init__(self, parent,  padding=(5,5))
        self.show()

        # description entry
        self.entry = Entry(self, text='Unknown', line_wrap=ELM_WRAP_MIXED,
                           size_hint_weight=EXPAND_BOTH,
                           size_hint_align=FILL_BOTH,
                           editable=False)
        self.pack(self.entry, 0, 0, 1, 1)
        self.entry.show()

        # gravatar picture
        self.picture = GravatarPict(self)
        self.picture.size_hint_align = 1.0, 0.0
        self.picture.show()
        self.pack(self.picture, 1, 0, 1, 1)

        # action buttons box
        self.action_box = Box(self, horizontal=True,
                              size_hint_weight=EXPAND_HORIZ,
                              size_hint_align=(1.0, 1.0))
        self.pack(self.action_box, 0, 1, 2, 1)
        self.action_box.show()

        # panes
        panes = Panes(self, content_left_size = 0.3, horizontal=True,
                      size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        self.pack(panes, 0, 2, 2, 1)
        panes.show()

        # file list
        self.itc = GenlistItemClass(item_style='default',
                                    text_get_func=self._gl_text_get,
                                    content_get_func=self._gl_content_get)
        self.diff_list = Genlist(self, homogeneous=True, mode=ELM_LIST_COMPRESS,
                                 select_mode=ELM_OBJECT_SELECT_MODE_ALWAYS,
                                 size_hint_weight=EXPAND_BOTH,
                                 size_hint_align=FILL_BOTH)
        self.diff_list.callback_selected_add(self._list_selected_cb)
        panes.part_content_set('left', self.diff_list)

        # diff entry
        self.diff_entry = DiffedEntry(self)
        panes.part_content_set('right', self.diff_entry)
開發者ID:druonysus,項目名稱:egitu,代碼行數:51,代碼來源:diffview.py

示例5: __init__

# 需要導入模塊: from efl.elementary.table import Table [as 別名]
# 或者: from efl.elementary.table.Table import __init__ [as 別名]
    def __init__(self, parent, repo):
        self.repo = repo
        self.commit = None
        self.win = parent

        Table.__init__(self, parent,  padding=(5,5))
        self.show()

        # gravatar picture
        self.picture = GravatarPict(self)
        self.picture.size_hint_align = 0.0, 0.0
        self.picture.show()
        self.pack(self.picture, 0, 0, 1, 2)

        # description entry
        self.entry = Entry(self, text="Unknown", line_wrap=ELM_WRAP_MIXED,
                           size_hint_weight=EXPAND_BOTH,
                           size_hint_align=FILL_BOTH,
                           editable=False)
        self.pack(self.entry, 1, 0, 1, 1)
        self.entry.show()

        # action buttons box
        self.action_box = Box(self, horizontal=True,
                              size_hint_weight=EXPAND_HORIZ,
                              size_hint_align=(0.98, 0.98))
        self.pack(self.action_box, 1, 1, 1, 1)
        self.action_box.show()

        # panes
        panes = Panes(self, content_left_size = 0.3, horizontal=True,
                      size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        self.pack(panes, 0, 2, 2, 1)
        panes.show()

        # file list
        self.diff_list = List(self, size_hint_weight=EXPAND_BOTH,
                                    size_hint_align=FILL_BOTH)
        self.diff_list.callback_selected_add(self.change_selected_cb)
        panes.part_content_set("left", self.diff_list)

        # diff entry
        self.diff_entry = DiffedEntry(self)
        panes.part_content_set("right", self.diff_entry)
開發者ID:simotek,項目名稱:egitu,代碼行數:46,代碼來源:diffview.py

示例6: __init__

# 需要導入模塊: from efl.elementary.table import Table [as 別名]
# 或者: from efl.elementary.table.Table import __init__ [as 別名]
    def __init__(self, parent, session):
        Table.__init__(self, parent)
        self.session = session

        s = session.status()

        self.padding = 5, 5

        ses_pause_ic = self.ses_pause_ic = Icon(parent)
        ses_pause_ic.size_hint_align = -1.0, -1.0
        try:
            if session.is_paused():
                ses_pause_ic.standard = "player_pause"
            else:
                ses_pause_ic.standard = "player_play"
        except RuntimeError:
            self.log.debug("Setting session ic failed")
        self.pack(ses_pause_ic, 1, 0, 1, 1)
        ses_pause_ic.show()

        title_l = Label(parent)
        title_l.text = "<b>Session</b>"
        self.pack(title_l, 0, 0, 1, 1)
        title_l.show()

        d_ic = Icon(parent)
        try:
            d_ic.standard = "down"
        except RuntimeError:
            self.log.debug("Setting d_ic failed")
        d_ic.size_hint_align = -1.0, -1.0
        self.pack(d_ic, 0, 2, 1, 1)
        d_ic.show()

        d_l = self.d_l = Label(parent)
        d_l.text = "{}/s".format(intrepr(s.payload_download_rate))
        self.pack(d_l, 1, 2, 1, 1)
        d_l.show()

        u_ic = Icon(self)
        try:
            u_ic.standard = "up"
        except RuntimeError:
            self.log.debug("Setting u_ic failed")
        u_ic.size_hint_align = -1.0, -1.0
        self.pack(u_ic, 0, 3, 1, 1)
        u_ic.show()

        u_l = self.u_l = Label(parent)
        u_l.text = "{}/s".format(intrepr(s.payload_upload_rate))
        self.pack(u_l, 1, 3, 1, 1)
        u_l.show()

        peer_t = Label(parent)
        peer_t.text = "Peers"
        self.pack(peer_t, 0, 4, 1, 1)
        peer_t.show()

        peer_l = self.peer_l = Label(parent)
        peer_l.text = str(s.num_peers)
        self.pack(peer_l, 1, 4, 1, 1)
        peer_l.show()

        self.show()

        self.update_timer = Timer(1.0, self.update)
開發者ID:maikodaraine,項目名稱:EnlightenmentUbuntu,代碼行數:68,代碼來源:Main.py


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