hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
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 taurusanglelabel.TaurusAngleLabel:

Public Member Functions

def __init__ (self, parent=None)
 Initializer for TaurusAngleLabel.
 
def setHandleEventBlocker (self, bool value)
 
def controller (self)
 Returns controller object for this widget.
 
def controllerUpdate (self)
 
def handleEvent (self, evt_src, evt_type, evt_value)
 Overwritting Taurus Methods ###.
 
def isReadOnly (self)
 Overrides TaurusBaseComponent.isReadOnly method.
 
def setModel (self, uri, index)
 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.
 
def getModelIndexValue (self)
 Overwritting QT Methods ###.
 
def getModelIndex (self)
 Getter for the modelIndex property.
 
def setModelIndex (self, modelIndex)
 Getter for the modelIndex property.
 
def resetModelIndex (self)
 Getter for the bgRole property.
 
def getBgRole (self)
 
def setBgRole (self, bgRole)
 Set the background role.
 
def resetBgRole (self)
 Reset the background role to its default value.
 
def getFgRole (self)
 
def setFgRole (self, fgRole)
 Set what is shown as the foreground (the text) of the label Valid Roles are:
 
def resetFgRole (self)
 Reset the foreground role to its default value.
 

Static Public Attributes

str DefaultBgRole = "quality"
 
str DefaultFgRole = "value"
 
bool DefaultShowText = True
 
None DefaultModelIndex = None
 
Qt model
 Defining QT Properties ###.
 
Qt modelIndex
 This property holds the index inside the model value that should be displayed.
 
Qt fgRole
 
Qt bgRole
 

Protected Member Functions

def _calculate_controller_class (self)
 Overwritting Controlling Methods ###.
 

Protected Attributes

 _bgRole
 
 _fgRole
 
 _blocked
 
 _modelIndex
 
 _controller
 
 _modelIndexStr
 

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

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__()

def taurusanglelabel.TaurusAngleLabel.__init__ (   self,
  parent = None 
)

Initializer for TaurusAngleLabel.

Parameters
parentWidget that holds this TaurusAngleLabel instance

Member Function Documentation

◆ _calculate_controller_class()

def taurusanglelabel.TaurusAngleLabel._calculate_controller_class (   self)
protected

Overwritting Controlling Methods ###.

◆ controller()

def taurusanglelabel.TaurusAngleLabel.controller (   self)

Returns controller object for this widget.

◆ controllerUpdate()

def taurusanglelabel.TaurusAngleLabel.controllerUpdate (   self)

◆ getBgRole()

def taurusanglelabel.TaurusAngleLabel.getBgRole (   self)

◆ getFgRole()

def taurusanglelabel.TaurusAngleLabel.getFgRole (   self)

◆ getModelIndex()

def taurusanglelabel.TaurusAngleLabel.getModelIndex (   self)

Getter for the modelIndex property.

◆ getModelIndexValue()

def taurusanglelabel.TaurusAngleLabel.getModelIndexValue (   self)

Overwritting QT Methods ###.

◆ handleEvent()

def 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()

def taurusanglelabel.TaurusAngleLabel.isReadOnly (   self)

Overrides TaurusBaseComponent.isReadOnly method.

Indicates that the widget is a read only widget.

Returns
True

◆ resetBgRole()

def taurusanglelabel.TaurusAngleLabel.resetBgRole (   self)

Reset the background role to its default value.

◆ resetFgRole()

def taurusanglelabel.TaurusAngleLabel.resetFgRole (   self)

Reset the foreground role to its default value.

◆ resetModelIndex()

def taurusanglelabel.TaurusAngleLabel.resetModelIndex (   self)

Getter for the bgRole property.

◆ setBgRole()

def taurusanglelabel.TaurusAngleLabel.setBgRole (   self,
  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
  • 'state' a color depending on the device state
  • 'quality' a color depending on the attribute quality
  • 'rvalue' a color depending on the rvalue of the attribute
  • <arbitrary member name> a color based on the value of an arbitrary member of the model object (warning: experimental feature!)

.. warning:: the <arbitrary member name> support is still experimental and its API may change in future versions

◆ setFgRole()

def taurusanglelabel.TaurusAngleLabel.setFgRole (   self,
  fgRole 
)

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

  • 'rvalue' the read value of the attribute
  • 'wvalue' the write value of the attribute
  • 'none' : no text
  • 'quality' - the quality of the attribute is displayed
  • 'state' - the device state

◆ setHandleEventBlocker()

def taurusanglelabel.TaurusAngleLabel.setHandleEventBlocker (   self,
bool  value 
)

◆ setModel()

def taurusanglelabel.TaurusAngleLabel.setModel (   self,
  uri,
  index 
)

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.

◆ setModelIndex()

def taurusanglelabel.TaurusAngleLabel.setModelIndex (   self,
  modelIndex 
)

Getter for the modelIndex property.

Member Data Documentation

◆ _bgRole

taurusanglelabel.TaurusAngleLabel._bgRole
protected

◆ _blocked

taurusanglelabel.TaurusAngleLabel._blocked
protected

◆ _controller

taurusanglelabel.TaurusAngleLabel._controller
protected

◆ _fgRole

taurusanglelabel.TaurusAngleLabel._fgRole
protected

◆ _modelIndex

taurusanglelabel.TaurusAngleLabel._modelIndex
protected

◆ _modelIndexStr

taurusanglelabel.TaurusAngleLabel._modelIndexStr
protected

◆ bgRole

Qt taurusanglelabel.TaurusAngleLabel.bgRole
static
Initial value:
= Qt.pyqtProperty(
"QString", getBgRole, setBgRole, resetBgRole, doc="background role"
)

◆ DefaultBgRole

str taurusanglelabel.TaurusAngleLabel.DefaultBgRole = "quality"
static

◆ DefaultFgRole

str taurusanglelabel.TaurusAngleLabel.DefaultFgRole = "value"
static

◆ DefaultModelIndex

None taurusanglelabel.TaurusAngleLabel.DefaultModelIndex = None
static

◆ DefaultShowText

bool taurusanglelabel.TaurusAngleLabel.DefaultShowText = True
static

◆ fgRole

Qt taurusanglelabel.TaurusAngleLabel.fgRole
static
Initial value:
= Qt.pyqtProperty(
"QString", getFgRole, setFgRole, resetFgRole, doc="foreground role"
)

◆ model

Qt taurusanglelabel.TaurusAngleLabel.model
static
Initial value:
= Qt.pyqtProperty(
"QString", TaurusBaseWidget.getModel, setModel, TaurusBaseWidget.resetModel
)

Defining QT Properties ###.

◆ modelIndex

Qt taurusanglelabel.TaurusAngleLabel.modelIndex
static
Initial value:
= Qt.pyqtProperty(
"QString", getModelIndex, setModelIndex, resetModelIndex
)

This property holds the index inside the model value that should be displayed.


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