Package mcbase :: Package widgets :: Module mctableview :: Class MCTableView
[hide private]
[frames] | no frames]

Class MCTableView

source code


Customized QTableView derived class. Used for implementing MOCOP custom features.

Instance Methods [hide private]
 
__init__(self, *prm) source code
 
modelRowCountChanged(self, newRowCount)
Called when the model row count is changed.
source code
 
setModel(self, model, fetchContents=True)
Sets the model for this table view.
source code
 
setColumnWidth(self, col, width)
Overriden method to resize a column width
source code
 
hideColumn(self, col)
Overriden method to hide a column
source code
 
setColumnWidths(self)
Adjusts the columnt widths according to the model properties.
source code
 
resetTable(self)
Completely clears and resets the table.
source code
 
refreshTable(self)
Returns: A deferred that will fire when the table is refreshed
source code
 
selectedObject(self)
Returns the currently selected object from the list.
source code
 
selectedIndex(self)
Returns the currently selected index from the list.
source code
 
cellDoubleClicked(self, index)
When a cell on table is double clicked, emits a custom signal with the object of corresponding row.
source code
Method Details [hide private]

modelRowCountChanged(self, newRowCount)

source code 

Called when the model row count is changed.

Parameters:
  • newRowCount (int) - New number of rows, unused.

setModel(self, model, fetchContents=True)

source code 

Sets the model for this table view.

Parameters:
  • model - Model object, no reference is hold to this object from this view.
  • fetchContents - If True, the default, view contents are initiated to be fetched from the server.

setColumnWidth(self, col, width)

source code 

Overriden method to resize a column width

Parameters:
  • col - Column index (logical)
  • width - New column size

hideColumn(self, col)

source code 

Overriden method to hide a column

Parameters:
  • col - Column index (logical)

resetTable(self)

source code 

Completely clears and resets the table. Returns a deferred that will fire when data is received from server.

Returns:
A deferred that will fire when data is received from server.
Decorators:
  • @defer.inlineCallbacks

refreshTable(self)

source code 
Returns:
A deferred that will fire when the table is refreshed
Decorators:
  • @defer.inlineCallbacks