The UISliderWidget would benefit from a method that allows users to update the widget's min/max values.
The method, e.g. updateMinimumMaximum(self, minimum, maximum), should set the QLineEdit's min/max values. It should also:
- Recalculate and update the QSlider min/max values accordingly
- Recalculate the
scale_factor, step_size and tick_interval attributes
- This may require the user to provide new values for
number_of_steps and number_of_ticks so that these attributes can be recalculated
The need for this method arose during development of the CILViewer 3D Toolbar, as some dialog sliders needed to be updated with new min/max values when new data was loaded. The current workaround involves creating entirely new UISliderWidgets with the new min/max arguments, which could be streamlined using this method instead.
The UISliderWidget would benefit from a method that allows users to update the widget's min/max values.
The method, e.g.
updateMinimumMaximum(self, minimum, maximum), should set the QLineEdit's min/max values. It should also:scale_factor,step_sizeandtick_intervalattributesnumber_of_stepsandnumber_of_ticksso that these attributes can be recalculatedThe need for this method arose during development of the CILViewer 3D Toolbar, as some dialog sliders needed to be updated with new min/max values when new data was loaded. The current workaround involves creating entirely new UISliderWidgets with the new min/max arguments, which could be streamlined using this method instead.