Package elisa :: Package plugins :: Package poblesec :: Package slideshow :: Module player :: Class PicturePlayer

Class PicturePlayer

source code



PicturePlayer is the main interface to slideshow handling. It is responsible
for registration, creation and switching of slideshows. It acts as a stable
proxy to the currently selected slideshow forwarding user requests to it.

Emit the signals:
 - current-picture-changed: when the current picture displayed/in focus is
                            changed; at that point the actual picture file
                            starts being loaded
     params: L{elisa.plugins.base.models.image.ImageModel} of the picture
             C{int} index of the picture in the playlist

 - current-picture-loaded: when the current picture is finally loaded
     params: L{elisa.plugins.pigment.animation.implicit.AnimatedObject} wrapping the image
             drawable containing the loaded picture

 - status-changed: when L{status} changes
     params: one of [Slideshow.STOPPED, Slideshow.PLAYING]

 - playlist-size-changed: when the size of the playlist changes
     params: size of the playlist

 - available-slideshows-changed: when a slideshow has been added or removed
                                 from the list of available slideshows
     params: the list of available slideshows

 - slideshow-changed: when the currently selected slideshow has changed
     params: the newly selected slideshow type

 - current-picture-rotated: when the currently displayed/in focus picture
                            has been rotated
     params: final orientation of the picture; rotation constant from
             L{elisa.plugins.base.models.image}


@ivar status: whether the current slideshow was started or not
@type status: one of [Slideshow.STOPPED, Slideshow.PLAYING]

Instance Methods
 
__init__(self, playground)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
set_playlist(self, playlist, picture_index=0)
Set the list of pictures to display during the slideshow and display one of them immediately, by default the first one.
source code
 
clear_playlist(self)
Empty the playlist and removes any displayed picture from the playground.
source code
 
stop(self)
Empty the playlist and removes any displayed picture from the playground.
source code
int
get_playlist_size(self)
Return the size of the playlist.
source code
 
set_interval(self, interval)
Set the time during which a picture should be displayed/in focus for the user.
source code
 
start_slideshow(self, index=None)
Start the currently selected automated slideshow.
source code
 
stop_slideshow(self)
Stop the currently selected slideshow.
source code
 
next(self)
Display the next picture in the playlist.
source code
 
previous(self)
Display the previous picture in the playlist.
source code
elisa.plugins.base.models.image.ImageModel
get_current_picture(self)
Return the model of the current picture in the playlist.
source code
 
rotate_current_picture(self, orientation)
Visually rotate the current picture.
source code
 
set_slideshow(self, slideshow_class)
Switch the currently selected slideshow for another one.
source code
a class inheriting from elisa.plugins.poblesec.slideshow.transition_slideshow.Slideshow
get_slideshow(self)
Return the type of the currently selected slideshow.
source code
a list of classes inheriting from elisa.plugins.poblesec.slideshow.transition_slideshow.Slideshow
get_available_slideshows(self)
Return the list of available slideshows.
source code
 
register_slideshow(self, slideshow_class)
Register a slideshow in the list of available slideshows.
source code
 
playlist(self)
Make _playlist a public read-only property.
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  PLAYING = 1
  STOPPED = 0
  __gsignals__ = {'current-picture-changed':(gobject.SIGNAL_RUN_...
  status = property(fget= _get_status)

Inherited from extern.log.log.Loggable: logCategory

Properties

Inherited from object: __class__

Method Details

__init__(self, playground)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
Overrides: object.__init__

set_playlist(self, playlist, picture_index=0)

source code 

Set the list of pictures to display during the slideshow and display one of them immediately, by default the first one.

Parameters:

set_interval(self, interval)

source code 

Set the time during which a picture should be displayed/in focus for the user.

Parameters:
  • interval (float) - time in seconds

start_slideshow(self, index=None)

source code 

Start the currently selected automated slideshow.

Parameters:
  • index (int) - index in the playlist of the picture to start the slideshow with

rotate_current_picture(self, orientation)

source code 

Visually rotate the current picture.

Parameters:

set_slideshow(self, slideshow_class)

source code 

Switch the currently selected slideshow for another one.

Parameters:

register_slideshow(self, slideshow_class)

source code 

Register a slideshow in the list of available slideshows.

Parameters:

playlist(self)

source code 

Make _playlist a public read-only property. This is needed for consistency with other Players APIs (audio/video).

Decorators:
  • @property

Class Variable Details

__gsignals__

Value:
{'current-picture-changed':(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE\
, (gobject.TYPE_PYOBJECT, gobject.TYPE_INT)), 'current-picture-loaded'\
:(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)\
), 'current-picture-rotated':(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NO\
NE, (gobject.TYPE_PYOBJECT,)), 'playlist-size-changed':(gobject.SIGNAL\
_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_INT,)), 'available-slidesh\
ows-changed':(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYP\
E_PYOBJECT,)), 'slideshow-changed':(gobject.SIGNAL_RUN_LAST, gobject.T\
...