TaurusGrid
- class TaurusGrid(parent=None, designMode=False)[source]
TaurusGrid is a Taurus widget designed to represent a set of attributes distributed in columns and rows. The Model will be a list with attributes or device names (for devices the State attribute will be shown). Each setModel(*) execution will be able to modify the attribute list.
An example of execution:
python taurusgrid.py "model=lt.*/VC.*/.*/((C*)|(P*)|(I*))" cols=IP,CCG,PNV rows=LT01,LT02
Import from
taurus.qt.qtgui.table
as:from taurus.qt.qtgui.table import TaurusGrid
- build_table(values)[source]
This is a builder. For all the elements in widgets matrix, just set the corresponding cells of the QTableWidget.
- columnlabels
- create_frame_with_gridlayout()[source]
Just a ‘macro’ to create the layouts that seem to fit better.
- getModelClass(**kwargs)[source]
Return the class object for the widget. Default behavior is to do a ‘best effort’ to determine which model type corresponds to the current model name. Overwrite as necessary.
- Parameters:
key (object) – the model key. Defaults to first element of .modelKeys
- Returns:
The class object corresponding to the type of Taurus model this widget handles or None if no valid class is found.
- Return type:
class TaurusModel or None
- classmethod getQtDesignerPluginInfo()[source]
Returns pertinent information in order to be able to build a valid QtDesigner widget plugin.
The dictionary returned by this method should contain at least the following keys and values:
‘module’ : a string representing the full python module name (ex.: ‘taurus.qt.qtgui.base’)
‘icon’ : a string representing valid resource icon (ex.: ‘designer:combobox.png’)
- ‘container’a bool telling if this widget is a container widget or
not.
This default implementation returns the following dictionary:
{ 'group' : 'Taurus [Unclassified]', 'icon' : 'logos:taurus.png', 'container' : False }
- Returns:
a map with pertinent designer information
- Return type:
- itemClicked
- itemSelected
- model
- property modelsThread
- resetModel(**kwargs)[source]
Sets the model name to the empty string
- Parameters:
key (object) – the model key. Defaults to first element of .modelKeys
- rowlabels
- setModel(model, devsInRows=False, delayed=False, append=False, load=True, **kwargs)[source]
The model can be initialized as a list of devices or hosts or dictionary or …
- updateStyle()[source]
Updates the widget style. Default implementation just calls QWidget.update()
Override when necessary.
- useParentModel
(deprecated))