Provides a slider widget with labeled values.
Definition at line 15 of file VuoSliderWithLabels.hh.
Public Member Functions | |
VuoSliderWithLabels (QWidget *parent=0) | |
Creates an instance of a slider widget with labeled values. More... | |
QString | getLabelTextForValue (int value) |
Returns the text that should be used in the label to describe the provided value . More... | |
void | setLabelTextForValue (int value, QString text) |
Sets the text that should be used in the label to describe the provided value . More... | |
void | setDisplayTicks (bool display) |
Sets the text that should be used in the label to describe the provided value . More... | |
void | initialize () |
Initializes the slider in preparation for display. More... | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *e) |
Handle paint events. More... | |
|
explicit |
Creates an instance of a slider widget with labeled values.
Definition at line 18 of file VuoSliderWithLabels.cc.
QString VuoSliderWithLabels::getLabelTextForValue | ( | int | value | ) |
Returns the text that should be used in the label to describe the provided value
.
Definition at line 122 of file VuoSliderWithLabels.cc.
void VuoSliderWithLabels::initialize | ( | ) |
Initializes the slider in preparation for display.
This should be called after the slider's minimum, maximum, and all relevant text labels have been set (via setMinimum(), setMaximum(), and setLabelTextForValue(), respectively).
It is possible to change these values and re-initialize the slider while it is still being displayed.
Definition at line 37 of file VuoSliderWithLabels.cc.
|
protected |
Handle paint events.
Definition at line 91 of file VuoSliderWithLabels.cc.
void VuoSliderWithLabels::setDisplayTicks | ( | bool | display | ) |
Sets the text that should be used in the label to describe the provided value
.
Definition at line 138 of file VuoSliderWithLabels.cc.
void VuoSliderWithLabels::setLabelTextForValue | ( | int | value, |
QString | text | ||
) |
Sets the text that should be used in the label to describe the provided value
.
Definition at line 130 of file VuoSliderWithLabels.cc.