hlcc 2.0.0-beta2+pre1
|
DartBoard implementation that uses Taurus to get the Target and Current positions to from two different models, each one of them an array of two doubles radians. More...
Public Member Functions | |
def | __init__ (self, parent=None, *args, **kwargs) |
Initializer for TaurusDartBoard. | |
bool | isReadOnly (self) |
Overrides TaurusBaseComponent.isReadOnly. | |
def | handleEvent (self, Attribute evt_src, TaurusEventType evt_type, evt_val) |
Overrides TaurusBaseComponent.handleEvent. | |
def | setTargetModel (self, new_model) |
Setter for target_model property. | |
Protected Attributes | |
_target_model | |
_target_attribute | |
DartBoard implementation that uses Taurus to get the Target and Current positions to from two different models, each one of them an array of two doubles radians.
model -> Current position target_model -> Target Position
def taurusdartboard.TaurusDartBoard.__init__ | ( | self, | |
parent = None , |
|||
* | args, | ||
** | kwargs | ||
) |
Initializer for TaurusDartBoard.
def taurusdartboard.TaurusDartBoard.handleEvent | ( | self, | |
Attribute | evt_src, | ||
TaurusEventType | evt_type, | ||
evt_val | |||
) |
Overrides TaurusBaseComponent.handleEvent.
Since we have now two models, each one generates a subscription to its own Attribute. Every time a new event is generated by the Attribute, this method is called.
Normally, only one evt_src (the Attribute name) would call this method, but since we have two Attributes (one for model, another for target_model) we have to distinguish between evt_src to update the adequete properties in the widget.
Let's remember that the QeDartBoard widget has for properties of interest:
So when the evt_src == target_model, then we update
and when evt_src == model, then we update
[in] | evt_src | Name of the Attribute that generates the event |
[in] | evt_type | Type of Event according to taurus.core.taurusbasetypes.TaurusEventType |
[in] | evt_val | Value of the event |
bool taurusdartboard.TaurusDartBoard.isReadOnly | ( | self | ) |
Overrides TaurusBaseComponent.isReadOnly.
Indicates that the widget is a read only widget.
def taurusdartboard.TaurusDartBoard.setTargetModel | ( | self, | |
new_model | |||
) |
Setter for target_model property.
This should point to a Taurus Model that is an array of two double radians.
Sets the model used to get the values for the Target Altitude and Azimuth properties on the QeDartBoard.
It also creates the Attribute for that model.
[in] | new_model | String that contains a URI for the Taurus Model. |
|
protected |
|
protected |