Skip to content

GUI

ControlSpec

normalize(val)

Normalize a value to the range [0.0, 1.0] based on the control spec.

unnormalize(norm_val)

Convert a normalized value [0.0, 1.0] back to the control spec range.

Slider2D

Bases: QWidget


              flowchart TD
              mmm_python.GUI.Slider2D[Slider2D]

              

              click mmm_python.GUI.Slider2D href "" "mmm_python.GUI.Slider2D"
            

A custom 2D slider widget

get_values()

Get current X and Y values (0.0 to 1.0)

mouseMoveEvent(event)

Handle mouse move

mousePressEvent(event)

Handle mouse press

mouseReleaseEvent(event)

Handle mouse release

paintEvent(event)

Paint the slider

set_values(x, y)

Set X and Y values (0.0 to 1.0)