PyDMScaleIndicator
- class pydm.widgets.scale.PyDMScaleIndicator(parent: Optional[QWidget] = None, init_channel: Optional[str] = None)[source]
Bases:
QFrame
,TextFormatter
,PyDMWidget
A bar-shaped indicator for scalar value with support for Channels and more from PyDM. Configurable features include indicator type (bar/pointer), scale tick marks and orientation (horizontal/vertical).
- Parameters:
parent (QWidget) – The parent widget for the Scale
init_channel (str, optional) – The channel to be used by the widget.
- getBackgroundSizeRate() float [source]
The rate of background height size (from top to bottom).
- Return type:
float
- lowerCtrlLimitChanged(new_limit: float) None [source]
PyQT Slot for changes on the lower control limit value of the Channel This slot sends the new limit value to the
`ctrl_limit_changed`
callback.- Parameters:
new_limit (float) –
- prop_type
alias of
Edge
- readBarIndicator() bool [source]
Whether or not the scale indicator should be a bar instead of a pointer.
- Return type:
bool
- readInvertedAppearance() bool [source]
Whether or not the scale appearance should be inverted.
- Return type:
bool
- readLimitsFromChannel() bool [source]
Whether or not the scale indicator should use the limits information from the channel.
- Return type:
bool
- readOrientation() int | PyQt5.QtCore.Qt.Orientation [source]
The scale orientation (Horizontal or Vertical)
- Returns:
Qt.Horizontal or Qt.Vertical
- Return type:
int
- readOriginAtZero() bool [source]
Whether or not the scale indicator should start at zero value. Applies only for bar indicator.
- Return type:
bool
- readScaleHeight() int [source]
The scale height, fixed so it do not wiggle when value label resizes.
- Return type:
int
- readShowLimits() bool [source]
Whether or not the high and low limits should be displayed on the scale.
- Return type:
bool
- readShowTicks() bool [source]
Whether or not the tick marks should be displayed on the scale.
- Return type:
bool
- readShowValue() bool [source]
Whether or not the current value should be displayed on the scale.
- Return type:
bool
- readTickSizeRate() float [source]
The rate of tick marks height size (from bottom to top).
- Return type:
float
- readValuePosition() Edge [source]
The position of the value label (Top, Bottom, Left or Right).
- Returns:
Qt.TopEdge, Qt.BottomEdge, Qt.LeftEdge or Qt.RightEdge
- Return type:
int
- setBackgroundColor(color: QColor) None [source]
The color of the scale background.
- Parameters:
color (QColor) –
- setBackgroundSizeRate(rate: float) None [source]
The rate of background height size (from top to bottom).
- Parameters:
rate (float) – Between 0 and 1.
- setBarIndicator(checked: bool) None [source]
Whether or not the scale indicator should be a bar instead of a pointer.
- Parameters:
checked (bool) –
- setFlipScale(checked: bool) None [source]
Whether or not the scale should be flipped.
- Parameters:
checked (bool) –
- setIndicatorColor(color: QColor) None [source]
The color of the scale indicator.
- Parameters:
color (QColor) –
- setInvertedAppearance(inverted: bool) None [source]
Whether or not the scale appearance should be inverted.
- Parameters:
inverted (bool) –
- setLimitsFromChannel(checked: bool) None [source]
Whether or not the scale indicator should use the limits information from the channel.
- Parameters:
checked (bool) – True to use the limits from the Channel, False to use the user-defined values.
- setNumDivisions(divisions: int) None [source]
The number in which the scale is divided.
- Parameters:
divisions (int) – The number of scale divisions.
- setOrientation(orientation: Orientation) None [source]
The scale orientation (Horizontal or Vertical)
- Parameters:
new_orientation (int) – Qt.Horizontal or Qt.Vertical
- setOriginAtZero(checked: bool) None [source]
Whether or not the scale indicator should start at zero value. Applies only for bar indicator.
- Parameters:
checked (bool) –
- setScaleHeight(value: int) None [source]
The scale height, fixed so it do not wiggle when value label resizes.
- Parameters:
divisions (int) – The scale height.
- setShowLimits(checked: bool) None [source]
Whether or not the high and low limits should be displayed on the scale.
- Parameters:
checked (bool) –
- setShowTicks(checked: bool) None [source]
Whether or not the tick marks should be displayed on the scale.
- Parameters:
checked (bool) –
- setShowValue(checked: bool) None [source]
Whether or not the current value should be displayed on the scale.
- Parameters:
checked (bool) –
- setTickColor(color: QColor) None [source]
The color of the scale tick marks.
- Parameters:
color (QColor) –
- setTickSizeRate(rate: float) None [source]
The rate of tick marks height size (from bottom to top).
- Parameters:
rate (float) – Between 0 and 1.
- setUserLowerLimit(value: float) None [source]
The user-defined lower limit for the scale.
- Parameters:
value (float) – The new lower limit value.
- setUserUpperLimit(value: float) None [source]
The user-defined upper limit for the scale.
- Parameters:
value (float) – The new upper limit value.
- setValuePosition(position: Edge) None [source]
The position of the value label (Top, Bottom, Left or Right).
- positionint
Qt.TopEdge, Qt.BottomEdge, Qt.LeftEdge or Qt.RightEdge
- setup_widgets_for_orientation(new_orientation: Orientation, flipped: bool, inverted: bool, value_position: Edge) None [source]
Reconstruct the widget given the orientation.
- Parameters:
new_orientation (int) – Qt.Horizontal or Qt.Vertical
flipped (bool) – Indicates if scale tick marks are flipped to the other side
inverted (bool) – Indicates if scale appearance is inverted
Note
See QFrame Documentation for all inherited properties and methods.