|
cut 3.4.1-rc1
|
Taurus-compatible widget that displays an array of LEDs bound to a Taurus model. More...
Public Member Functions | |
| __init__ (self, parent=None, designMode=False) | |
| Initialize the TaurusLedArray widget. | |
| controller (self) | |
| Returns controller object for this widget. | |
| controllerUpdate (self) | |
| Ask the controller to update the widget with the current model data. | |
| handleEvent (self, evt_src, evt_type, evt_value) | |
| Overwritting Taurus Methods ###. | |
| isReadOnly (self) | |
| Overrides TaurusBaseComponent.isReadOnly method. | |
| int | getModelIndexValue (self) |
| Getter for the modelIndex as int property. | |
| str | getModelIndex (self) |
| Getter for the modelIndex as string property. | |
| setModelIndex (self, str modelIndex) | |
| Set the index inside the model value to be displayed. | |
| getModelMimeData (self) | |
| Retrieve the MIME data associated with the current model. | |
| resetModelIndex (self) | |
| Reset for the modelIndex property. | |
| setModel (self, m, **kwargs) | |
| Setter for model property, which is the URI to the datapoint to be read This should point to a Taurus Model that is an array or a single value datapoint. | |
| str | getBgRole (self) |
| Getter for the bgRole property. | |
| setBgRole (self, str bgRole) | |
| Set the background role. | |
| resetBgRole (self) | |
| Reset the background role to its default value. | |
| str | getFgRole (self) |
| Returns the foreground role value. | |
| setFgRole (self, str fgRole) | |
| Set what is shown as the foreground (the text) of the label Valid Roles are: | |
| resetFgRole (self) | |
| Reset the foreground role to its default value. | |
Public Member Functions inherited from QeLedArray | |
| std::vector< bool > | GetStatesBoolVector () const |
| GetStatesBoolVector Helper method to get current states. | |
| QList< SignalType > | GetSignalTypesEnumList () |
| GetSignalTypesEnumList Returns current signal types for each LED. | |
| void | SetToolTips (QList< QString > tooltips) |
| SetToolTips sets tooltips for existing LEDs. | |
| void | SetSignalTypes (const QList< SignalType > &signal_types) |
SetSignalTypes method to set signal types using enum values of SignalType type. | |
| void | SetLabel (int index, QString label_text) |
| SetLabel Sets label under specific index. | |
| void | SetState (int index, bool state) |
| SetState Sets state of a single LED. | |
| void | SetSignalType (int index, SignalType signal_type) |
| SetSignalType Sets signal type associated with the LED. | |
Static Public Attributes | |
| model | |
| Redefines the model property to override its setModel method. | |
| modelIndex | |
| Index inside the model value that should be displayed Access functions: | |
| fgRole | |
| Foreground role to use Access functions: | |
| bgRole | |
| Background role to use Access functions: | |
Protected Member Functions | |
| _calculate_controller_class (self) | |
| Overwritting Controlling Methods ###. | |
Additional Inherited Members | |
Public Slots inherited from QeLedArray | |
| void | SetSignalTypes (const QStringList &signal_types) |
SetSignalTypes Converts QStrings to enum values of SignalType type and assigns them to existing LEDs in respective order. | |
Signals inherited from QeLedArray | |
| void | OrderChanged (bool new_value) |
| OrderChanged Communicates change of LEDs order. | |
| void | LabelsVisibilityChanged (bool new_value) |
| LabelsVisibilityChanged Communicates change of LEDs' labels visibility. | |
| void | LedsCountChanged (int new_value) |
| LedsCountChanged Communicates change of LEDs' numbers. | |
| void | StatesChanged (QStringList new_value) |
| StatesChanged Communicates change of LEDs' states. | |
| void | LabelsChanged (QList< QString > labels) |
| LabelsChanged Communicates change of LEDs' labels. | |
| void | SignalTypesChanged (QStringList new_values) |
| SignalTypesChanged SignalTypesChanged. | |
Properties inherited from QeLedArray | |
| bool | vertical |
| Order of the LEDs in the widget. | |
| bool | labels_visible |
| Show/hide LEDs labels. | |
| int | leds_count |
| Number of LEDs in the array. | |
| QStringList | states |
| States of LEDs. | |
| QList< QString > | labels |
| QList of QStrings that are labels for each LED. | |
| QStringList | signal_types |
List of QStrings that are later converted to SignalType values which are assigned to corresponding LED (based on order of passed values). | |
Taurus-compatible widget that displays an array of LEDs bound to a Taurus model.
Each LED in the array represents a state from the underlying Taurus model value. Supports boolean vectors, integers (converted to bit vectors), and string arrays. The widget binds to the Taurus model and automatically updates LED states when the model value changes.
model str URI as a string for the Taurus model to bind to. modelIndex str Index inside the model value that should be displayed. fgRole str Foreground role to use ('value', 'rvalue', 'none'). bgRole str Background role to use ('quality', 'none').
| taurus.taurusledarray.TaurusLedArray.__init__ | ( | self, | |
| parent = None, | |||
| designMode = False ) |
Initialize the TaurusLedArray widget.
| parent | Parent widget that holds this TaurusLedArray instance. |
| designMode | True if created in Qt Designer. |
|
protected |
Overwritting Controlling Methods ###.
Determine the appropriate controller class based on the model type.
| str taurus.taurusledarray.TaurusLedArray.getBgRole | ( | self | ) |
Getter for the bgRole property.
Returns the background role value
| str taurus.taurusledarray.TaurusLedArray.getModelIndex | ( | self | ) |
Getter for the modelIndex as string property.
Get the model index as a string.
| int taurus.taurusledarray.TaurusLedArray.getModelIndexValue | ( | self | ) |
Getter for the modelIndex as int property.
Get the model index as an integer.
| taurus.taurusledarray.TaurusLedArray.getModelMimeData | ( | self | ) |
Retrieve the MIME data associated with the current model.
| taurus.taurusledarray.TaurusLedArray.handleEvent | ( | self, | |
| evt_src, | |||
| evt_type, | |||
| evt_value ) |
Overwritting Taurus Methods ###.
Overrides TaurusBaseComponent.handleEvent method. Grab the the event value and based on the index set the radians values to be converted by the QeLedArray
| evt_src | Name of the Attribute that generates the event |
| evt_type | Type of Event according to taurus.core.taurusbasetypes.TaurusEventType |
| evt_value | Value of the event |
| taurus.taurusledarray.TaurusLedArray.isReadOnly | ( | self | ) |
Overrides TaurusBaseComponent.isReadOnly method.
Indicates that the widget is a read only widget.
| taurus.taurusledarray.TaurusLedArray.resetModelIndex | ( | self | ) |
Reset for the modelIndex property.
Reset the model index to its default value.
| taurus.taurusledarray.TaurusLedArray.setBgRole | ( | self, | |
| str | bgRole ) |
Set the background role.
The label background will be set according to the current palette and the role. Valid roles are:
| taurus.taurusledarray.TaurusLedArray.setFgRole | ( | self, | |
| str | fgRole ) |
Set what is shown as the foreground (the text) of the label Valid Roles are:
| taurus.taurusledarray.TaurusLedArray.setModel | ( | self, | |
| m, | |||
| ** | kwargs ) |
Setter for model property, which is the URI to the datapoint to be read This should point to a Taurus Model that is an array or a single value datapoint.
| uri | String that contains a URI for the Taurus Model. |
| index | Element number to be read in case it is an array datapoint value. |
| taurus.taurusledarray.TaurusLedArray.setModelIndex | ( | self, | |
| str | modelIndex ) |
Set the index inside the model value to be displayed.
The index can be a single integer or a sequence of integers.
| modelIndex | String representing model index (integer or sequence). |
|
static |
Background role to use Access functions:
|
static |
Foreground role to use Access functions:
|
static |
Redefines the model property to override its setModel method.
Access functions:
|
static |
Index inside the model value that should be displayed Access functions: