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
Boundsproperty value.If both the
sliderandspinarguments areTrue, aRangeSliderSpinPanelwidget is returned; otherwise aRangePanelis returned.If both
sliderandspinareFalse, aValueErroris 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, wherendimsis the number of dimensions on theBoundsproperty; the strings are used as labels on the widget.spinWidth – Desired spin control width. See the
FloatSpinCtrlclass.
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
RangeSliderSpinPanelorRangePanelto one axis of the givenBoundsValueListso that changes in one are propagated to the other.- Parameters
sliderPanel – The
RangeSliderSpinPanel/RangePanelinstance.axis – The 0-indexed axis of the
Boundsvalue.
See
_Bounds()for details on the other arguments.