fsleyes_props.widgets_bounds

This module provides the _Bounds() function, which is imported into the widgets module namespace. It is separated purely to keep the widgets module file size down.

fsleyes_props.widgets_bounds._Bounds(parent, hasProps, propObj, propVal, slider=True, spin=True, showLimits=True, editLimits=True, mousewheel=False, labels=None, spinWidth=None, **kwargs)

Creates and returns a panel containing sliders/spinboxes which allow the user to edit the low/high values along each dimension of the given Bounds property value.

If both the slider and spin arguments are True, a RangeSliderSpinPanel widget is returned; otherwise a RangePanel is returned.

If both slider and spin are False, a ValueError is raised.

Parameters:
  • slider – Display slider widgets allowing the user to control the bound values.
  • spin – Display spin control widgets allowing the user to control the bound values.
  • showLimits – Show the bound limits.
  • editLimits – Add buttons allowing the user to edit the bound limits.
  • mousewheel – If True, mouse wheel events over the slider/spin controls will change the bounds values.
  • labels – A list of strings of length 2 * ndims, where ndims is the number of dimensions on the Bounds property; the strings are used as labels on the widget.
  • spinWidth – Desired spin control width. See the FloatSpinCtrl class.

See the widgets._String() documentation for details on the other parameters.

fsleyes_props.widgets_bounds._boundBind(hasProps, propObj, sliderPanel, propVal, axis, editLimits)

Called by the _Bounds() function.

Binds the given RangeSliderSpinPanel or RangePanel to one axis of the given BoundsValueList so that changes in one are propagated to the other.

Parameters:
  • sliderPanel – The RangeSliderSpinPanel/RangePanel instance.
  • axis – The 0-indexed axis of the Bounds value.

See _Bounds() for details on the other arguments.