Public Member Functions

Koo::Fields::AbstractFieldDelegate::AbstractFieldDelegate Class Reference

AbstractFieldDelegate is the base class for all delegates used in Koo. More...

List of all members.

Public Member Functions

def __init__
 Creates a new Delegate.
def menuEntries
 Use this function to return the menu entries your delegate wants to show just before the context menu is shown.
def showPopupMenu
 Shows a popup menu with default and widget specific entries.
def setToDefault
 Sets the default value to the field.

Detailed Description

AbstractFieldDelegate is the base class for all delegates used in Koo.

Delegates are used by editable lists but could be used by any Model/View based widget.

Definition at line 36 of file AbstractFieldDelegate.py.


Member Function Documentation

def Koo::Fields::AbstractFieldDelegate::AbstractFieldDelegate::__init__ (   self,
  parent,
  attributes 
)

Creates a new Delegate.

'attributes' is a dictionary with attributes that apply to the field such as 'readonly' or 'required'.

Definition at line 40 of file AbstractFieldDelegate.py.

def Koo::Fields::AbstractFieldDelegate::AbstractFieldDelegate::menuEntries (   self,
  record 
)

Use this function to return the menu entries your delegate wants to show just before the context menu is shown.

Return a list of tuples in the form: [ (_('Menu text'), function/slot to connect the entry, True (for enabled) or False (for disabled) )]

Definition at line 75 of file AbstractFieldDelegate.py.

def Koo::Fields::AbstractFieldDelegate::AbstractFieldDelegate::setToDefault (   self  ) 

Sets the default value to the field.

Note that this requires a call to the server.

Definition at line 108 of file AbstractFieldDelegate.py.

def Koo::Fields::AbstractFieldDelegate::AbstractFieldDelegate::showPopupMenu (   self,
  parent,
  position 
)

Shows a popup menu with default and widget specific entries.

Definition at line 80 of file AbstractFieldDelegate.py.


The documentation for this class was generated from the following file:
Generated by Doxygen