Part of elisa.plugins.poblesec.base.list View In Hierarchy
Known subclasses: elisa.plugins.database.photo_controller.PhotoAlbumViewMode, elisa.plugins.database.photo_controller.PhotoTimesViewMode, elisa.plugins.database.photo_controller.PhotoViewMode, elisa.plugins.database.video_controller.MovieViewMode, elisa.plugins.database.video_controller.VideoTimesViewMode, elisa.plugins.database.video_controller.VideoViewMode, elisa.plugins.dvd.dvdcontroller.DvdMenuViewMode, elisa.plugins.flickr.controller.FlickrViewMode, elisa.plugins.poblesec.filesystem.FilesystemViewMode, elisa.plugins.poblesec.music_library.AlbumsViewMode, elisa.plugins.poblesec.music_library.ArtistsViewMode, elisa.plugins.poblesec.music_library.TracksViewMode, elisa.plugins.poblesec.network.NetworkViewMode, elisa.plugins.poblesec.plugins.PluginActionsViewMode, elisa.plugins.poblesec.plugins.PluginListViewMode, elisa.plugins.poblesec.section.SectionMenuViewMode, elisa.plugins.rss.controller.RssReaderViewMode, elisa.plugins.shoutcast.controller.ShoutcastViewMode, elisa.plugins.youtube.controller.YoutubeViewMode
Generic view mode API.
It defines a common API for clients. All one has to do is inherit from this class and implement the following methods:
get_label(item)
get_sublabel(item)
get_default_image(item)
get_image(item, theme)
get_preview_image(item, theme)
Line # | Kind | Name | Docs |
---|---|---|---|
190 | Method | get_label | Return a text to display in a label to represent an item. |
206 | Method | get_sublabel | Return a text to display in a sublabel to represent an item. |
222 | Method | get_default_image | Return the path of a theme resource to display as a default image for |
236 | Method | get_image | Return the path to an image file to display as an image for an item. |
258 | Method | get_preview_image | Return the path to an image file to display as a preview image for an |
Inherited from Component:
Line # | Kind | Name | Docs |
---|---|---|---|
85 | Class | PathDescriptor | Undocumented |
97 | Class Method | create | Create and initialize the component. |
130 | Method | initialize | Initialize the component. |
142 | Method | clean | Clean the component. |
Inherited from Loggable (via Component):
Line # | Kind | Name | Docs |
---|---|---|---|
81 | Method | __init__ | Undocumented |
This call is asynchronous, it should return a elisa.core.utils.cancellable_defer.CancellableDeferred
that, when triggered, returns the text of the label.
Parameters | item | a list item
(type: a subclass of elisa.core.components.model.Model
) |
Returns | a cancellable deferred
(type: elisa.core.utils.cancellable_defer.CancellableDeferred
) |
This call is asynchronous, it should return a elisa.core.utils.cancellable_defer.CancellableDeferred
that, when triggered, returns the text of the sublabel.
Parameters | item | a list item
(type: a subclass of elisa.core.components.model.Model
) |
Returns | a cancellable deferred
(type: elisa.core.utils.cancellable_defer.CancellableDeferred
) |
Parameters | item | a list item
(type: a subclass of elisa.core.components.model.Model
) |
Returns | the path of a theme resource to display as a default image for the item
(type: str
) |
This call is asynchronous, it should return a elisa.core.utils.cancellable_defer.CancellableDeferred
that, when triggered, returns the path to an image file on disk (downloaded
and cached if necessary).
If no other image than the default one is necessary/available, this
method should return None
.
Parameters | item | a list item
(type: a subclass of elisa.core.components.model.Model
) |
theme | the frontend's current theme
(type: elisa.plugins.pigment.widgets.theme.Theme
) | |
Returns | a cancellable deferred or None
(type: elisa.core.utils.cancellable_defer.CancellableDeferred
) |
This call is synchronous, if no preview image is available yet for the
item or if no other image than the default one is necessary, it should
return None
.
Parameters | item | a list item
(type: a subclass of elisa.core.components.model.Model
) |
theme | the frontend's current theme
(type: elisa.plugins.pigment.widgets.theme.Theme
) | |
Returns | the path to an image file on disk or None
(type: str or None
) |