Package kiwi :: Package ui :: Module proxywidget :: Class ValidatableProxyWidgetMixin
[frames | no frames]

Type ValidatableProxyWidgetMixin

      object --+    
               |    
ProxyWidgetMixin --+
                   |
                  ValidatableProxyWidgetMixin

Known Subclasses:
ProxyComboBoxEntry, ProxyComboEntry, ProxyDateEntry, ProxyEntry, ProxySpinButton, ProxyTextView

Class used by some Kiwi Widgets that need to support mandatory input and validation features such as custom validation and data-type validation.

Mandatory support provides a way to warn the user when input is necessary. The validatation feature provides a way to check the data entered and to display information about what is wrong.
Method Summary
  get_background(self)
Implement in subclass
  get_icon_window(self)
Implement in subclass
  is_valid(self)
Return true if the widget is in validated state
  set_blank(self)
Changes the validation state to blank state, this only applies for mandatory widgets, draw an icon and set a tooltip
  set_invalid(self, text, fade)
Changes the validation state to invalid.
  set_pixbuf(self, pixbuf)
Implement in subclass
  set_tooltip(self, text)
Implement in subclass
  set_valid(self)
Changes the validation state to valid, which will remove icons and reset the background color
  update_background(self, color)
Implement in subclass
  validate(self, force)
Checks if the data is valid.
    Inherited from ProxyWidgetMixin
  prop_set_data_type(self, data_type)
Set the data type for the widget
Must matche the data-type property. read(self)
Get the content of the widget.
  set_data_format(self, format)
  update(self, value)

Class Variable Summary
    Inherited from ProxyWidgetMixin
tuple allowed_data_types: A list of types which we are allowed to use in this class.

Method Details

get_background(self)

Implement in subclass

get_icon_window(self)

Implement in subclass

is_valid(self)

Returns:
True if the widget is in validated state

set_blank(self)

Changes the validation state to blank state, this only applies for mandatory widgets, draw an icon and set a tooltip

set_invalid(self, text=None, fade=True)

Changes the validation state to invalid.
Parameters:
text - text of tooltip of None
fade - if we should fade the background

set_pixbuf(self, pixbuf)

Implement in subclass

set_tooltip(self, text)

Implement in subclass

set_valid(self)

Changes the validation state to valid, which will remove icons and reset the background color

update_background(self, color)

Implement in subclass

validate(self, force=False)

Checks if the data is valid. Validates data-type and custom validation.
Parameters:
force - if True, force validation
Returns:
validated data or ValueUnset if it failed

Generated by Epydoc 2.1 on Tue Feb 6 10:53:32 2007 http://epydoc.sf.net