Image Component Library (ICL)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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

Public Member Functions

 FSliderHandle ()
 Create an empty slider handle. More...
 
 FSliderHandle (ThreadedUpdatableSlider *sl, float *minV, float *maxV, float *M, float *B, int range, GUIWidget *w, QLCDNumber *lcd=0)
 create a slider handle More...
 
QLCDNumber * getDisplay ()
 retuns the QLCDNumber that is used as display More...
 
void setMin (float min)
 set the min value More...
 
void setMax (float max)
 set the max value More...
 
void setRange (float min, float max)
 set the range of the slider More...
 
void setValue (float val)
 set the current value of the slider More...
 
void setAll (float min, float max, float val)
 sets all parameters of a slider More...
 
float getMin () const
 returns the current min. of the slider More...
 
float getMax () const
 returns the current max. of the slider More...
 
float getValue () const
 returns the current value of the slider More...
 
void operator= (float val)
 assigns a new value to the slider (equal to setValue) More...
 
virtual void registerCallback (const GUI::Callback &cb, const std::string &events="value")
 overloaded method for registering callbacks to specific slider events More...
 
virtual void removeCallbacks ()
 empties both callback locations (GUIHandleBase and ThreadedUpdatableSlider) More...
 
virtual void registerCallback (const GUI::Callback &cb, const std::string &events="all")
 import the other register callback method More...
 
virtual void registerCallback (const GUI::ComplexCallback &cb, const std::string &events="all")
 import the other register callback method More...
 
- Public Member Functions inherited from icl::qt::GUIHandle< ThreadedUpdatableSlider >
const ThreadedUpdatableSlideroperator * () const
 use the *-oprator to get the wrapped component (const) More...
 
ThreadedUpdatableSlider *& operator * ()
 use the *-oprator to get the wrapped component (unconst) More...
 
ThreadedUpdatableSlideroperator-> ()
 this can be used for direct access to wrapped type More...
 
const ThreadedUpdatableSlideroperator-> () const
 this can be used for direct access to wrapped type More...
 
bool isNull () const
 returns whether wrapped pointer is null or not More...
 
void enable ()
 enables the wrapped GUI component More...
 
void disable ()
 disables the wrapped GUI component More...
 
- Public Member Functions inherited from icl::qt::GUIHandleBase
virtual ~GUIHandleBase ()
 virtual destructor More...
 
GUIWidgetgetGUIWidget ()
 returns parent GUIWidget pointer More...
 
virtual void registerCallback (const GUI::ComplexCallback &cb, const std::string &events="all")
 registers a complex callback on this gui component More...
 
virtual void cb ()
 envokes all registered callbacks More...
 

Private Member Functions

void updateMB ()
 internal utiltiy function which update the param for the slider equation More...
 
int f2i (float f) const
 utility function tranlating from valued to slider coordinates More...
 
float i2f (int i) const
 utility function tranlating from slider to value coordinates More...
 

Private Attributes

QLCDNumber * lcd
 associated display More...
 
float * m_fMin
 current min value More...
 
float * m_fMax
 current max value More...
 
float * m_fM
 Slope for the internal slider equation. More...
 
float * m_fB
 Bias for the internal slider equation. More...
 
int m_iSliderRange
 accumulator of the current slider range More...
 

Additional Inherited Members

- Protected Member Functions inherited from icl::qt::GUIHandle< ThreadedUpdatableSlider >
 GUIHandle ()
 as GUIHandle is just an interface, its base constructor is protected More...
 
 GUIHandle (ThreadedUpdatableSlider *t, GUIWidget *w)
 as GUIHandle is just an interface, its base constructor is protected More...
 
- Protected Member Functions inherited from icl::qt::GUIHandleBase
 GUIHandleBase (GUIWidget *w=0)
 create a new GUIHandleBase More...
 

Detailed Description

Handle class for slider componets.

Constructor & Destructor Documentation

◆ FSliderHandle() [1/2]

icl::qt::FSliderHandle::FSliderHandle ( )

Create an empty slider handle.

◆ FSliderHandle() [2/2]

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

◆ f2i()

int icl::qt::FSliderHandle::f2i ( float  f) const
inlineprivate

utility function tranlating from valued to slider coordinates

◆ getDisplay()

QLCDNumber* icl::qt::FSliderHandle::getDisplay ( )
inline

retuns the QLCDNumber that is used as display

result is null, if the slider was created without display

◆ getMax()

float icl::qt::FSliderHandle::getMax ( ) const

returns the current max. of the slider

◆ getMin()

float icl::qt::FSliderHandle::getMin ( ) const

returns the current min. of the slider

◆ getValue()

float icl::qt::FSliderHandle::getValue ( ) const

returns the current value of the slider

◆ i2f()

float icl::qt::FSliderHandle::i2f ( int  i) const
inlineprivate

utility function tranlating from slider to value coordinates

◆ operator=()

void icl::qt::FSliderHandle::operator= ( float  val)
inline

assigns a new value to the slider (equal to setValue)

◆ registerCallback() [1/3]

virtual void icl::qt::FSliderHandle::registerCallback ( const GUI::Callback cb,
const std::string &  events = "value" 
)
inlinevirtual

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.

◆ registerCallback() [2/3]

virtual void icl::qt::GUIHandleBase::registerCallback
inline

import the other register callback method

◆ registerCallback() [3/3]

virtual void icl::qt::GUIHandleBase::registerCallback
inline

import the other register callback method

◆ removeCallbacks()

virtual void icl::qt::FSliderHandle::removeCallbacks ( )
inlinevirtual

empties both callback locations (GUIHandleBase and ThreadedUpdatableSlider)

Reimplemented from icl::qt::GUIHandleBase.

◆ setAll()

void icl::qt::FSliderHandle::setAll ( float  min,
float  max,
float  val 
)
inline

sets all parameters of a slider

◆ setMax()

void icl::qt::FSliderHandle::setMax ( float  max)

set the max value

◆ setMin()

void icl::qt::FSliderHandle::setMin ( float  min)

set the min value

◆ setRange()

void icl::qt::FSliderHandle::setRange ( float  min,
float  max 
)
inline

set the range of the slider

◆ setValue()

void icl::qt::FSliderHandle::setValue ( float  val)

set the current value of the slider

◆ updateMB()

void icl::qt::FSliderHandle::updateMB ( )
private

internal utiltiy function which update the param for the slider equation

Member Data Documentation

◆ lcd

QLCDNumber* icl::qt::FSliderHandle::lcd
private

associated display

◆ m_fB

float* icl::qt::FSliderHandle::m_fB
private

Bias for the internal slider equation.

◆ m_fM

float* icl::qt::FSliderHandle::m_fM
private

Slope for the internal slider equation.

◆ m_fMax

float* icl::qt::FSliderHandle::m_fMax
private

current max value

◆ m_fMin

float* icl::qt::FSliderHandle::m_fMin
private

current min value

◆ m_iSliderRange

int icl::qt::FSliderHandle::m_iSliderRange
private

accumulator of the current slider range


The documentation for this class was generated from the following file: