当前位置: 首页>>代码示例>>Python>>正文


Python Icon.show方法代码示例

本文整理汇总了Python中efl.elementary.icon.Icon.show方法的典型用法代码示例。如果您正苦于以下问题:Python Icon.show方法的具体用法?Python Icon.show怎么用?Python Icon.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在efl.elementary.icon.Icon的用法示例。


在下文中一共展示了Icon.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
    def __init__(self, parent):
        DialogWindow.__init__(self, parent, 'epack-info', 'Epack', autodel=True)

        fr = Frame(self, style='pad_large', size_hint_weight=EXPAND_BOTH,
                   size_hint_align=FILL_BOTH)
        self.resize_object_add(fr)
        fr.show()

        hbox = Box(self, horizontal=True, padding=(12,12))
        fr.content = hbox
        hbox.show()

        vbox = Box(self, align=(0.0,0.0), padding=(6,6),
                   size_hint_weight=EXPAND_VERT, size_hint_align=FILL_VERT)
        hbox.pack_end(vbox)
        vbox.show()

        # icon + version
        ic = Icon(self, standard='epack', size_hint_min=(64,64))
        vbox.pack_end(ic)
        ic.show()

        lb = Label(self, text=_('Version: %s') % __version__)
        vbox.pack_end(lb)
        lb.show()

        sep = Separator(self, horizontal=True)
        vbox.pack_end(sep)
        sep.show()

        # buttons
        bt = Button(self, text=_('Epack'), size_hint_align=FILL_HORIZ)
        bt.callback_clicked_add(lambda b: self.entry.text_set(utils.INFO))
        vbox.pack_end(bt)
        bt.show()

        bt = Button(self, text=_('Website'),size_hint_align=FILL_HORIZ)
        bt.callback_clicked_add(lambda b: utils.xdg_open(utils.GITHUB))
        vbox.pack_end(bt)
        bt.show()

        bt = Button(self, text=_('Authors'), size_hint_align=FILL_HORIZ)
        bt.callback_clicked_add(lambda b: self.entry.text_set(utils.AUTHORS))
        vbox.pack_end(bt)
        bt.show()

        bt = Button(self, text=_('License'), size_hint_align=FILL_HORIZ)
        bt.callback_clicked_add(lambda b: self.entry.text_set(utils.LICENSE))
        vbox.pack_end(bt)
        bt.show()

        # main text
        self.entry = Entry(self, editable=False, scrollable=True, text=utils.INFO,
                        size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
        self.entry.callback_anchor_clicked_add(lambda e,i: utils.xdg_open(i.name))
        hbox.pack_end(self.entry)
        self.entry.show()

        self.resize(400, 200)
        self.show()
开发者ID:lonid,项目名称:epack,代码行数:62,代码来源:gui.py

示例2: gl_anim_start

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def gl_anim_start(anim_st):
    # Start icons animation before actually drag-starts
    yposret = 0

    items = list(anim_st.gl.selected_items)
    gli, yposret = anim_st.gl.at_xy_item_get(anim_st.mdx, anim_st.mdy)
    if gli is not None:
        # Add the item mouse is over to the list if NOT seleced
        if not gli in items:
            items.append(gli)

    for gli in items:
        # Now add icons to animation window
        o = gli.part_content_get("elm.swallow.icon")

        if o is not None:
            st = AnimIconSt()
            ic = Icon(anim_st.gl, file=o.file, size_hint_align=FILL_BOTH,
                size_hint_weight=EXPAND_BOTH, pos=o.pos, size=o.size)
            st.start_x, st.start_y = o.pos
            ic.show()

            st.o = ic
            anim_st.icons.append(st)

    anim_st.tm = None
    anim_st.ea = AnimatorTimeline(drag_anim_play, DRAG_TIMEOUT,
        anim_st)

    return ECORE_CALLBACK_CANCEL
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:32,代码来源:test_dnd.py

示例3: addTab

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
    def addTab(self, widget, tabName, canClose=True, disabled=False):
        self.tabs.append(widget)

        btn = Button(self.buttonBox, style="anchor", size_hint_align=ALIGN_LEFT)
        btn.text = tabName
        btn.data["widget"] = widget
        btn.disabled = disabled
        btn.callback_clicked_add(self.showTab, widget)
        btn.show()

        icn = Icon(self.buttonBox)
        icn.standard_set("gtk-close")
        icn.show()

        cls = Button(self.buttonBox, content=icn, style="anchor", size_hint_align=ALIGN_LEFT)
        cls.data["widget"] = widget
        cls.callback_clicked_add(self.closeTab)
        cls.disabled = disabled
        if canClose:
            cls.show()

        sep = Separator(self.buttonBox, size_hint_align=ALIGN_LEFT)
        sep.show()

        self.buttonBox.pack_end(btn)
        self.buttonBox.pack_end(cls)
        self.buttonBox.pack_end(sep)

        #Arguments go: btn, cls, sep
        widget.data["close"] = cls
        widget.data["button"] = btn
        widget.data["sep"] = sep
        
        self.showTab(widget=widget)
开发者ID:Deepspeed,项目名称:bodhi3packages,代码行数:36,代码来源:tabbedbox.py

示例4: __init__

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [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()
开发者ID:jbenito,项目名称:bodhi3packages,代码行数:33,代码来源:eepDater.py

示例5: content_get

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
 def content_get(self, obj, part, data, *args):
     if part == "elm.swallow.icon":
         icon = Icon(obj, file=os.path.join(img_path, data),
             size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
         icon.show()
         return icon
     return None
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:9,代码来源:test_dnd.py

示例6: grid_icons_get

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def grid_icons_get(grid):
    # Start icons animation before actually drag-starts

    xposret, yposret = 0, 0
    icons = []

    xm, ym = grid.evas.pointer_canvas_xy
    items = list(grid.selected_items)
    print(items)
    gli, xposret, yposret = grid.at_xy_item_get(xm, ym)
    if gli is not None:
        # Add the item mouse is over to the list if NOT seleced
        if not gli in items:
            items.append(gli)
    print(items)

    for gli in items:
        # Now add icons to animation window
        o = gli.part_content_get("elm.swallow.icon")

        if o is not None:
            ic = Icon(grid, file=o.file, pos=o.pos, size=o.size,
                size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH)
            ic.show()
            icons.append(ic)

    return icons
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:29,代码来源:test_dnd.py

示例7: gl_icons_get

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def gl_icons_get(gl):
    # Start icons animation before actually drag-starts

    yposret = 0
    icons = []

    xm, ym = gl.evas.pointer_canvas_xy
    items = list(gl.selected_items)
    gli, yposret = gl.at_xy_item_get(xm, ym)

    if gli is not None:
        # Add the item mouse is over to the list if NOT seleced
        if not gli in items:
            items.append(gli)

    for it in items:
        # Now add icons to animation window
        o = it.part_content_get("elm.swallow.icon")

        if o is not None:
            f, g = o.file
            x, y, w, h = o.geometry

            ic = Icon(gl, file=(f, g), size_hint_align=FILL_BOTH,
                size_hint_weight=EXPAND_BOTH, pos=(x,y), size=(w,h))

            ic.show()
            icons.append(ic)

    return icons
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:32,代码来源:test_dnd.py

示例8: content_get

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
 def content_get(self, gg, part, data):
     if not part == "elm.swallow.icon":
         ic = Icon(gg, scale=0.5,
             file=os.path.join(img_path, "icon_%02i.png" % (data % 4)),
             resizable=(0, 0), size_hint_weight=EXPAND_BOTH,
             size_hint_align=(0.5, 0.5))
         ic.show()
         return ic
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:10,代码来源:test_access.py

示例9: __init__

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
 def __init__(self, ourParent, ourText, ourIcon=None, ourCB=None, *args, **kwargs):
     Button.__init__(self, ourParent, *args, **kwargs)
     icon = Icon(self, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
     icon.standard_set(ourIcon)
     icon.show()
     
     self.text = ourText
     self.content_set(icon)
     self.callback_clicked_add(ourCB)
开发者ID:Feneric,项目名称:bodhi3packages,代码行数:11,代码来源:StandardButton.py

示例10: icon_transparent_clicked

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def icon_transparent_clicked(obj, item=None):
    win = Window("icon-transparent", ELM_WIN_BASIC, title="Icon Transparent",
        autodel=True, alpha=True)
    if obj is None:
        win.callback_delete_request_add(lambda o: elementary.exit())

    icon = Icon(win, file=os.path.join(img_path, "logo.png"),
        resizable=(False, False))
    win.resize_object_add(icon)
    icon.show()

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:14,代码来源:test_icon.py

示例11: bt_clicked

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def bt_clicked(obj):
    win = StandardWindow("preload-prescale", "Preload & Prescale", autodel=True,
        size=(350, 350))

    ic = Icon(win, file=os.path.join(img_path, "insanely_huge_test_image.jpg"),
        size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH,
        resizable=(True, True), aspect_fixed=True, preload_disabled=True,
        prescale=True)
    win.resize_object_add(ic)
    ic.show()

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:14,代码来源:test_icon.py

示例12: update_ui

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
    def update_ui(self, listing_in_progress=False):
        box = self.header_box
        box.clear()
        ui_disabled = True

        # file listing in progress
        if listing_in_progress:
            spin = Progressbar(box, style='wheel', pulse_mode=True)
            spin.pulse(True)
            spin.show()
            box.pack_end(spin)

            lb = Label(box, text=_('Reading archive, please wait...'),
                       size_hint_weight=EXPAND_HORIZ,
                       size_hint_align=(0.0, 0.5))
            lb.show()
            box.pack_end(lb)

        # or header button
        else:
            if self.app.file_name is None:
                txt = _('No archive loaded, click to choose a file')
            else:
                ui_disabled = False
                txt = _('<b>Archive:</b> %s') % \
                      (os.path.basename(self.app.file_name))

            lb = Label(box, text='<align=left>%s</align>' % txt)
            bt = Button(box, content=lb, size_hint_weight=EXPAND_HORIZ,
                        size_hint_fill=FILL_HORIZ)
            bt.callback_clicked_add(lambda b: \
                        FileSelectorInwin(self, _('Choose an archive'),
                                          self._archive_selected_cb,
                                          path=os.getcwd()))
            box.pack_end(bt)
            bt.show()

        # always show the about button
        sep = Separator(box)
        box.pack_end(sep)
        sep.show()

        ic = Icon(box, standard='dialog-info', size_hint_min=(24,24))
        ic.callback_clicked_add(lambda i: InfoWin(self))
        box.pack_end(ic)
        ic.show()

        for widget in (self.extract_btn, self.fsb,
                       self.create_folder_chk, self.del_chk):
            widget.disabled = ui_disabled

        self.update_fsb_label()
开发者ID:lonid,项目名称:epack,代码行数:54,代码来源:gui.py

示例13: hover_clicked

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def hover_clicked(obj, item=None):
    win = StandardWindow("hover", "Hover", autodel=True, size=(320, 320))

    bx = Box(win, size_hint_weight=EXPAND_BOTH)
    win.resize_object_add(bx)
    bx.show()

    hv = Hover(win)

    bt = Button(win, text="Button")
    bt.callback_clicked_add(hover_bt1_clicked, hv)
    bx.pack_end(bt)
    bt.show()
    hv.target = bt

    bt = Button(win, text="Popup")
    hv.part_content_set("middle", bt)
    bt.show()

    bx = Box(win)

    ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
        resizable=(False, False))
    bx.pack_end(ic)
    ic.show()

    for t in "Top 1", "Top 2", "Top 3":
        bt = Button(win, text=t)
        bx.pack_end(bt)
        bt.show()

    bx.show()

    hv.part_content_set("top", bx)

    bt = Button(win, text="Bottom")
    hv.part_content_set("bottom", bt)
    bt.show()

    bt = Button(win, text="Left")
    hv.part_content_set("left", bt)
    bt.show()

    bt = Button(win, text="Right")
    hv.part_content_set("right", bt)
    bt.show()

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:50,代码来源:test_hover.py

示例14: addButtonPressed

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
    def addButtonPressed(self, btn):
        toAppend = "file://%s%s"%(self.filepathEntry.text, self.selectedFolder.text.replace(" ", "%20"))

        con = Icon(self, size_hint_weight=EXPAND_BOTH,
                    size_hint_align=FILL_BOTH)
        con.standard_set("gtk-directory")
        con.show()
        it = self.bookmarksList.item_append(self.selectedFolder.text, icon=con)
        it.data["path"] = "%s%s"%(self.filepathEntry.text, self.selectedFolder.text)

        self.bookmarksList.go()

        self.addButton.disabled = True
        self.removeButton.disabled = False

        with open(os.path.expanduser('~/.config/gtk-3.0/bookmarks'),'a') as f:
                f.write( toAppend + " " + self.selectedFolder.text + "\n" )
开发者ID:JeffHoogland,项目名称:bodhi4packages,代码行数:19,代码来源:fileselector.py

示例15: radio_clicked

# 需要导入模块: from efl.elementary.icon import Icon [as 别名]
# 或者: from efl.elementary.icon.Icon import show [as 别名]
def radio_clicked(obj):
    win = StandardWindow("radio", "Radio test", autodel=True)
    if obj is None:
        win.callback_delete_request_add(lambda o: elementary.exit())

    bx = Box(win, size_hint_weight=EXPAND_BOTH)
    win.resize_object_add(bx)
    bx.show()

    ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
        size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1))
    rd = Radio(win, state_value=0, size_hint_weight=EXPAND_BOTH,
        size_hint_align=FILL_HORIZ, text="Icon sized to radio", content=ic)
    bx.pack_end(rd)
    rd.show()
    ic.show()
    rdg = rd

    ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
        resizable=(False, False))
    rd = Radio(win, state_value=1, text="Icon no scale", content=ic)
    rd.group_add(rdg)
    bx.pack_end(rd)
    rd.show()
    ic.show()

    rd = Radio(win, state_value=2, text="Label Only")
    rd.group_add(rdg)
    bx.pack_end(rd)
    rd.show()

    rd = Radio(win, state_value=3, text="Disabled", disabled=True)
    rd.group_add(rdg)
    bx.pack_end(rd)
    rd.show()

    ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
        resizable=(False, False))
    rd = Radio(win, state_value=4, content=ic)
    rd.group_add(rdg)
    bx.pack_end(rd)
    rd.show()
    ic.show()

    ic = Icon(win, file=os.path.join(img_path, "logo_small.png"),
        resizable=(False, False))
    rd = Radio(win, state_value=5, content=ic, disabled=True)
    rd.group_add(rdg)
    bx.pack_end(rd)
    rd.show()
    ic.show()

    rdg.value = 2

    win.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:57,代码来源:test_radio.py


注:本文中的efl.elementary.icon.Icon.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。