Public Functions
QLMiniSlider(double limit = 99.0, QWidget* parent = nullptr) | |
void | set_limit(double limit) |
LAttribute* | value() |
Detailed Description
A QLMiniSlider is a QLWidget that provides a mechanism for changing a numerically-valued LAttribute within a limited range. Mini sliders are intended to fit into smaller spaces. If a larger slider is needed, see QLSlider.
By click-dragging on the slider, a user can change the attribute linked to it.
The following demonstrates how to link the slider's value attribute with another attribute:
QLWidget* widget = new QLWidget;
QLMiniSlider* slider = new QLMiniSlider(30.0);
slider->value()->set_link_attribute(widget->border_thickness());
In the example, after the call to LAttribute::set_link_attribute(), the widget's border thickness will change when the slider is interacted with.
Member Function Documentation
QLMiniSlider(double limit = 99.0, QWidget* parent = nullptr)
Constructs a mini-slider with a fixed limit.
void set_limit(double limit)
Sets the upper limit of the slider.
LAttribute* value()
Returns a reference to the value attribute of the slider.