• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python properties.SongProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __song_properties

 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,代码行数:12,代码来源:songlist.py


示例2: _properties

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,代码行数:17,代码来源:commands.py


示例3: __key_press

    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,代码行数:27,代码来源:songlist.py


示例4: __key_press

 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,代码行数:28,代码来源:songlist.py


示例5: TSongProperties

class TSongProperties(TestCase):
    af1 = AudioFile({"title": "woo"})
    af1.sanitize(fsnative(u"invalid"))
    af2 = AudioFile({"title": "bar", "album": "quux"})
    af2.sanitize(fsnative(u"alsoinvalid"))

    def setUp(self):
        SongProperties.plugins = DummyPlugins()
        config.init()
        self.library = SongLibrary()

    def test_onesong(self):
        self.window = SongProperties(self.library, [self.af1])

    def test_twosong(self):
        self.window = SongProperties(self.library, [self.af2, self.af1])

    def test_changed(self):
        self.test_twosong()
        self.window.hide()
        self.library.emit('changed', [self.af2])
        while Gtk.events_pending():
            Gtk.main_iteration()

    def test_removed(self):
        self.test_twosong()
        self.window.hide()
        self.library.emit('removed', [self.af2])
        while Gtk.events_pending():
            Gtk.main_iteration()

    def tearDown(self):
        try:
            self.window.destroy()
        except AttributeError:
            pass
        else:
            del(self.window)
        self.library.destroy()
        del(SongProperties.plugins)
        config.quit()
开发者ID:ZDBioHazard,项目名称:quodlibet,代码行数:41,代码来源:test_qltk_properties.py


示例6: __key_pressed

 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,代码行数:21,代码来源:pane.py


示例7: on_properties

 def on_properties(*args):
     song = player.song
     window = SongProperties(app.librarian, [song])
     window.show()
开发者ID:bernd-wechner,项目名称:quodlibet,代码行数:4,代码来源:menu.py


示例8: test_twosong

 def test_twosong(self):
     self.window = SongProperties(self.library, [self.af2, self.af1])
开发者ID:ZDBioHazard,项目名称:quodlibet,代码行数:2,代码来源:test_qltk_properties.py


示例9: __properties

 def __properties(self, *args):
     song = app.player.song
     if song:
         window = SongProperties(app.librarian, [song])
         window.show()
开发者ID:vrasidas,项目名称:quodlibet,代码行数:5,代码来源:trayicon.py


示例10: __current_song_prop

 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,代码行数:6,代码来源:quodlibetwindow.py


示例11: song_properties_cb

 def song_properties_cb(menu_item):
     parent = get_menu_item_top_parent(menu_item)
     window = SongProperties(librarian, songs, parent)
     window.show()
开发者ID:bp0,项目名称:quodlibet,代码行数:4,代码来源:songsmenu.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python searchbar.SearchBarBox类代码示例发布时间:2022-05-26
下一篇:
Python models.ObjectStore类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap