本文整理汇总了Python中efl.elementary.popup.Popup.part_text_set方法的典型用法代码示例。如果您正苦于以下问题:Python Popup.part_text_set方法的具体用法?Python Popup.part_text_set怎么用?Python Popup.part_text_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.popup.Popup
的用法示例。
在下文中一共展示了Popup.part_text_set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build_prog_popup
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def build_prog_popup(self):
pp = Popup(self)
pp.part_text_set('title,text', _('Extracting files, please wait...'))
pp.show()
vbox = Box(self)
pp.part_content_set('default', vbox)
vbox.show()
lb = Label(self, ellipsis=True, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
vbox.pack_end(lb)
lb.show()
pb = Progressbar(pp, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
vbox.pack_end(pb)
pb.show()
bt = Button(pp, text=_('Cancel'))
bt.callback_clicked_add(lambda b: self.app.abort_operation())
pp.part_content_set('button1', bt)
self.prog_pbar = pb
self.prog_label = lb
self.prog_popup = pp
示例2: cb_popup_center_title_text_block_clicked_event
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def cb_popup_center_title_text_block_clicked_event(li, item, win):
popup = Popup(win, size_hint_weight=EXPAND_BOTH)
popup.text = "This Popup has title area and content area. " \
"When clicked on blocked event region, popup gets deleted"
popup.part_text_set("title,text", "Title")
popup.callback_block_clicked_add(cb_bnt_close, popup)
popup.show()
示例3: cb_popup_center_title_text_1button
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def cb_popup_center_title_text_1button(li, item, win):
popup = Popup(win, size_hint_weight=EXPAND_BOTH)
popup.text = "This Popup has title area, content area and " \
"action area set, action area has one button Close"
popup.part_text_set("title,text", "Title")
bt = Button(win, text="Close")
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button1", bt)
popup.show()
示例4: pw_error_popup
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def pw_error_popup(en):
win = en.top_widget_get()
popup = Popup(win)
popup.size_hint_weight = evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND
popup.part_text_set("title,text", "Error")
popup.text = "Incorrect Password!<br>Please try again."
log.error("eSudo Error: Incorrect Password. Please try again.")
popup.timeout = 3.0
popup.show()
示例5: __init__
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def __init__(self, canvas, title, text):
n = Popup(canvas)
n.part_text_set("title,text", title)
n.text = text
b = Button(canvas)
b.text = "OK"
b.callback_clicked_add(lambda x: n.delete())
n.part_content_set("button1", b)
n.show()
示例6: showDialog
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def showDialog(self, title, msg):
dia = Popup(self)
dia.part_text_set("title,text", title)
dia.part_text_set("default", msg)
bt = Button(dia, text="Ok")
bt.callback_clicked_add(lambda b: dia.delete())
dia.part_content_set("button1", bt)
dia.show()
示例7: _confirm_delete
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def _confirm_delete(self, m, item):
pp = Popup(self.top_widget, text=self._task.text)
pp.part_text_set('title,text', 'Confirm task deletion?')
btn = Button(pp, text='Cancel')
btn.callback_clicked_add(lambda b: pp.delete())
pp.part_content_set('button1', btn)
btn = Button(pp, text='Delete Task')
btn.callback_clicked_add(self._delete_confirmed, pp)
pp.part_content_set('button2', btn)
pp.show()
示例8: show_error_msg
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def show_error_msg(self, msg):
pop = Popup(self, text=msg)
pop.part_text_set('title,text', _('Error'))
btn = Button(self, text=_('Continue'))
btn.callback_clicked_add(lambda b: pop.delete())
pop.part_content_set('button1', btn)
btn = Button(self, text=_('Exit'))
btn.callback_clicked_add(lambda b: self.app.exit())
pop.part_content_set('button2', btn)
pop.show()
示例9: cb_popup_center_title_text_2button_restack
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def cb_popup_center_title_text_2button_restack(li, item, win):
popup = Popup(win, size_hint_weight=EXPAND_BOTH)
popup.text = "When you click the 'Restack' button, " \
"an image will be located under this popup"
popup.part_text_set("title,text", "Title")
bt = Button(win, text="Restack")
bt.callback_clicked_add(cb_btn_restack, popup)
popup.part_content_set("button1", bt)
bt = Button(win, text="Close")
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
popup.show()
示例10: cb_popup_center_title_content_3button
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def cb_popup_center_title_content_3button(li, item, win):
ic = Icon(win, file=os.path.join(img_path, "logo_small.png"))
bt = Button(win, text="Content", content=ic)
popup = Popup(win, size_hint_weight=EXPAND_BOTH, content=bt)
popup.part_text_set("title,text", "Title")
bt = Button(win, text="OK")
popup.part_content_set("button1", bt)
bt = Button(win, text="Cancel")
popup.part_content_set("button2", bt)
bt = Button(win, text="Close")
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
popup.show()
示例11: safe_quit
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def safe_quit(self):
if need_save() is False:
elm.exit()
else:
pp = Popup(self, text="You have unsave changes, if you don't save now all your recent modification will be lost.")
pp.part_text_set('title,text', 'Save changes to your txt file?')
btn = Button(pp, text='Close without saving')
btn.callback_clicked_add(lambda b: elm.exit())
pp.part_content_set('button1', btn)
btn = Button(pp, text='Cancel')
btn.callback_clicked_add(lambda b: pp.delete())
pp.part_content_set('button2', btn)
btn = Button(pp, text='Save')
btn.callback_clicked_add(lambda b: self.save(True))
pp.part_content_set('button3', btn)
pp.show()
示例12: cb_popup_center_title_item_3button
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def cb_popup_center_title_item_3button(li, item, win):
popup = Popup(win, size_hint_weight=EXPAND_BOTH)
popup.part_text_set("title,text", "Title")
for i in range(1, 11):
if i in [3, 5, 6]:
ic = Icon(win, file=os.path.join(img_path, "logo_small.png"))
popup.item_append("item"+str(i), ic)
else:
popup.item_append("item"+str(i), None)
bt = Button(win, text="OK")
popup.part_content_set("button1", bt)
bt = Button(win, text="Cancel")
popup.part_content_set("button2", bt)
bt = Button(win, text="Close")
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
popup.show()
示例13: cb_popup_bottom_title_text_3button
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def cb_popup_bottom_title_text_3button(li, item, win):
popup = Popup(win, size_hint_weight=EXPAND_BOTH,
content_text_wrap_type=ELM_WRAP_CHAR)
popup.text = "This Popup has title area, content area and " \
"action area set with content being character wrapped. " \
"action area has three buttons OK, Cancel and Close"
popup.part_text_set("title,text", "Title")
ic = Icon(win, file=os.path.join(img_path, "logo_small.png"))
popup.part_content_set("title,icon", ic)
bt = Button(win, text="OK")
popup.part_content_set("button1", bt)
bt = Button(win, text="Cancel")
popup.part_content_set("button2", bt)
bt = Button(win, text="Close")
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
popup.show()
示例14: _file_change
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
def _file_change(self):
# hack to make popup respect min_size
rect = Rectangle(self.parent.evas, size_hint_min=(400,400))
tb = Table(self.parent)
tb.pack(rect, 0, 0, 1, 1)
# show the fileselector inside a popup
popup = Popup(self.top_widget, content=tb)
popup.part_text_set('title,text', 'Choose the Todo.txt file to use')
popup.show()
# the fileselector widget
fs = Fileselector(popup, is_save=False, expandable=False,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
fs.callback_activated_add(self._file_change_done, popup)
fs.callback_done_add(self._file_change_done, popup)
try:
fs.selected = options.txt_file
except:
fs.path = os.path.expanduser('~')
fs.show()
tb.pack(fs, 0, 0, 1, 1)
示例15: FolderSelector
# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import part_text_set [as 别名]
class FolderSelector(Fileselector):
def __init__(self, parent):
Fileselector.__init__(self, parent, is_save=False, folder_only=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
self.path = os.getcwd()
# table+rect to respect min size :/
tb = Table(self, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
r = Rectangle(self.evas, color=(0,0,0,0), size_hint_min=(300,300),
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
tb.pack(r, 0, 0, 1, 1)
tb.pack(self, 0, 0, 1, 1)
self.popup = Popup(parent)
self.popup.part_text_set('title,text', 'Choose repository')
self.popup.content = tb
self.popup.show()
self.show()
def delete(self):
self.popup.delete()