Skip to content

Add method to UISliderWidget to update the min/max widget values #186

@jcornall

Description

@jcornall

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions