PyDMScaleIndicator¶
-
class
pydm.widgets.scale.
PyDMScaleIndicator
(parent=None, init_channel=None)[source]¶ 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.
- Returns
- Return type
QColor
-
backgroundSizeRate
¶ The rate of background height size (from top to bottom).
- Returns
- Return type
float
-
barIndicator
¶ Whether or not the scale indicator should be a bar instead of a pointer.
- Returns
- Return type
bool
-
flipScale
¶ Whether or not the scale should be flipped.
- Returns
- Return type
bool
-
indicatorColor
¶ The color of the scale indicator.
- Returns
- Return type
QColor
-
invertedAppearance
¶ Whether or not the scale appearence should be inverted.
- Returns
- Return type
bool
-
limitsFromChannel
¶ Whether or not the scale indicator should use the limits information from the channel.
- Returns
- Return type
bool
-
lowerCtrlLimitChanged
(new_limit)[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.
- Returns
- 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.
- Returns
- Return type
bool
-
scaleHeight
¶ The scale height, fixed so it do not wiggle when value label resizes.
- Returns
- Return type
int
-
setup_widgets_for_orientation
(new_orientation, flipped, inverted, value_position)[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.
- Returns
- Return type
bool
-
showTicks
¶ Whether or not the tick marks should be displayed on the scale.
- Returns
- Return type
bool
-
showValue
¶ Whether or not the current value should be displayed on the scale.
- Returns
- Return type
bool
-
tickColor
¶ The color of the scale tick marks.
- Returns
- Return type
QColor
-
tickSizeRate
¶ The rate of tick marks height size (from bottom to top).
- Returns
- Return type
float
-
upperCtrlLimitChanged
(new_limit)[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.
- Returns
- Return type
float
-
userUpperLimit
¶ The user-defined upper limit for the scale.
- Returns
- 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