TaurusGrid

digraph inheritancedc1bed1139 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "BaseConfigurableClass" [URL="taurus.qt.qtcore.configuration-BaseConfigurableClass.html#taurus.qt.qtcore.configuration.BaseConfigurableClass",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A base class defining the API for configurable objects."]; "Logger" [URL="taurus-Logger.html#taurus.Logger",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="The taurus logger class. All taurus pertinent classes should inherit"]; "QFrame" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QFrame(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())"]; "QWidget" -> "QFrame" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QObject" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QObject(parent: QObject = None)"]; "wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QPaintDevice()"]; "simplewrapper" -> "QPaintDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QWidget" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QWidget(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())"]; "QObject" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusBaseComponent" [URL="taurus.qt.qtgui.base-TaurusBaseComponent.html#taurus.qt.qtgui.base.TaurusBaseComponent",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A generic Taurus component."]; "TaurusListener" -> "TaurusBaseComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseConfigurableClass" -> "TaurusBaseComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusBaseWidget" [URL="taurus.qt.qtgui.base-TaurusBaseWidget.html#taurus.qt.qtgui.base.TaurusBaseWidget",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="The base class for all Qt Taurus widgets."]; "TaurusBaseComponent" -> "TaurusBaseWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusGrid" [URL="#taurus.qt.qtgui.table.TaurusGrid",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="TaurusGrid is a Taurus widget designed to represent a set of attributes"]; "QFrame" -> "TaurusGrid" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusBaseWidget" -> "TaurusGrid" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusListener" [URL="taurus.core.tauruslistener-TaurusListener.html#taurus.core.tauruslistener.TaurusListener",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="TaurusListener Interface"]; "Logger" -> "TaurusListener" [arrowsize=0.5,style="setlinewidth(0.5)"]; "simplewrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "wrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
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
attach()[source]

Attaches the widget to the model

build_table(values)[source]

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)[source]
columnlabels
create_frame_with_gridlayout()[source]

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

create_widgets_dict(models)[source]
create_widgets_table(models)[source]
defineStyle()[source]

Defines the initial style for the widget

detach()[source]

Detaches the widget from the model

getColumnLabels()[source]
getItemByModel(model, index=0)[source]
getModel()[source]

Returns the model name for this component.

Returns

the model name.

Return type

str

getModelClass()[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.

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]
getRowLabels()[source]
itemClicked
itemSelected
load(filename, delayed=False)[source]
minimumSizeHint(self) QSize[source]
model
property modelsThread
onItemClicked(item_name)[source]
parse_labels(text)[source]
resetColumnLabels()[source]
resetModel()[source]

Sets the model name to the empty string

resetRowLabels()[source]
rowlabels
save(filename)[source]
setColumnLabels(columns)[source]

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

setItemSelected(item_name='', selected=True)[source]

it adds a blue frame around a clicked item.

setModel(model, devsInRows=False, delayed=False, append=False, load=True)[source]

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

setRowLabels(rows)[source]

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

setTitle(title)[source]
showAttributeLabels(boolean)[source]
showAttributeUnits(boolean)[source]
showColumnFrame(boolean)[source]
showOthers(boolean)[source]
showRowFrame(boolean)[source]
show_hide_columns()[source]

This needs refactoring to be together with the show_hide_rows method

show_hide_rows()[source]

This needs refactoring to be together with the show_hide_columns method

sizeHint(self) QSize[source]
updateStyle()[source]

Updates the widget style. Default implementation just calls QWidget.update()

Override when necessary.

useParentModel

Returns whether this component is using the parent model

Returns

True if using parent model or False otherwise

Return type

bool