本文整理汇总了Python中lollypop.view.View.connect方法的典型用法代码示例。如果您正苦于以下问题:Python View.connect方法的具体用法?Python View.connect怎么用?Python View.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lollypop.view.View
的用法示例。
在下文中一共展示了View.connect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __populate
# 需要导入模块: from lollypop.view import View [as 别名]
# 或者: from lollypop.view.View import connect [as 别名]
def __populate(self, albums):
"""
Populate view and make it visible
@param albums as [albums ids as int]
"""
# Add a loading indicator
view = View()
spinner = Gtk.Spinner()
spinner.set_hexpand(True)
spinner.set_vexpand(True)
spinner_size = int(ArtSize.BIG / 3)
spinner.set_size_request(spinner_size, spinner_size)
spinner.set_property('halign', Gtk.Align.CENTER)
spinner.set_property('valign', Gtk.Align.CENTER)
spinner.start()
view.add(spinner)
view.show_all()
self.add(view)
self.set_transition_type(Gtk.StackTransitionType.NONE)
self.set_visible_child(view)
self.set_transition_type(Gtk.StackTransitionType.CROSSFADE)
self.clean_old_views(view)
# Populate artist albums view
view = ArtistAlbumsView(self.__track.artist_ids, [])
view.connect('populated', self.__on_populated, spinner)
view.show()
view.populate(albums)
示例2: _populate
# 需要导入模块: from lollypop.view import View [as 别名]
# 或者: from lollypop.view.View import connect [as 别名]
def _populate(self, albums):
"""
Populate view and make it visible
@param albums as [albums ids as int]
"""
# Add a loading indicator
view = View()
spinner = Gtk.Spinner()
spinner.set_hexpand(True)
spinner.set_vexpand(True)
spinner.set_size_request(100, 100)
spinner.set_property('halign', Gtk.Align.CENTER)
spinner.set_property('valign', Gtk.Align.CENTER)
spinner.start()
view.add(spinner)
view.show_all()
self.add(view)
self.set_visible_child(view)
self.clean_old_views(view)
# Populate artist albums view
view = ArtistAlbumsView([self._current[0]], [])
view.connect('populated', self._on_populated, spinner)
view.show()
view.populate(albums)