Package screenlets :: Module options :: Class Option
[hide private]
[frames] | no frames]

Class Option

source code

     object --+    
              |    
gobject.GObject --+
                  |
                 Option
Known Subclasses:
AccountOption, BoolOption, ColorOption, DirectoryOption, FileOption, IntOption, FontOption, ImageOption, ListOption, StringOption

An Option stores information about a certain object-attribute. It doesn't carry information about the value or the object it belongs to - it is only a one-way data-storage for describing how to handle attributes.

Instance Methods [hide private]
 
__init__(self, group, name, default, label, desc, disabled=False, hidden=False, callback=None, protected=False)
Creates a new Option with the given information.
source code
 
on_import(self, strvalue)
Callback - called when an option gets imported from a string.
source code
 
on_export(self, value)
Callback - called when an option gets exported to a string.
source code

Inherited from gobject.GObject: __cmp__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Class Variables [hide private]
  __gsignals__ = dict(option_changed= (gobject.SIGNAL_RUN_FIRST,...
  __gtype__ = <GType screenlets+options+Option (140843832)>
Properties [hide private]

Inherited from gobject.GObject: __grefcount__

Inherited from object: __class__

Method Details [hide private]

__init__(self, group, name, default, label, desc, disabled=False, hidden=False, callback=None, protected=False)
(Constructor)

source code 
Creates a new Option with the given information.
Overrides: gobject.GObject.__init__

on_import(self, strvalue)

source code 
Callback - called when an option gets imported from a string. This function MUST return the string-value converted to the required type!

on_export(self, value)

source code 
Callback - called when an option gets exported to a string. The value-argument needs to be converted to a string that can be imported by the on_import-handler. This handler MUST return the value converted to a string!

Class Variable Details [hide private]

__gsignals__

Value:
dict(option_changed= (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (go\
bject.TYPE_OBJECT,)))