Package camelot :: Package camelot :: Package view :: Package proxy :: Module queryproxy :: Class QueryTableProxy
[hide private]
[frames] | no frames]

Class QueryTableProxy

source code


The QueryTableProxy contains a limited copy of the data in the Elixir model, which is fetched from the database to be used as the model for a QTableView

Instance Methods [hide private]
 
__init__(self, admin, query_getter, columns_getter, max_number_of_rows=10, edits=None) source code
 
_clean_appended_rows(self)
Remove those rows from appended rows that have been flushed
source code
 
getRowCount(self) source code
 
setQuery(self, query_getter)
Set the query and refresh the view
source code
 
append(self, o)
Add an object to this collection, used when inserting a new row, overwrite this method for specific behaviour in subclasses
source code
 
remove(self, o) source code
 
getData(self)
Generator for all the data queried by this proxy
source code
 
_extend_cache(self, offset, limit)
Extend the cache around row
source code
 
_get_object(self, row)
Get the object corresponding to row
source code

Inherited from collection_proxy.CollectionProxy: __del__, columnCount, data, flags, getColumns, getItemDelegate, handleEntityCreate, handleEntityDelete, handleEntityUpdate, handleRowUpdate, hasUnflushedRows, headerData, insertEntityInstance, insertRow, refresh, removeEntityInstance, removeRow, revertRow, rowCount, setCollectionGetter, setColumns, setData, setRowCount

Method Details [hide private]

__init__(self, admin, query_getter, columns_getter, max_number_of_rows=10, edits=None)
(Constructor)

source code 
Parameters:
  • query_getter - a model_thread function that returns a query
Overrides: collection_proxy.CollectionProxy.__init__

_clean_appended_rows(self)

source code 

Remove those rows from appended rows that have been flushed

Decorators:
  • @model_function

getRowCount(self)

source code 
Decorators:
  • @model_function
Overrides: collection_proxy.CollectionProxy.getRowCount

append(self, o)

source code 

Add an object to this collection, used when inserting a new row, overwrite this method for specific behaviour in subclasses

Overrides: collection_proxy.CollectionProxy.append

remove(self, o)

source code 
Overrides: collection_proxy.CollectionProxy.remove

getData(self)

source code 

Generator for all the data queried by this proxy

Decorators:
  • @model_function

_extend_cache(self, offset, limit)

source code 

Extend the cache around row

Decorators:
  • @model_function
Overrides: collection_proxy.CollectionProxy._extend_cache

_get_object(self, row)

source code 

Get the object corresponding to row

Decorators:
  • @model_function
Overrides: collection_proxy.CollectionProxy._get_object