taurus taurus

Previous topic

TaurusDbTableWidget

Next topic

TaurusPropTable

This Page

TaurusGrid

Inheritance diagram of TaurusGrid

class TaurusGrid(parent=None, designMode=False)

Bases: PyQt4.QtGui.QFrame, taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget

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:<pre> /usr/bin/python taurusgrid.py “model=lt.*/VC.*/.*/((C*)|(P*)|(I*))” cols=IP,CCG,PNV rows=LT01,LT02 </pre> @author originally developed by gcuni, extended by srubio and sblanch @todo Future releases should allow a list of filters as argument @todo names/widgets should be accessible as a caselessdict dictionary (e.g. for adding custom context menus) @todo refactoring to have methods that add/remove new widgets one by one, not only the whole dictionary @todo _TAGS property should allow to change row/columns meaning and also add new Custom tags based on regexp

attach()

Attaches the widget to the model

build_table(values)

This is a builder. For all the elements in widgets matrix, just set the corresponding cells of the QTableWidget.

build_widgets(values, show_labels=False, width=240, height=20, value_width=120)
columnlabels
create_frame_with_gridlayout()

Just a ‘macro’ to create the layouts that seem to fit better.

create_widgets_dict(models)
create_widgets_table(models)
defineStyle()

Defines the initial style for the widget

detach()

Detaches the widget from the model

getColumnLabels()
getItemByModel(model, index=0)
getModel()
getModelClass()
classmethod getQtDesignerPluginInfo()
getRowLabels()
load(filename)
minimumSizeHint()
model
parse_labels(text)
resetColumnLabels()
resetModel()
resetRowLabels()
rowlabels
save(filename)
setColumnLabels(columns)

The model can be initialized as a list of devices or hosts or ...

setModel(model, devsInRows=False)

The model can be initialized as a list of devices or hosts or ...

setRowLabels(rows)

The model can be initialized as a list of devices or hosts or ...

setTitle(title)
showColumnFrame(boolean)
showOthers(boolean)
showRowFrame(boolean)
show_hide_columns()

This needs refactoring to be together with the show_hide_rows method

show_hide_rows()

This needs refactoring to be together with the show_hide_columns method

sizeHint()
updateStyle()
useParentModel

Returns whether this component is using the parent model

Return type::class:~`bool`
Returns:True if using parent model or False otherwise