screenlets.options.base.Option

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

# Class Option

source code

    object --+
             |
    ??.GObject --+
                 |
                Option

Known Subclasses:
  - account_option.AccountOption
  - , boolean_option.BoolOption
  - , file_option.FileOption
  - , font_option.FontOption
  - , string_option.StringOption
  - , number_option.IntOption
  - , colour_option.ColorOption
  - , list_option.ListOption

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, *attr, **args) 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
generate_widget(self) This should generate all the required widgets for display. | source code
set_value(self, value) Set the true/false value to the checkbox widget | source code
has_changed(self) Executed when the widget event kicks off. | source code
Inherited from `unreachable.GObject`: `__copy__`, `__deepcopy__`, `__delattr__`, `__eq__`, `__gdoc__`, `__ge__`, `__gobject_init__`, `__gt__`, `__hash__`, `__le__`, `__lt__`, `__ne__`, `__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`: `__format__`, `__getattribute__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| __gsignals__ = `dict(option_changed= (gobject.SIGNAL_RUN_FIRST,`...``
| default = `None` hash(x)
| label = `None` hash(x)
| desc = `None` hash(x)
| hidden = `False`
| disabled = `False`
| realtime = `True`
| protected = `False`
| widget = `None` hash(x)
| __gtype__ = `<GType screenlets+options+base+Option (167567080)>`

Properties | [hide private]
Inherited from `unreachable.GObject`: `__grefcount__` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, group, name, *attr, **args) (Constructor) | source code
Creates a new Option with the given information. Overrides: object.__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,)))