cut 3.3.0
Loading...
Searching...
No Matches
taurus.taurusprefocalstation.TaurusPreFocalStation Class Reference

Taurus based widget for QePreFocalStation, capable of connecting through taurus plugins to control system and services. More...

Inheritance diagram for taurus.taurusprefocalstation.TaurusPreFocalStation:
QePreFocalStation QeRadialItemPlot

Public Member Functions

 __init__ (self, Qt.QWidget parent=None, designMode=False)
 Initializes the object with defaults values, and obtains the appropiate controller.
 
TaurusBaseController controller (self)
 Returns the controller object for this widget.
 
 isReadOnly (self)
 This widget is only capable of displaying data, but not writing.
 
 setModel (self, m, key=MLIST)
 Setter for the model property.
 
 getModelIndex (self)
 Getter for the modelIndex property.
 
 setModelIndex (self, modelIndex)
 Getter for the modelIndex property.
 
 resetModelIndex (self)
 Getter for the bgRole property.
 
 getBgRole (self)
 Getter for the bgRole property.
 
 setBgRole (self, str bgRole)
 Setter for the bgRole property.
 
 resetBgRole (self)
 Resets to the default value the bgRole property.
 
 getFgRole (self)
 Getter for the fgRole property.
 
 setFgRole (self, str fgRole)
 Setter for the fgRole property.
 
 resetFgRole (self)
 Resets to the default value the fgRole property.
 
 getModelObj (self, *, key=MLIST)
 Returns the taurus model object associated to the given key or None if no taurus model is associated.
 
 getModelType (self, *, key=MLIST)
 Invokes base class method with MLIST key.
 
 getQtDesignerPluginInfo (cls)
 Provides Qt Designer with widget information.
 
- Public Member Functions inherited from QePreFocalStation
 QePreFocalStation (QWidget *parent=Q_NULLPTR)
 Constructor that is used to set a parent relationship with.
 
Configuration getCurrentConfiguration ()
 Gets the current configuration of the Pre FocalStation.
 
double getA1B1ScienceFieldRadius ()
 Gets the A1/B1 Science Field Radius.
 
double getBetaWarningAngle ()
 Gets the beta angle used to define warning zone.
 
double getPfsRadius ()
 Gets the of PFS plane.
 
ElementName getPrioritySB ()
 Gets the priority SB name.
 
double getCurrentSAAzA ()
 Gets the value of the current azimuth coordinate the SA A has.
 
double getCurrentSARadialA ()
 Gets the value of the current radial coordinate the SA A has.
 
double getTargetSAAzA ()
 Gets the value of the target azimuth the SA A has.
 
double getTargetSARadialA ()
 Gets the value of the target radial coordinate the SA A has.
 
QPointF getCurrentBoxPosA ()
 Gets the position of the Sensor Box A (for testing purposes)
 
QPointF getTargetBoxPosA ()
 Gets target position of the Sensor Box A (for testing purposes)
 
double getCurrentSAAzB ()
 Gets the value of the current azimuth the SA B has.
 
double getCurrentSARadialB ()
 Gets the value of the current radial coordinate the SA B has.
 
double getTargetSAAzB ()
 Gets the value of the target azimuth the SA B has.
 
double getTargetSARadialB ()
 Gets the value of the target radial coordinate the SA B has.
 
QPointF getCurrentBoxPosB ()
 Gets the position of the Sensor Box B (for testing purposes)
 
QPointF getTargetBoxPosB ()
 Gets target position of the Sensor Box B (for testing purposes)
 
double getCurrentSAAzC ()
 Gets the value of the current azimuth the SA C has.
 
double getCurrentSARadialC ()
 Gets the value of the current radial coordinate the SA C has.
 
double getTargetSAAzC ()
 Gets the value of the target azimuth the SA C has.
 
double getTargetSARadialC ()
 Gets the value of the target radial coordinate the SA C has.
 
QPointF getCurrentBoxPosC ()
 Gets the position of the Sensor Box C (for testing purposes)
 
QPointF getTargetBoxPosC ()
 Gets target position of the Sensor Box C (for testing purposes)
 
- Public Member Functions inherited from QeRadialItemPlot
 QeRadialItemPlot (QWidget *parent=Q_NULLPTR)
 Constructor that is used to set a parent relationship with.
 
bool getIsClockwise ()
 Gets the value the flag that determines if radial values change clockwise or counterclockwise.
 
bool getDegRadNumericDisplay ()
 Returns the true if using radians to display numerical values.
 
bool getShowGrid ()
 Returns the true if grid is displayed.
 
QPixmap getBackgroundPixmap ()
 Returns background QPixmap that is stored in unique ptr.
 

Static Public Attributes

 model
 This property holds URI strings representing the model names with which this widget will get its data from.
 
 modelIndex = Qt.Property("QString", getModelIndex, setModelIndex, resetModelIndex)
 This property holds the index inside the model value that should be displayed.
 
 fgRole
 This property holds the foreground role.
 
 bgRole
 This property holds the background role.
 

Additional Inherited Members

- Public Slots inherited from QePreFocalStation
void setCurrentConfiguration (Configuration newConfiguration)
 Sets the value of the current configuration property.
 
void setCurrentConfigurationInt (int configuration)
 Convinience method to allow setting PFS configuration using its integer representation.
 
void setA1B1ScienceFieldRadius (double newValue)
 Sets the value of the A1/B1 Science Field Radius property.
 
void setBetaWarningAngle (double newValue)
 Sets the value of the beta warning angle property.
 
void setPfsRadius (double newValue)
 Sets the value of PFS radius.
 
void setPrioritySB (ElementName newValue)
 Sets the priority Sensor Box.
 
void changePFSSide (bool doReverse)
 Helper method to change the PFS widget view to PFS A or PFS B.
 
void setCurrentSAAzA (double newValue)
 Sets the value of the current azimuth property.
 
void setCurrentSARadialA (double newValue)
 Sets the value of the current radial coordinate of SA A.
 
void setTargetSAAzA (double newValue)
 Sets the value of the target azimuth property.
 
void setTargetSARadialA (double newValue)
 Sets the value of the target radial coordinate of SA A.
 
void setCurrentSAAzB (double newValue)
 Sets the value of the current azimuth property.
 
void setCurrentSARadialB (double newValue)
 Sets the value of the current radial coordinate of SA B.
 
void setTargetSAAzB (double newValue)
 Sets the value of the target azimuth property.
 
void setTargetSARadialB (double newValue)
 Sets the value of the target radial coordinate of SA B.
 
void setCurrentSAAzC (double newValue)
 Sets the value of the current azimuth property.
 
void setCurrentSARadialC (double newValue)
 Sets the value of the current radial coordinate of SA C.
 
void setTargetSAAzC (double newValue)
 Sets the value of the target azimuth property.
 
void setTargetSARadialC (double newValue)
 Sets the value of the current radial coordinate of SA C.
 
- Public Slots inherited from QeRadialItemPlot
void setIsClockwise (bool newValue)
 Changes the direction of radial values distribution.
 
void setDegRadNumericDisplay (bool newValue)
 Changes the units used to display the values.
 
void setShowGrid (bool newValue)
 Changes the grid visibility indicator.
 
void updateBackground ()
 Updates the m_backgroundUpdateNeeded internal flag to signal a significant change was detect, and the cache needs to be rebuild.
 
- Signals inherited from QePreFocalStation
void currentConfigurationChanged (Configuration newConfiguration)
 Indicates that the current configuration has changed.
 
void a1b1ScienceFieldRadiusChanged (double newValue)
 Indicates that A1/B1 Science Field Radius has changed.
 
void betaWarningAngleChanged (double newValue)
 Indicates that warning angle has changed.
 
void pfsRadiusChanged (double newValue)
 Indicates that PFS radius has changed.
 
void prioritySBChanged (ElementName newValue)
 Indicates that priority SB has changed.
 
void currentSAAzChangedA (double newValue)
 Indicates that the current azimuth value has changed.
 
void currentSARadialChangedA (double newValue)
 Indicates that the current radial value has changed.
 
void targetSAAzChangedA (double newValue)
 Indicates that the target azimuth value has changed.
 
void targetSARadialChangedA (double newValue)
 Indicates that the target radial value has changed.
 
void currentSAAzChangedB (double newValue)
 Indicates that the current azimuth value has changed.
 
void currentSARadialChangedB (double newValue)
 Indicates that the current radial value has changed.
 
void targetSAAzChangedB (double newValue)
 Indicates that the target azimuth value has changed.
 
void targetSARadialChangedB (double newValue)
 Indicates that the target radial value has changed.
 
void currentSAAzChangedC (double newValue)
 Indicates that the current azimuth value has changed.
 
void currentSARadialChangedC (double newValue)
 Indicates that the current radial value has changed.
 
void targetSAAzChangedC (double newValue)
 Indicates that the target azimuth value has changed.
 
void targetSARadialChangedC (double newValue)
 Indicates that the target radial value has changed.
 
- Signals inherited from QeRadialItemPlot
void isClockwiseChanged (bool newValue)
 Indicates that the direction of values distribution chanegd.
 
void degRadNumericDisplayTriggered (bool newValue)
 Indicates that the numerical unit representation has changed.
 
void showGridChanged (bool newValue)
 Indicates that the numerical unit representation has changed.
 
- Protected Member Functions inherited from QePreFocalStation
void paintEvent (QPaintEvent *event) override
 Overrides QWidget::paintEvent to implement its own rendering instructions.
 
void paintDartBoard (QPainter *painter) override
 Uses a QPainter to draw the dartboard (mostly static) background.
 
void paintSA (QPainter *painter, QPointF *positionPoint, double azimuth, double radial, Role roleName, ElementName sbName)
 Paints Sensor Arm according to given coordinates.
 
void updateSBColorAndText (Role roleName, QColor elementColor, QPen &currentPen, QString &sbName)
 Updates Sensor Box color and letter.
 
QColor calculateColor (QColor baseColor, Role roleName)
 Calculates target color and current color when the widget is disabled.
 
PositionCheck checkForCollisions (ElementName elementName)
 Using m_collisionAngle and m_betaWarningAngle, calculates if current position of a SensorBox is in safety ranges and returns enum value based on which the SAs are changed as follows: If the SB is in a collision zone, it's Sensor Arm is coloured red, if the SB is in a warning zone, it's Sensor Arm is coloured orange.
 
void drawM6ArmShadow (QPainter *painter, Configuration config)
 Draws mirror arm shadow (when A3/B3 configuration)
 
- Protected Member Functions inherited from QeRadialItemPlot
void changeEvent (QEvent *event) override
 Overrides QWidget::changeEvent to catch when certain QWidget's properties has changed.
 
void resizeEvent (QResizeEvent *event) override
 Overrides QWidget::resizeEvent to catch when the size has changed.
 
void cacheBackground (QPainter *painter)
 Stores in a pointer the new background cache.
 
void setDirectionIndicatorSigns (QString vertical, QString horizontal)
 Sets indicators' symbols for directions arrows painted in top right corner.
 
void setDirectionIndicatorVisible (bool isVisible)
 Sets directions indicator (painted in the top right corner of the widget) visible.
 
void drawValues (QPainter *painter)
 Draws numeric values around the radial plot in a desired direction (eiher clockwise or counterclockwise)
 
- Properties inherited from QePreFocalStation
Configuration currentConfiguration
 Current configuration of the PFS.
 
double a1b1ScienceFieldRadius
 Science field radius in A1/B1 configuration.
 
double betaWarningAngle
 Beta angle which creates a warning zone to signalize 2 SAs are too close each other.
 
double pfsRadius
 Radius of the PFS plane.
 
ElementName prioritySB
 The Sensor Box that has a priority over other SBs.
 
double currentSAAz_A
 Azimuth coordinate of the current position in radians.
 
double currentSARadial_A
 Radial coordinate of the current position in radians.
 
double targetSAAz_A
 Azimuth coordinate of the target position in radians.
 
double targetSARadial_A
 Radial coordinate of the target position in radians.
 
double currentSAAz_B
 Azimuth coordinate of the current position in radians.
 
double currentSARadial_B
 Azimuth coordinate of the current position in radians.
 
double targetSAAz_B
 X coordinate of Sensor Arm B target position.
 
double targetSARadial_B
 Y coordinate of Sensor Arm B target position.
 
double currentSAAz_C
 Azimuth coordinate of the current position in radians.
 
double currentSARadial_C
 Azimuth coordinate of the current position in radians.
 
double targetSAAz_C
 X coordinate of Sensor Arm C target position.
 
double targetSARadial_C
 Y coordinate of Sensor Arm C target position.
 
- Properties inherited from QeRadialItemPlot
bool isClockwise
 Flag that determines if radial coordinates of the plot change clockwise (true) or counterclockwise (false) The property is true by default (clockwise)
 
bool degRadNumericDisplay
 Degrees/Radians numerical indicators representation (0 - Degrees, 1 - Radians)
 
bool showGrid
 Show/hide grid.
 

Detailed Description

Taurus based widget for QePreFocalStation, capable of connecting through taurus plugins to control system and services.

The PreFocalStation is a custom wiget that render current and target positions of Sensor Boxes and their Arms (marked as A, B and C).

The position is emphasised as azymuth that reflects position of a Sensor Box on outer circle of Focal Plane and radial value that defines distance between the Sensor Arm tip and the centre of the Focal Plane. Azymuth values start at the top of the Plane and increase clock-wise. Radial values start from th centre of the Plane (point 0.0) and increase radially outward.

Each A, B and C pair of Sensor Box and Sensor Arm set has dedicated color. The colors of target positions, are lighter versions of current positions color for A, B and C respectively.

Sensor Arms are colored magenta when they're inside Science field (the most inner circle). Sensor Arms that are too close each other are colored orange. Colliding Sensor Arms are colored red.

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

Constructor & Destructor Documentation

◆ __init__()

taurus.taurusprefocalstation.TaurusPreFocalStation.__init__ ( self,
Qt.QWidget parent = None,
designMode = False )

Initializes the object with defaults values, and obtains the appropiate controller.

Parameters
parentParent Widget.
designModeIndicates if the widget is started within the Qt Designer

Member Function Documentation

◆ controller()

TaurusBaseController taurus.taurusprefocalstation.TaurusPreFocalStation.controller ( self)

Returns the controller object for this widget.

See also
TaurusBaseController
Returns
TaurusBaseController controller of the widget

◆ getQtDesignerPluginInfo()

taurus.taurusprefocalstation.TaurusPreFocalStation.getQtDesignerPluginInfo ( cls)

Provides Qt Designer with widget information.

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

Member Data Documentation

◆ bgRole

taurus.taurusprefocalstation.TaurusPreFocalStation.bgRole
static
Initial value:
= Qt.Property(
"QString", getBgRole, setBgRole, resetBgRole, doc="background role"
)

This property holds the background role.

Valid values are None, "quality", "state"

Access functions:

◆ fgRole

taurus.taurusprefocalstation.TaurusPreFocalStation.fgRole
static
Initial value:
= Qt.Property(
"QString", getFgRole, setFgRole, resetFgRole, doc="foreground role"
)

This property holds the foreground role.

Valid values are:

  • None - no value is displayed
  • "value" - the value is displayed
  • "w_value" - the write value is displayed

Access functions:

◆ model

taurus.taurusprefocalstation.TaurusPreFocalStation.model
static
Initial value:
= Qt.Property(
"QString", TaurusBaseWidget.getModel, setModel, TaurusBaseWidget.resetModel
)

This property holds URI strings representing the model names with which this widget will get its data from.

The model is supposed to be a list of models. Each element of the list relates to current/target coordinates of Sensor Arms A, B and C. It is very important to keep in mind the order in which the models should be passed:

| Index | Affected property |
|-------|-------------------|
| 0     | current Az A      |
| 1     | current Radial A  |
| 2     | target Az A       |
| 3     | target Radial A   |
| 4     | current Az B      |
| 5     | current Radial B  |
| 6     | target Az B       |
| 7     | target Radial B   |
| 8     | current Az C      |
| 9     | current Radial C  |
| 10    | target Az C       |
| 11    | target Radial C   |

Access functions:

◆ modelIndex

taurus.taurusprefocalstation.TaurusPreFocalStation.modelIndex = Qt.Property("QString", getModelIndex, setModelIndex, resetModelIndex)
static

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

Access functions:


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