Package elisa :: Package plugins :: Package bad :: Package weather :: Module weather_activity :: Class WeatherActivity
[hide private]
[frames] | no frames]

Class WeatherActivity

source code


The weather activity is retrieving the weather informations with metar

Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
 
initialize(self)
Initialize various variables internal to the Component.
source code
elisa.base_components.model.Model
get_model(self)
Return a model filled with the data generated by the activity.
source code
 
retrieve_weather(self)
Fetches the weather information on the Internet thanks to metar and fill in the weather report self._report
source code
 
get_icon_from_weather(self, weather_report)
Returns a string for a icon corresponding to a given weather and time
source code
 
get_weather_data(self)
Show/Hide a WeatherWidget containing an updated weather report
source code

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

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__, __setattr__, __str__

Static Methods [hide private]

Inherited from core.component.Component: __classinit__

Class Variables [hide private]
dict config_doc = {'ICAO': 'Four letters designing your location; a...
documentation for each option of the default configuration.
dict default_config = {'ICAO': 'LEBL'}
used when nothing found in Application's config
  weather_to_pixmap = {'day': {'clear': 'clear', 'cloud': 'cloud...
string name = 'weather_activity'
Component's name

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

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from core.component.Component: config, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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: core.component.Component.initialize
(inherited documentation)

get_model(self)

source code 
Return a model filled with the data generated by the activity.
Returns: elisa.base_components.model.Model
Overrides: base_components.activity.Activity.get_model
(inherited documentation)

get_icon_from_weather(self, weather_report)

source code 

Returns a string for a icon corresponding to a given weather and time

weather_report: report to consider containing weather and time

Class Variable Details [hide private]

config_doc

documentation for each option of the default configuration. Keys should be same as the ones in default_config and values should be strings
Type:
dict
Value:
{'ICAO': 'Four letters designing your location; a complete list can be\
 found at http://en.wikipedia.org/wiki/ICAO_airport_code'}

weather_to_pixmap

Value:
{'day': {'clear': 'clear',
         'cloud': 'cloud',
         'fog': 'fog',
         'rain': 'rain',
         'snow': 'snow',
         'storm': 'storm',
         'sun': 'clear',
         'suncloud': 'clear_cloud',
...