Package Camelot :: Package camelot :: Package view :: Package proxy :: Module collection_proxy
[frames] | no frames]

Module collection_proxy

source code

Proxy representing a collection of entities that live in the model thread.

The proxy represents them in the gui thread and provides access to the data with zero delay. If the data is not yet present in the proxy, dummy data is returned and an update signal is emitted when the correct data is available.

Classes
  DelayedProxy
A proxy object needs to be constructed within the GUI thread. Construct a delayed proxy when the construction of a proxy is needed within the Model thread. On first occasion the delayed proxy will be converted to a real proxy within the GUI thread
  EmptyRowData
  SortingRowMapper
Class mapping rows of a collection 1:1 without sorting and filtering, unless a mapping has been defined explicitly
  CollectionProxy
The CollectionProxy contains a limited copy of the data in the actual collection, usable for fast visualisation in a QTableView
Functions
 
tool_tips_from_object(*args, **kwargs) source code
 
background_colors_from_object(*args, **kwargs) source code
 
strip_data_from_object(*args, **kwargs)
For every column in columns, get the corresponding value from the object. Getting a value from an object is time consuming, so using this function should be minimized. :param obj: the object of which to get data :param columns: a list of columns for which to get data
source code
 
stripped_data_to_unicode(*args, **kwargs)
Extract for each field in the row data a 'visible' form of data
source code
Variables
  logger = logging.getLogger('camelot.view.proxy.collection_proxy')
  empty_row_data = EmptyRowData()
  __package__ = 'Camelot.camelot.view.proxy'
Function Details

tool_tips_from_object(*args, **kwargs)

source code 
Decorators:
  • @model_function

background_colors_from_object(*args, **kwargs)

source code 
Decorators:
  • @model_function

strip_data_from_object(*args, **kwargs)

source code 
For every column in columns, get the corresponding value from the object. Getting a value from an object is time consuming, so using this function should be minimized. :param obj: the object of which to get data :param columns: a list of columns for which to get data
Decorators:
  • @model_function

stripped_data_to_unicode(*args, **kwargs)

source code 
Extract for each field in the row data a 'visible' form of data
Decorators:
  • @model_function