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