Package elisa :: Package plugins :: Package base :: Package controllers :: Module player_controller :: Class PlayerController
[hide private]
[frames] | no frames]

Class PlayerController

source code


Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
 
__init__(self)
Lazily set name from class name styled with underscores (class ComponentBar -> name component_bar.
source code
 
initialize(self)
Initialize various variables internal to the Component.
source code
 
model_changed(self, old_model, new_model)
Called when model is set to a new value.
source code
 
uri__set(self, new_uri) source code
 
uri__get(self) source code
bool
handle_input(self, input_event)
Process an input event.
source code
 
attribute_set(self, origin, key, old_value, new_value)
Called when an attribute of the model to which it is connected changes.
source code
 
_next_track(self) source code
 
_play_indexed_track(self) source code
 
_previous_track(self) source code
 
state_changed(self, state) source code

Inherited from base_components.controller.Controller: backend__get, backend__set, backend_changed, focus, focused__get, focused__set, focused_changed, model__get, model__set, parent__get, parent__set

Inherited from core.component.Component: clean, load_config, save_config

Inherited from core.observers.observable.Observable: __setattr__, add_observer, remove_observer

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

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __str__

Static Methods [hide private]

Inherited from core.component.Component: __classinit__

Class Variables [hide private]
tuple of strings supported_models = 'base:player_model',
list of models that are compatible with the controller identified by their path: 'plugin:model'
dictionary: keys: strings; values: list of strings or strings bindings = {'playlist': 'playlist', 'seek_to': 'seek_to', 'vol...
associations between model's attribute and Controller's attributes; if an attribute contained in bindings' keys is changed or created in model, it is replicated in all the corresponding attributes of the controller defined in bindings values
  state = 'frontend'
  stopped = True
dict default_config = {'volume_increment_step': '0.02', 'volume_dec...
used when nothing found in Application's config

Inherited from base_components.controller.Controller: name

Inherited from core.component.Component: checked, config_doc, id, plugin

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from base_components.controller.Controller: backend, focused, model, parent

Inherited from core.component.Component: config, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Lazily set name from class name styled with underscores (class ComponentBar -> name component_bar. Also set log category based on component name, with a 'comp_' prefix.
Overrides: base_components.controller.Controller.__init__

initialize(self)

source code 

Initialize various variables internal to the Component.

This method is called by the plugin_registry after the component's config has been loaded.

Override this method if you need to perform some initializations that would normally go in Component's constructor but can't be done there because they require access to the component's config.
Overrides: base_components.controller.Controller.initialize

model_changed(self, old_model, new_model)

source code 

Called when model is set to a new value.

Override if you wish to react to that change. Do not forget to call the parent class method.
Overrides: base_components.controller.Controller.model_changed
(inherited documentation)

handle_input(self, input_event)

source code 
Process an input event. It can decide that no further processing should be done by returning True or let its parent controller process it by returning False.
Returns: bool
Overrides: base_components.controller.Controller.handle_input
(inherited documentation)

attribute_set(self, origin, key, old_value, new_value)

source code 
Called when an attribute of the model to which it is connected changes.
Overrides: base_components.controller.Controller.attribute_set
(inherited documentation)

Class Variable Details [hide private]

bindings

associations between model's attribute and Controller's attributes; if an attribute contained in bindings' keys is changed or created in model, it is replicated in all the corresponding attributes of the controller defined in bindings values
Type:
dictionary: keys: strings; values: list of strings or strings
Value:
{'playlist': 'playlist', 'seek_to': 'seek_to', 'volume': 'volume', 'mu\
ted': 'muted', 'pause_requested': 'pause_requested', 'uri': 'uri', 'me\
dia_type': 'media_type',}

default_config

used when nothing found in Application's config
Type:
dict
Value:
{'volume_increment_step': '0.02', 'volume_decrement_step': '0.02', 'se\
ek_forward_step': '30', 'seek_backward_step': '15', 'show_status_on_ok\
': '0'}