Package elisa :: Package plugins :: Package database :: Module photo_controller :: Class PhotoViewMode

Class PhotoViewMode

source code


Instance Methods
elisa.core.utils.cancellable_defer.CancellableDeferred
get_label(self, item)
Return a text to display in a label to represent an item.
source code
str
get_default_image(self, item)
Return the path of a theme resource to display as a default image for an item.
source code
elisa.core.utils.cancellable_defer.CancellableDeferred
get_image(self, item, theme)
Return the path to an image file to display as an image for an item.
source code
str or None
get_preview_image(self, item, theme)
Return the path to an image file to display as a preview image for an item.
source code
elisa.core.utils.cancellable_defer.CancellableDeferred
get_contextual_background(self, item)
Return the path to an image file to display as a contextual background for an item.
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__

    Inherited from poblesec.base.list.GenericListViewMode
elisa.core.utils.cancellable_defer.CancellableDeferred
get_sublabel(self, item)
Return a text to display in a sublabel to represent an item.
source code
    Inherited from core.component.Component
twisted.internet.defer.Deferred
clean(self)
Clean the component.
source code
twisted.internet.defer.Deferred
initialize(self, **kwargs)
Initialize the component.
source code
 
name__get(self) source code
 
name__set(self, value) source code
    Inherited from core.log.Loggable
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
Class Methods
    Inherited from core.component.Component
elisa.core.component.Component or a subclass
create(cls, config_section=None, **kwargs)
Create and initialize the component.
source code
Class Variables

Inherited from extern.log.log.Loggable: logCategory

    Inherited from core.component.Component
  config_doc = {}
  default_config = {}
  name = property(fget= name__get, fset= name__set)
  path = PathDescriptor()
Properties

Inherited from object: __class__

Method Details

get_label(self, item)

source code 

Return a text to display in a label to represent an item.

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
Returns: elisa.core.utils.cancellable_defer.CancellableDeferred
a cancellable deferred
Overrides: poblesec.base.list.GenericListViewMode.get_label
(inherited documentation)

get_default_image(self, item)

source code 

Return the path of a theme resource to display as a default image for an item.

Parameters:
  • item - a list item
Returns: str
the path of a theme resource to display as a default image for the item
Overrides: poblesec.base.list.GenericListViewMode.get_default_image
(inherited documentation)

get_image(self, item, theme)

source code 

Return the path to an image file to display as an image for an item.

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
  • theme - the frontend's current theme
Returns: elisa.core.utils.cancellable_defer.CancellableDeferred
a cancellable deferred or None
Overrides: poblesec.base.list.GenericListViewMode.get_image
(inherited documentation)

get_preview_image(self, item, theme)

source code 

Return the path to an image file to display as a preview image for an item.

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
  • theme - the frontend's current theme
Returns: str or None
the path to an image file on disk or None
Overrides: poblesec.base.list.GenericListViewMode.get_preview_image
(inherited documentation)

get_contextual_background(self, item)

source code 

Return the path to an image file to display as a contextual background for an item.

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) or None if not availadble.

Parameters:
  • item - a list item
Returns: elisa.core.utils.cancellable_defer.CancellableDeferred
a cancellable deferred
Overrides: poblesec.base.list.GenericListViewMode.get_contextual_background
(inherited documentation)