Package mcbase :: Package widgets :: Module mctablemodelro :: Class MCTableModelRO
[hide private]
[frames] | no frames]

Class MCTableModelRO

source code


Model for read only tables.

Instance Methods [hide private]
 
__init__(self, parentObject, modelObject, taskPath, *args, **kw)
Initializes the model
source code
 
getColumnLabels(self)
Returns column labels according to current model object set to this view model.
source code
 
getColumnSizes(self)
Returns column sizes according to current model object set to this view model.
source code
 
setModelObjectProperties(self, modelObject) source code
 
parent(self)
Original QAbstractTableModel parent() method does something different than QWidget.parent() method.
source code
 
getData(self, start, end)
Gets data from the server.
source code
 
initCache(self)
Initializes the structures related with cache structure.
source code
 
cacheMiss(self, row)
Called when a given row is not present in the cache.
source code
 
receivedData(self, rows)
This method is called upon receiving data from server.
source code
 
headerData(self, section, orientation, role=Qt.DisplayRole)
Overriden headerData method that feeds the view with vertical and horizontal header information.
source code
 
data(self, index, role=Qt.DisplayRole)
Overriden data method, called by QTableView to obtain data for the passed index.
source code
 
isBusy(self)
Returns True if model is busy, False otherwise.
source code
 
hideKeyColumns(self)
Hides key columns.
source code
 
rowCount(self, parentModel=None)
Overriden rowCount method, returns the number of rows present in the model
source code
 
columnCount(self, parentModel=None)
Returns the number of columns displayed in table, overriden Qt model method.
source code
 
selectedObject(self, row) source code
Method Details [hide private]

parent(self)

source code 

Original QAbstractTableModel parent() method does something different than QWidget.parent() method. We override it here in order to make it work like the rest.

getData(self, start, end)

source code 

Gets data from the server. Data indexes are defined by start and end parameters.

Parameters:
  • start (int) - Start index of the data to be fetched
  • end (int) - End index of the data to be fetched
Decorators:
  • @defer.inlineCallbacks

cacheMiss(self, row)

source code 

Called when a given row is not present in the cache.

Parameters:
  • row - The index of data that was not found in the cache.
Decorators:
  • @defer.inlineCallbacks

receivedData(self, rows)

source code 

This method is called upon receiving data from server.

Parameters:
  • rows (list) - List containing objects.

headerData(self, section, orientation, role=Qt.DisplayRole)

source code 

Overriden headerData method that feeds the view with vertical and horizontal header information.

Decorators:
  • @MC.returnQVariant

data(self, index, role=Qt.DisplayRole)

source code 

Overriden data method, called by QTableView to obtain data for the passed index.

Parameters:
  • index (QModelIndex) - Index of the data desired