Slider
- class compas_view2.ui.Slider(app, parent, action, value=0, minval=0, maxval=100, step=1, title=None, annotation=None, interval=1, bgcolor=None)[source]
Bases:
objectClass representing a horizontal slider wrapped in a grid layout with two rows.
- Parameters:
app (
compas_view2.app.App) – The app containing the widget.parent (QtWidget) – The parent widget.
action (callable) – The callback connected to the slide action.
value (int, optional) – The initial value of the slider.
minval (int, optional) – The minimum value of the sliding range.
maxval (int, optional) – The maximum value of the sliding range.
step (int, optional) – Size of value increments.
title (str, optional) – Title label.
annotation (str, optional) – Value annotation label.
interval (int, optional) – The tick interval size.
bgcolor (Color, optional) – Background color of the box containing the slider.
- Attributes:
action (callable) – Action associated with the button click event.
slider (QtWidgets.QSlider) – The actual slider widget.
value (float) – The current value of the slider.
Class Attributes
—————-
STYLE (str) – Stylesheet for the visual appearance of the groove and handle of the slider.