taurus taurus

Previous topic

TaurusPlotButton

Next topic

TaurusValuesFrame

This Page

TaurusValue

Inheritance diagram of TaurusValue

class TaurusValue(parent=None, designMode=False, customWidgetMap=None)

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

Internal TaurusValue class

Warning

TaurusValue (and any derived class from it) should never be instantiated directly. It is designed to be instantiated by a TaurusForm class, since it breaks some conventions on the way it manages layouts of its parent model.

addCustomWidgetToLayout()
addExtraWidgetToLayout()
addLabelWidgetToLayout()
addReadWidgetToLayout()
addUnitsWidgetToLayout()
addWriteWidgetToLayout()
allowWrite
applyConfig(configdict, **kwargs)

extending TaurusBaseWidget.applyConfig() to restore the subwidget’s classes

Parameters:configdict (:class:~`dict`) –

See also

TaurusBaseWidget.applyConfig(), createConfig()

createConfig(allowUnpickable=False)

extending TaurusBaseWidget.createConfig() to store also the class names for subwidgets

Parameters:alllowUnpickable (:class:~`bool`) –
Return type::class:~`dict` <:class:~`str`, :class:~`object`>
Returns:configurations (which can be loaded with applyConfig()).
customWidget()
customWidgetClassFactory(classID)
extraWidget()
extraWidgetClass
extraWidgetClassFactory(classID)
getAllowWrite()
getCustomWidgetClass()
getCustomWidgetMap()

Returns the map used to create custom widgets.

Return type::class:~`dict` <:class:~`str`, :class:~`Qt.QWidget`>
Returns:a dictionary whose keys are device type strings (i.e. see PyTango.DeviceInfo) and whose values are widgets to be used
getDefaultCustomWidgetClass()
getDefaultExtraWidgetClass()
getDefaultLabelWidgetClass()
getDefaultReadWidgetClass(returnAll=False)

Returns the default class (or classes) to use as read widget for the current model.

Parameters:returnAll (:class:~`bool`) – if True, the return value is a list of valid classes instead of just one class
Return type::class:~`class` or :class:~`list` <:class:~`class`>
Returns:the default class to use for the read widget (or, if returnAll==True, a list of classes that can show the attribute ). If a list is returned, it will be loosely ordered by preference, being the first element always the default one.
getDefaultUnitsWidgetClass()
getDefaultWriteWidgetClass(returnAll=False)

Returns the default class (or classes) to use as write widget for the current model.

Parameters:returnAll (:class:~`bool`) – if True, the return value is a list of valid classes instead of just one class
Return type::class:~`class` or :class:~`list` <:class:~`class`>
Returns:the default class to use for the write widget (or, if returnAll==True, a list of classes that can show the attribute ). If a list is returned, it will be loosely ordered by preference, being the first element always the default one.
getExtraWidgetClass()
getLabelConfig()
getLabelWidgetClass()
getModelClass()
getPreferredRow()
classmethod getQtDesignerPluginInfo()
getReadWidgetClass()
getRow()
getUnitsWidgetClass()
getWriteWidgetClass()
handleEvent(evt_src, evt_type, evt_value)

Reimplemented from TaurusBaseWidget.handleEvent() to update subwidgets on config events

hasPendingOperations()

self.getPendingOperations will always return an empty list, but still self.hasPendingOperations will look at the writeWidget’s operations. If you want to ask the TaurusValue for its pending operations, call self.writeWidget().getPendingOperations()

isCompact()
isReadOnly()
isValueChangedByUser()
labelConfig
labelWidget()
labelWidgetClass
labelWidgetClassFactory(classID)
minimumHeight()
model

Returns the model name for this component.

Return type::class:~`str`
Returns:the model name.
modifiableByUser

whether the user can change the contents of the widget

Return type::class:~`bool`
Returns:True if the user is allowed to modify the look&feel
onChangeLabelConfig()
onChangeReadWidget()
onChangeWriteWidget()
parentModelChanged(parentmodel_name)

Invoked when the parent model changes

Parameters:parentmodel_name (:class:~`str`) – the new name of the parent model
preferredRow
readWidget()
readWidgetClass
readWidgetClassFactory(classID)
resetAllowWrite()
resetCustomWidgetClass()
resetExtraWidgetClass()
resetLabelConfig()
resetLabelWidgetClass()
resetPreferredRow()
resetReadWidgetClass()
resetUnitsWidgetClass()
resetWriteWidgetClass()
setAllowWrite(mode)
setCompact(compact)
setCustomWidgetClass(classID)

substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

setCustomWidgetMap(cwmap)

Sets a map map for custom widgets.

Parameters:cwmap (:class:~`dict` <:class:~`str`, :class:~`Qt.QWidget`>) – a dictionary whose keys are device class strings (see PyTango.DeviceInfo) and whose values are widget classes to be used
setDangerMessage(dangerMessage=None)
setExtraWidgetClass(classID)

substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

setForceDangerousOperations(yesno)
setLabelConfig(config)
setLabelWidgetClass(classID)

substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

setMinimumHeight(minimumHeight)
setModel(model)

extending TaurusBaseWidget.setModel() to change the modelclass dynamically and to update the subwidgets

setParent(parent)
setPreferredRow(row)
setReadWidgetClass(classID)

substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

setUnitsWidgetClass(classID)

substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

setVisible(visible)
setWriteWidgetClass(classID)

substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

unitsWidget()
unitsWidgetClass
unitsWidgetClassFactory(classID)
updateCustomWidget()
updateExtraWidget()
updateLabelWidget()
updatePendingOpsStyle()
updateReadWidget()
updateUnitsWidget()
updateWriteWidget()
writeWidget()
writeWidgetClass
writeWidgetClassFactory(classID, ignoreCompact=False)