本文整理汇总了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()
示例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))
示例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)
示例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)
示例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)
示例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)