本文整理汇总了Python中efl.elementary.window.StandardWindow.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python StandardWindow.__init__方法的具体用法?Python StandardWindow.__init__怎么用?Python StandardWindow.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.window.StandardWindow
的用法示例。
在下文中一共展示了StandardWindow.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self, repo, win):
self.repo = repo
self.win = win
self.confirmed = False
StandardWindow.__init__(self, 'Egitu', 'Egitu', autodel=True)
vbox = Box(self, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
self.resize_object_add(vbox)
vbox.show()
# title
en = Entry(self, editable=False,
text='<title><align=center>Commit changes</align></title>',
size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ)
vbox.pack_end(en)
en.show()
panes = Panes(self, content_left_size = 0.2, horizontal=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
vbox.pack_end(panes)
panes.show()
# message entry
en = Entry(self, editable=True, scrollable=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
en.part_text_set('guide', 'Enter commit message here')
panes.part_content_set("left", en)
en.show()
self.msg_entry = en
# diff entry
self.diff_entry = DiffedEntry(self)
panes.part_content_set("right", self.diff_entry)
self.diff_entry.show()
# buttons
hbox = Box(self, horizontal=True, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
vbox.pack_end(hbox)
hbox.show()
bt = Button(self, text="Cancel")
bt.callback_clicked_add(lambda b: self.delete())
hbox.pack_end(bt)
bt.show()
bt = Button(self, text="Commit")
bt.callback_clicked_add(self.commit_button_cb)
hbox.pack_end(bt)
bt.show()
# show the window and give focus to the editable entry
self.size = 500, 500
self.show()
en.focus = True
# load the diff
repo.request_diff(self.diff_done_cb, only_staged=True)
示例2: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex4", "Align Example", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourButton = Button(self)
ourButton.size_hint_weight = EXPAND_BOTH
ourButton.size_hint_align = (0, 0)
ourButton.text = "Button 1"
ourButton.show()
ourButton2 = Button(self)
ourButton2.size_hint_weight = EXPAND_BOTH
ourButton2.size_hint_align = FILL_BOTH
ourButton2.text = "Button 2"
ourButton2.show()
ourButton3 = Button(self)
ourButton3.size_hint_weight = EXPAND_BOTH
ourButton3.size_hint_align = (1, 1)
ourButton3.text = "Button 3"
ourButton3.show()
ourBox = Box(self)
ourBox.size_hint_weight = EXPAND_BOTH
ourBox.pack_end(ourButton)
ourBox.pack_end(ourButton2)
ourBox.pack_end(ourButton3)
ourBox.show()
self.resize_object_add(ourBox)
示例3: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self, app):
# create the main window
StandardWindow.__init__(self, "eepdater", "eepDater - System Updater",
autodel=True, size=(320, 320))
self.callback_delete_request_add(lambda o: elementary.exit())
self.app = app
icon = Icon(self)
icon.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
icon.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL)
icon.standard_set('software-center')
icon.show()
self.icon_object_set(icon.object_get())
# build the two main boxes
self.mainBox = self.buildMainBox()
self.loadBox = self.buildLoadBox()
# build the information details inwin object
self.buildDetailsWin()
# the flip object has the load screen on one side and the GUI on the other
self.flip = Flip(self, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
self.flip.part_content_set("front", self.mainBox)
self.flip.part_content_set("back", self.loadBox)
self.resize_object_add(self.flip)
self.flip.show()
# show the window
self.show()
示例4: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex1", "Hello Elementary", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourLabel = Label(self)
ourLabel.size_hint_weight = EXPAND_BOTH
ourLabel.text = "Hello Elementary!"
ourLabel.show()
self.resize_object_add(ourLabel)
示例5: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex5", "Static Image", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourImage = Image(self)
ourImage.size_hint_weight = EXPAND_BOTH
ourImage.file_set("images/logo.png")
ourImage.tooltip_text_set("A picture!")
ourImage.show()
self.resize_object_add(ourImage)
示例6: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self, app):
self.app = app
self.branch_selector = None
self.caption_label = None
self.status_label = None
self.graph = None
self.diff_view = None
StandardWindow.__init__(self, 'egitu', 'Efl GIT gUi - Egitu',
size=(1000,600), autodel=True)
self.callback_delete_request_add(lambda o: elm.exit())
示例7: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex12", "Custom Widget", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourPictureFrame = PictureFrame(self)
ourPictureFrame.size_hint_weight = EXPAND_BOTH
ourPictureFrame.text = "A Custom Picture Frame"
ourPictureFrame.file_set("images/logo.png")
ourPictureFrame.show()
self.resize_object_add(ourPictureFrame)
示例8: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex7", "Naviframe", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
staticImage = staticImage = Image(self)
staticImage.size_hint_weight = EXPAND_BOTH
staticImage.file_set("images/logo.png")
staticImage.tooltip_text_set("A picture!")
staticImage.show()
ourLabel = ourLabel = Label(self)
ourLabel.size_hint_weight = EXPAND_BOTH
ourLabel.text = "Hey look some text!"
ourLabel.show()
self.nf = Naviframe(self)
self.nf.size_hint_weight = EXPAND_BOTH
self.nf.size_hint_align = FILL_BOTH
self.nf.show()
buttonOne = Button(self)
buttonOne.size_hint_weight = EXPAND_BOTH
buttonOne.text = "Show image"
buttonOne.callback_clicked_add(self.buttonPressed, staticImage)
buttonOne.show()
buttonTwo = Button(self)
buttonTwo.size_hint_weight = EXPAND_BOTH
buttonTwo.text = "Show label"
buttonTwo.callback_clicked_add(self.buttonPressed, ourLabel)
buttonTwo.show()
buttonBox = Box(self)
buttonBox.size_hint_weight = EXPAND_HORIZ
buttonBox.horizontal_set(True)
buttonBox.pack_end(buttonOne)
buttonBox.pack_end(buttonTwo)
buttonBox.show()
mainBox = Box(self)
mainBox.size_hint_weight = EXPAND_BOTH
mainBox.pack_end(self.nf)
mainBox.pack_end(buttonBox)
mainBox.show()
self.nf.item_simple_push(staticImage)
self.resize_object_add(mainBox)
示例9: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex10", "Searchable List", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
searchList = SearchableList(self)
searchList.size_hint_weight = EXPAND_BOTH
searchList.ourList.callback_activated_add(self.listItemSelected)
ListItems.sort()
for it in ListItems:
searchList.item_append(it)
searchList.show()
self.resize_object_add(searchList)
示例10: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex11", "Genlist List", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourList = Genlist(self)
ourList.size_hint_weight = EXPAND_BOTH
ourList.callback_activated_add(self.listItemSelected)
ListItems.sort()
for it in ListItems:
li = GenlistItem(item_data={"itemName":it}, item_class=GLIC())
li.append_to(ourList)
ourList.show()
self.resize_object_add(ourList)
示例11: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "efl-dbus-spy", "EFL DBus Spy - Espionage")
self.autodel_set(True)
self.callback_delete_request_add(lambda o: elm.exit())
bg = Background(self)
self.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
box = Box(self)
self.resize_object_add(box)
box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
box.show()
flip = FlipSelector(self)
flip.item_append("Session Bus", self.flip_selected_cb, session_bus)
flip.item_append("System Bus", self.flip_selected_cb, system_bus)
box.pack_end(flip)
flip.show()
panes = Panes(self)
panes.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
panes.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
# panes.content_left_size = 0.333
# panes.fixed = True
box.pack_end(panes)
panes.show()
self.names_list = NamesList(self)
panes.part_content_set("left", self.names_list)
self.names_list.show()
self.detail_list = DetailList(self)
panes.part_content_set("right", self.detail_list)
self.detail_list.show()
self.resize(700, 500)
self.show()
示例12: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex8", "ElmEx - Button and Popup", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourButton = StandardButton(self, "Show Popup", "start-here", self.buttonPressed)
ourButton.size_hint_weight = EXPAND_HORIZ
ourButton.size_hint_align = FILL_BOTH
ourButton.show()
ourButton2 = StandardButton(self, "Show About", "dialog-information", self.button2Pressed)
ourButton2.size_hint_weight = EXPAND_HORIZ
ourButton2.size_hint_align = FILL_BOTH
ourButton2.show()
mainBox = Box(self)
mainBox.size_hint_weight = EXPAND_BOTH
mainBox.size_hint_align = FILL_BOTH
mainBox.pack_end(ourButton)
mainBox.pack_end(ourButton2)
mainBox.show()
self.resize_object_add(mainBox)
示例13: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex2", "Hello Elementary", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
ourLabel = Label(self)
ourLabel.size_hint_weight = EXPAND_BOTH
ourLabel.text = "Hello Elementary!"
ourLabel.show()
ourButton = Button(self)
ourButton.size_hint_weight = EXPAND_BOTH
ourButton.text = "Goodbye Elementary"
ourButton.callback_clicked_add(self.buttonPressed)
ourButton.show()
ourBox = Box(self)
ourBox.size_hint_weight = EXPAND_BOTH
ourBox.pack_end(ourLabel)
ourBox.pack_end(ourButton)
ourBox.show()
self.resize_object_add(ourBox)
示例14: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self):
StandardWindow.__init__(self, "ex6", "Selected Image", size=(300, 200))
self.callback_delete_request_add(lambda o: elm.exit())
self.ourImage = ourImage = Image(self)
ourImage.size_hint_weight = EXPAND_BOTH
ourImage.size_hint_align = FILL_BOTH
ourImage.file_set("images/logo.png")
ourImage.tooltip_text_set("A picture!")
ourImage.show()
ourButton = FileselectorButton(self)
ourButton.size_hint_weight = EXPAND_HORIZ
ourButton.text = "Select new Image"
ourButton.callback_file_chosen_add(self.fileSelected)
ourButton.show()
ourBox = Box(self)
ourBox.size_hint_weight = EXPAND_BOTH
ourBox.pack_end(ourImage)
ourBox.pack_end(ourButton)
ourBox.show()
self.resize_object_add(ourBox)
示例15: __init__
# 需要导入模块: from efl.elementary.window import StandardWindow [as 别名]
# 或者: from efl.elementary.window.StandardWindow import __init__ [as 别名]
def __init__(self, app):
self.app = app
self.prog_popup = None
# the window
StandardWindow.__init__(self, 'epack', 'Epack')
self.autodel_set(True)
self.callback_delete_request_add(lambda o: self.app.exit())
# main vertical box
vbox = Box(self, size_hint_weight=EXPAND_BOTH)
self.resize_object_add(vbox)
vbox.show()
### header horiz box (inside a padding frame)
frame = Frame(self, style='pad_medium',
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
vbox.pack_end(frame)
frame.show()
self.header_box = Box(self, horizontal=True,
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
frame.content = self.header_box
self.header_box.show()
# genlist with archive content
self.file_itc = GenlistItemClass(item_style="no_icon",
text_get_func=gl_file_text_get)
self.fold_itc = GenlistItemClass(item_style="one_icon",
text_get_func=gl_fold_text_get,
content_get_func=gl_fold_icon_get)
self.file_list = Genlist(self, homogeneous=True,
size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
self.file_list.callback_expand_request_add(self._gl_expand_req_cb)
self.file_list.callback_contract_request_add(self._gl_contract_req_cb)
self.file_list.callback_expanded_add(self._gl_expanded_cb)
self.file_list.callback_contracted_add(self._gl_contracted_cb)
vbox.pack_end(self.file_list)
self.file_list.show()
### footer table (inside a padding frame)
frame = Frame(self, style='pad_medium',
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
vbox.pack_end(frame)
frame.show()
table = Table(frame)
frame.content = table
table.show()
# FileSelectorButton
self.fsb = DestinationButton(app, self)
table.pack(self.fsb, 0, 0, 3, 1)
self.fsb.show()
sep = Separator(table, horizontal=True,
size_hint_weight=EXPAND_HORIZ)
table.pack(sep, 0, 1, 3, 1)
sep.show()
# extract button
self.extract_btn = Button(table, text=_('Extract'))
self.extract_btn.callback_clicked_add(self.extract_btn_cb)
table.pack(self.extract_btn, 0, 2, 1, 2)
self.extract_btn.show()
sep = Separator(table, horizontal=False)
table.pack(sep, 1, 2, 1, 2)
sep.show()
# delete-archive checkbox
self.del_chk = Check(table, text=_('Delete archive after extraction'),
size_hint_weight=EXPAND_HORIZ,
size_hint_align=(0.0, 1.0))
self.del_chk.callback_changed_add(self.del_check_cb)
table.pack(self.del_chk, 2, 2, 1, 1)
self.del_chk.show()
# create-archive-folder checkbox
self.create_folder_chk = Check(table, text=_('Create archive folder'),
size_hint_weight=EXPAND_HORIZ,
size_hint_align=(0.0, 1.0))
table.pack(self.create_folder_chk, 2, 3, 1, 1)
self.create_folder_chk.callback_changed_add(
lambda c: self.update_fsb_label())
self.create_folder_chk.show()
# set the correct ui state
self.update_ui()
# show the window
self.resize(300, 380)
self.show()