Image Component Library (ICL)
|
Handle class for slider componets. More...
#include <FSliderHandle.h>
Public Member Functions | |
FSliderHandle () | |
Create an empty slider handle. | |
FSliderHandle (ThreadedUpdatableSlider *sl, float *minV, float *maxV, float *M, float *B, int range, GUIWidget *w, QLCDNumber *lcd=0) | |
create a slider handle | |
QLCDNumber * | getDisplay () |
retuns the QLCDNumber that is used as display | |
void | setMin (float min) |
set the min value | |
void | setMax (float max) |
set the max value | |
void | setRange (float min, float max) |
set the range of the slider | |
void | setValue (float val) |
set the current value of the slider | |
void | setAll (float min, float max, float val) |
sets all parameters of a slider | |
float | getMin () const |
returns the current min. of the slider | |
float | getMax () const |
returns the current max. of the slider | |
float | getValue () const |
returns the current value of the slider | |
void | operator= (float val) |
assigns a new value to the slider (equal to setValue) | |
virtual void | registerCallback (const GUI::Callback &cb, const std::string &events="value") |
overloaded method for registering callbacks to specific slider events | |
virtual void | removeCallbacks () |
empties both callback locations (GUIHandleBase and ThreadedUpdatableSlider) | |
Private Member Functions | |
void | updateMB () |
internal utiltiy function which update the param for the slider equation | |
int | f2i (float f) const |
utility function tranlating from valued to slider coordinates | |
float | i2f (int i) const |
utility function tranlating from slider to value coordinates | |
Private Attributes | |
QLCDNumber * | lcd |
associated display | |
float * | m_fMin |
current min value | |
float * | m_fMax |
current max value | |
float * | m_fM |
Slope for the internal slider equation. | |
float * | m_fB |
Bias for the internal slider equation. | |
int | m_iSliderRange |
accumulator of the current slider range |
Handle class for slider componets.
Create an empty slider handle.
icl::qt::FSliderHandle::FSliderHandle | ( | ThreadedUpdatableSlider * | sl, |
float * | minV, | ||
float * | maxV, | ||
float * | M, | ||
float * | B, | ||
int | range, | ||
GUIWidget * | w, | ||
QLCDNumber * | lcd = 0 |
||
) |
create a slider handle
int icl::qt::FSliderHandle::f2i | ( | float | f | ) | const [inline, private] |
utility function tranlating from valued to slider coordinates
QLCDNumber* icl::qt::FSliderHandle::getDisplay | ( | ) | [inline] |
retuns the QLCDNumber that is used as display
result is null, if the slider was created without display
float icl::qt::FSliderHandle::getMax | ( | ) | const |
returns the current max. of the slider
float icl::qt::FSliderHandle::getMin | ( | ) | const |
returns the current min. of the slider
float icl::qt::FSliderHandle::getValue | ( | ) | const |
returns the current value of the slider
float icl::qt::FSliderHandle::i2f | ( | int | i | ) | const [inline, private] |
utility function tranlating from slider to value coordinates
void icl::qt::FSliderHandle::operator= | ( | float | val | ) | [inline] |
assigns a new value to the slider (equal to setValue)
virtual void icl::qt::FSliderHandle::registerCallback | ( | const GUI::Callback & | cb, |
const std::string & | events = "value" |
||
) | [inline, virtual] |
overloaded method for registering callbacks to specific slider events
Please note: Only this callback mechanism is overloaded for the slider class Simple GUI callbacks are stored within the ThreadedUpdatableSlider class, while complex callbacks (those that get the GUI components handle name as parameters) are stored and handled within the GUIHandleBase class. Allowed values for the event parameter are comma-separated lists that consist of the following tokes:
Reimplemented from icl::qt::GUIHandleBase.
virtual void icl::qt::FSliderHandle::removeCallbacks | ( | ) | [inline, virtual] |
empties both callback locations (GUIHandleBase and ThreadedUpdatableSlider)
Reimplemented from icl::qt::GUIHandleBase.
void icl::qt::FSliderHandle::setAll | ( | float | min, |
float | max, | ||
float | val | ||
) | [inline] |
sets all parameters of a slider
void icl::qt::FSliderHandle::setMax | ( | float | max | ) |
set the max value
void icl::qt::FSliderHandle::setMin | ( | float | min | ) |
set the min value
void icl::qt::FSliderHandle::setRange | ( | float | min, |
float | max | ||
) | [inline] |
set the range of the slider
void icl::qt::FSliderHandle::setValue | ( | float | val | ) |
set the current value of the slider
void icl::qt::FSliderHandle::updateMB | ( | ) | [private] |
internal utiltiy function which update the param for the slider equation
QLCDNumber* icl::qt::FSliderHandle::lcd [private] |
associated display
float* icl::qt::FSliderHandle::m_fB [private] |
Bias for the internal slider equation.
float* icl::qt::FSliderHandle::m_fM [private] |
Slope for the internal slider equation.
float* icl::qt::FSliderHandle::m_fMax [private] |
current max value
float* icl::qt::FSliderHandle::m_fMin [private] |
current min value
int icl::qt::FSliderHandle::m_iSliderRange [private] |
accumulator of the current slider range