cut 3.3.0
Loading...
Searching...
No Matches
taurus.taurusanglelabel.TaurusAngleLabel Class Reference

Taurus based widget for QeAngleLabel, that uses Taurus to get the Radian value and convert it to a DMS/HMS/Sexagecimal/Radian value. More...

Inheritance diagram for taurus.taurusanglelabel.TaurusAngleLabel:
QeAngleLabel

Public Member Functions

 __init__ (self, parent=None, designMode=False)
 Initializer for TaurusAngleLabel.
 
 controller (self)
 Returns controller object for this widget.
 
 handleEvent (self, evt_src, evt_type, evt_value)
 Overwritting Taurus Methods ###.
 
 isReadOnly (self)
 Overrides TaurusBaseComponent.isReadOnly method.
 
 getQtDesignerPluginInfo (cls)
 Provides Qt Designer with widget information.
 
int getModelIndexValue (self)
 Getter for the modelIndex as int property.
 
str getModelIndex (self)
 Getter for the modelIndex as string property.
 
 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.
 
 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 QeAngleLabel
void setUnitsInt (int units)
 Convinience method to allow setting Units using its integer representation.
 

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

- Signals inherited from QeAngleLabel
void radiansChanged (double newValue)
 Indicates that the radians value has been changed.
 
void precisionChanged (int newValue)
 Indicates the precision configuration has been changed.
 
void showUnitsChanged (bool showUnits)
 Indicates that showUnits member has been changed.
 
void unitsChanged (QeAngleLabel::Units units)
 Indicates that units of displayed value has been changed.
 
void unitChanged (QeAngleLabel::Units units)
 Indicates that units of displayed value has been changed.
 
void hmsDmsHandlingChanged (QeAngleLabel::Units hmsDmsHandling)
 Indicates that HMS/DMS handling changed.
 
- Properties inherited from QeAngleLabel
double radians
 Value to represent in radians.
 
int precision
 Precision used in the subsecond section of the label.
 
bool showUnits
 Bool value to determine if units should be visible.
 
Units units
 Enum value to determine which units should be used to represent displayed value.
 
Units hmsDmsHandling
 Enum value to determine if the widget supports HMS/DMS units.
 

Detailed Description

Taurus based widget for QeAngleLabel, that uses Taurus to get the Radian value and convert it to a DMS/HMS/Sexagecimal/Radian value.

Attention
To use this class, please import with the following statement:
from elt.cut.widgets.tuarus.taurusanglelabel import TaurusAngleLabel

TaurusAngleLabel allows to show or hide printed unit and set precision of displayed value This representation is used for Declination coordinates. It uses ptk library for conversions.

The angle values may be displayed with unit that has been selected for conversion. Both positive and negative values may be an input

  • respective sign will be displayed in the label.

TaurusAngleLabel allows to adjust precision of the displayed angle value. By default, the precision is set to 3, initial radian value is set to 0.00, and unit of conversion is DMS.

See also
TaurusAngleLabel https://taurus-scada.org/devel/api/taurus.qt.qtgui.base-TaurusBaseWidget.html

Constructor & Destructor Documentation

◆ __init__()

taurus.taurusanglelabel.TaurusAngleLabel.__init__ ( self,
parent = None,
designMode = False )

Initializer for TaurusAngleLabel.

Parameters
parentWidget that holds this TaurusAngleLabel instance

Member Function Documentation

◆ getBgRole()

str taurus.taurusanglelabel.TaurusAngleLabel.getBgRole ( self)

Getter for the bgRole property.

Returns the background role value

◆ getQtDesignerPluginInfo()

taurus.taurusanglelabel.TaurusAngleLabel.getQtDesignerPluginInfo ( cls)

Provides Qt Designer with widget information.

Return: dict Dictionary with values for keys: icon, module, container, tool_tip and xml.

◆ handleEvent()

taurus.taurusanglelabel.TaurusAngleLabel.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 QeAngleLabel

Parameters
evt_srcName of the Attribute that generates the event
evt_typeType of Event according to taurus.core.taurusbasetypes.TaurusEventType
evt_valueValue of the event

◆ isReadOnly()

taurus.taurusanglelabel.TaurusAngleLabel.isReadOnly ( self)

Overrides TaurusBaseComponent.isReadOnly method.

Indicates that the widget is a read only widget.

Returns
True

◆ setBgRole()

taurus.taurusanglelabel.TaurusAngleLabel.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:

  • 'none' : no background
  • 'quality' a color depending on the attribute quality

◆ setFgRole()

taurus.taurusanglelabel.TaurusAngleLabel.setFgRole ( self,
str fgRole )

Set what is shown as the foreground (the text) of the label Valid Roles are:

  • 'rvalue' the read value of the attribute
  • 'none' : no text

◆ setModel()

taurus.taurusanglelabel.TaurusAngleLabel.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.

Parameters
uriString that contains a URI for the Taurus Model.
indexElement number to be read in case it is an array datapoint value.

Member Data Documentation

◆ bgRole

taurus.taurusanglelabel.TaurusAngleLabel.bgRole
static
Initial value:
= Property(
"QString", fget=getBgRole, fset=setBgRole, freset=resetBgRole, doc="background role"
)

Background role to use Access functions:

◆ fgRole

taurus.taurusanglelabel.TaurusAngleLabel.fgRole
static
Initial value:
= Property(
"QString", fget=getFgRole, fset=setFgRole, freset=resetFgRole, doc="foreground role"
)

Foreground role to use Access functions:

◆ model

taurus.taurusanglelabel.TaurusAngleLabel.model
static
Initial value:
= Property(
"QString",
fget=TaurusBaseWidget.getModel,
fset=setModel,
freset=TaurusBaseWidget.resetModel,
doc="URI as a string for the taurus model",
)

Redefines the model property to override its setModel method.

Access functions:

  • TaurusBaseWidget.getModel
  • setModel
  • TaurusBaseWidget.resetModel

◆ modelIndex

taurus.taurusanglelabel.TaurusAngleLabel.modelIndex
static
Initial value:
= Property(
"QString", fget=getModelIndex, fset=setModelIndex, freset=resetModelIndex, doc="Model index"
)

Index inside the model value that should be displayed Access functions:


The documentation for this class was generated from the following file: