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


Python SongProperties.show方法代码示例

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


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

示例1: __key_press

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
    def __key_press(self, songlist, event, librarian):
        rating_accels = [
            "<ctrl>%d" % i for i in range(min(10, config.RATINGS.number + 1))]

        if qltk.is_accel(event, *rating_accels):
            rating = int(chr(event.keyval)) * config.RATINGS.precision
            self.__set_rating(rating, self.get_selected_songs(), librarian)
            return True
        elif qltk.is_accel(event, "<ctrl>Return", "<ctrl>KP_Enter"):
            self.__enqueue(self.get_selected_songs())
            return True
        elif qltk.is_accel(event, "<control>F"):
            self.emit('start-interactive-search')
            return True
        elif qltk.is_accel(event, "<alt>Return"):
            songs = self.get_selected_songs()
            if songs:
                window = SongProperties(librarian, songs, parent=self)
                window.show()
            return True
        elif qltk.is_accel(event, "<control>I"):
            songs = self.get_selected_songs()
            if songs:
                window = Information(librarian, songs, self)
                window.show()
            return True
        return False
开发者ID:lebauce,项目名称:quodlibet,代码行数:29,代码来源:songlist.py

示例2: __key_press

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def __key_press(self, songlist, event, librarian, player):
     if qltk.is_accel(event, "<Primary>Return", "<Primary>KP_Enter"):
         self.__enqueue(self.get_selected_songs())
         return True
     elif qltk.is_accel(event, "<Primary>F"):
         self.emit('start-interactive-search')
         return True
     elif qltk.is_accel(event, "<Primary>Delete"):
         songs = self.get_selected_songs()
         if songs:
             trash_songs(self, songs, librarian)
         return True
     elif qltk.is_accel(event, "<alt>Return"):
         songs = self.get_selected_songs()
         if songs:
             window = SongProperties(librarian, songs, parent=self)
             window.show()
         return True
     elif qltk.is_accel(event, "<Primary>I"):
         songs = self.get_selected_songs()
         if songs:
             window = Information(librarian, songs, self)
             window.show()
         return True
     elif qltk.is_accel(event, "space", "KP_Space") and player is not None:
         player.paused = not player.paused
         return True
     return False
开发者ID:ZDBioHazard,项目名称:quodlibet,代码行数:30,代码来源:songlist.py

示例3: __song_properties

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def __song_properties(self, librarian):
     model, rows = self.get_selection().get_selected_rows()
     if rows:
         songs = [model[row][0] for row in rows]
     else:
         from quodlibet import app
         if app.player.song:
             songs = [app.player.song]
         else:
             return
     window = SongProperties(librarian, songs, parent=self)
     window.show()
开发者ID:lebauce,项目名称:quodlibet,代码行数:14,代码来源:songlist.py

示例4: _properties

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
def _properties(app, value=None):
    library = app.library
    player = app.player
    window = app.window

    if value:
        if value in library:
            songs = [library[value]]
        else:
            songs = library.query(value)
    else:
        songs = [player.song]
    songs = filter(None, songs)

    if songs:
        window = SongProperties(library, songs, parent=window)
        window.show()
开发者ID:piotrdrag,项目名称:quodlibet,代码行数:19,代码来源:commands.py

示例5: __key_pressed

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def __key_pressed(self, view, event, librarian):
     # if ctrl+a is pressed, intercept and select the All entry instead
     if is_accel(event, "<Primary>a"):
         self.set_selected([])
         return True
     elif is_accel(event, "<Primary>Return", "<Primary>KP_Enter"):
         qltk.enqueue(self.__get_selected_songs(sort=True))
         return True
     elif is_accel(event, "<alt>Return"):
         songs = self.__get_selected_songs(sort=True)
         if songs:
             window = SongProperties(librarian, songs, parent=self)
             window.show()
         return True
     elif is_accel(event, "<Primary>I"):
         songs = self.__get_selected_songs(sort=True)
         if songs:
             window = Information(librarian, songs, self)
             window.show()
         return True
     return False
开发者ID:zsau,项目名称:quodlibet,代码行数:23,代码来源:pane.py

示例6: on_properties

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def on_properties(*args):
     song = player.song
     window = SongProperties(app.librarian, [song])
     window.show()
开发者ID:bernd-wechner,项目名称:quodlibet,代码行数:6,代码来源:menu.py

示例7: __properties

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def __properties(self, *args):
     song = app.player.song
     if song:
         window = SongProperties(app.librarian, [song])
         window.show()
开发者ID:vrasidas,项目名称:quodlibet,代码行数:7,代码来源:trayicon.py

示例8: __current_song_prop

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def __current_song_prop(self, *args):
     song = app.player.song
     if song:
         librarian = self.__library.librarian
         window = SongProperties(librarian, [song], parent=self)
         window.show()
开发者ID:kriskielce88,项目名称:xn--ls8h,代码行数:8,代码来源:quodlibetwindow.py

示例9: song_properties_cb

# 需要导入模块: from quodlibet.qltk.properties import SongProperties [as 别名]
# 或者: from quodlibet.qltk.properties.SongProperties import show [as 别名]
 def song_properties_cb(menu_item):
     parent = get_menu_item_top_parent(menu_item)
     window = SongProperties(librarian, songs, parent)
     window.show()
开发者ID:bp0,项目名称:quodlibet,代码行数:6,代码来源:songsmenu.py


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