Public Member Functions

Koo::View::AbstractView::AbstractView Class Reference

The AbstractView class describes the interface Views must implement. More...

List of all members.

Public Member Functions

def viewType
 This function should return the type of view the class handles.
def store
 This function should store the information in the model The model used should be the one given by display() which will always have been called before store().
def display
 This function should display the information of the model or models currentRecord points to the record (object Record) that is currently selected models points to the model list (object RecordGroup) Example: forms only use the currentModel, while tree & charts use models.
def reset
 Not used in the TreeView, used in the FormView to set all widgets to the state of 'valid'.
def selectedRecords
 Should return a list with the currently selected records in the view.
def setSelected
 Selects the current record.
def isReadOnly
 This function should return False if the view modifies data or True if it doesn't.
def setReadOnly
 This function should be implemented if the view can be configured to be read-only or read-write.
def viewSettings
 Override this function in your view if you wish to store some settings per user and view.
def setViewSettings
 Override this function in your view if you wish to restore a previous configuration.
def showsMultipleRecords
 Should return True if the view is capable of showing multiple records or False if it can only show one.
def startEditing
 Start editing current record.
def addOnTop
 Returns True if new records should be added at the top of the list or False if they should be added at the bottom (the default).
def onWriteFunction
 Returns the on_write function.
def setOnWriteFunction
 Establishes the name of the on_write function.

Detailed Description

The AbstractView class describes the interface Views must implement.

Definition at line 30 of file AbstractView.py.


Member Function Documentation

def Koo::View::AbstractView::AbstractView::addOnTop (   self  ) 

Returns True if new records should be added at the top of the list or False if they should be added at the bottom (the default).

Definition at line 117 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::onWriteFunction (   self  ) 

Returns the on_write function.

This server side function can be configured in the view so it's called each time a record is created or written.

Definition at line 124 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::selectedRecords (   self  ) 

Should return a list with the currently selected records in the view.

If the view is a form, for example, the current id is returned. If it's a tree with several items selected, returns all of them.

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 67 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::setOnWriteFunction (   self,
  value 
)

Establishes the name of the on_write function.

By default it's the empty string, so no function will be called on the server.

Definition at line 130 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::setReadOnly (   self,
  value 
)

This function should be implemented if the view can be configured to be read-only or read-write.

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 81 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::setViewSettings (   self,
  settings 
)

Override this function in your view if you wish to restore a previous configuration.

The function will be called when necessary. The string given in 'settings' will be one previously returned by viewSettings().

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 95 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::showsMultipleRecords (   self  ) 

Should return True if the view is capable of showing multiple records or False if it can only show one.

For example, tree will return True whereas 'form' will return False. The default implementation returns True.

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 103 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::startEditing (   self  ) 

Start editing current record.

Some views (such as TreeView) need a way of being told to start edit mode. Such is the case when a new record is created as we want TreeView to start editing the newly created record. Other views such as form can simply ignore this call.

Definition at line 112 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::store (   self  ) 

This function should store the information in the model The model used should be the one given by display() which will always have been called before store().

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 48 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::viewSettings (   self  ) 

Override this function in your view if you wish to store some settings per user and view.

The function should return a python string with all the information which should be parseable afterwords by setViewSettings().

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 88 of file AbstractView.py.

def Koo::View::AbstractView::AbstractView::viewType (   self  ) 

This function should return the type of view the class handles.

Such as 'tree' or 'from'.

Reimplemented in Koo::View::Form::FormView::FormView.

Definition at line 42 of file AbstractView.py.


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