Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
icl::qt::FSliderHandle Class Reference

Handle class for slider componets. More...

#include <FSliderHandle.h>

Inheritance diagram for icl::qt::FSliderHandle:
icl::qt::GUIHandle< ThreadedUpdatableSlider > icl::qt::GUIHandleBase

List of all members.

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

Detailed Description

Handle class for slider componets.


Constructor & Destructor Documentation

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


Member Function Documentation

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

returns the current max. of the slider

returns the current min. of the slider

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:

  • press (slider is pressed)
  • release (slider is released)
  • move (slider is moved)
  • value (the slider value is changed)
  • all (all event types)

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

internal utiltiy function which update the param for the slider equation


Member Data Documentation

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.

current max value

current min value

accumulator of the current slider range


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines