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.
- backgroundColor
The color of the scale background.
- Return type:
QColor
- backgroundSizeRate
The rate of background height size (from top to bottom).
- Return type:
float
- barIndicator
Whether or not the scale indicator should be a bar instead of a pointer.
- Return type:
bool
- flipScale
Whether or not the scale should be flipped.
- Return type:
bool
- indicatorColor
The color of the scale indicator.
- Return type:
QColor
- invertedAppearance
Whether or not the scale appearence should be inverted.
- Return type:
bool
- limitsFromChannel
Whether or not the scale indicator should use the limits information from the channel.
- Return type:
bool
- 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) –
- numDivisions
The number in which the scale is divided.
- Return type:
int
- orientation
The scale orientation (Horizontal or Vertical)
- Returns:
Qt.Horizontal or Qt.Vertical
- Return type:
int
- originAtZero
Whether or not the scale indicator should start at zero value. Applies only for bar indicator.
- Return type:
bool
- scaleHeight
The scale height, fixed so it do not wiggle when value label resizes.
- Return type:
int
- 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
- showLimits
Whether or not the high and low limits should be displayed on the scale.
- Return type:
bool
- showTicks
Whether or not the tick marks should be displayed on the scale.
- Return type:
bool
- showValue
Whether or not the current value should be displayed on the scale.
- Return type:
bool
- tickColor
The color of the scale tick marks.
- Return type:
QColor
- tickSizeRate
The rate of tick marks height size (from bottom to top).
- Return type:
float
- upperCtrlLimitChanged(new_limit: float) None [source]
PyQT Slot for changes on the upper control limit value of the Channel This slot sends the new limit value to the
`ctrl_limit_changed`
callback.- Parameters:
new_limit (float) –
- userLowerLimit
The user-defined lower limit for the scale.
- Return type:
float
- userUpperLimit
The user-defined upper limit for the scale.
- Return type:
float
- valuePosition
The position of the value label (Top, Bottom, Left or Right).
- Returns:
Qt.TopEdge, Qt.BottomEdge, Qt.LeftEdge or Qt.RightEdge
- Return type:
int
Note
See QFrame Documentation for all inherited properties and methods.