CMS 3D CMS Logo

IgQtRangeMControlFloat Class Reference

#include <Iguana/GLBrowsers/interface/IgQtRangeMControlFloat.h>

Inheritance diagram for IgQtRangeMControlFloat:

IgQtRangeMControl IgQtRangeMValueFloat IgQtRangeControlCommon IgQtRangeMValue< float > IgQtRangeValuePrecision IgControlItem

List of all members.

Public Types

typedef IgQtRangeMValueFloat inherited

Signals

void newValue (std::vector< float > newval)
void valueChanged (std::vector< float > delta)

Public Member Functions

void editSettings (void)
void fwdLong (void)
void fwdMax (void)
void fwdSmall (void)
float getLongStep (void) const
 Get the size of the long step.
QString getSettingString (void) const
float getSmallStep (void) const
 Get the size of the small step.
 IgQtRangeMControlFloat (QWidget *parent, int parts, const rangeMValues &values, const char *name=0)
 IgQtRangeMControlFloat (QWidget *parent, int parts, unsigned int size, const float *values, const char *name=0)
 IgQtRangeMControlFloat (QWidget *parent, int parts, float value=0., const char *name=0)
void resize (unsigned int size, float appendedValues=0)
void revLong (void)
void revMin (void)
void revSmall (void)
void setDirty (bool dirty)
void setLongStep (float size)
 Set the length of the long step to value.
virtual void setPrecision (float precision)
void setRange (float min, float max)
 Set the range of the control to be from min to max, inclusive.
void setSettingString (QString &setting)
void setSmallStep (float size)
 Set the small step size to value.
virtual void setValue (const rangeMValues &newvals)
virtual void setValue (unsigned int size, const float *newvals)
virtual void setValue (unsigned int index, float newval)
virtual void setValue (float newval)
float stringToNumber (const QString &val) const

Protected Member Functions

virtual void adjustSliderSteps (void)
 Adjust the slider to go from minimum to the maximum with as many discrete values as we have small steps, and the page size to the ratio of long step from the small one.
virtual void emitSignals (void)
virtual void fwdEnable (bool enable)
virtual void initialize (int parts)
virtual void moveValue (float delta, MoveDirection dir)
virtual void revEnable (bool enable)
void sliderChanged (int newval)
 Slider has changed to position value small steps from the minimum.
void textChanged (const QString &value)
void updateTextValue (void)

Protected Attributes

float m_longStep
float m_smallStep


Detailed Description

Definition at line 16 of file IgQtRangeMControlFloat.h.


Member Typedef Documentation

typedef IgQtRangeMValueFloat IgQtRangeMControlFloat::inherited

Reimplemented from IgQtRangeMValue< float >.

Definition at line 21 of file IgQtRangeMControlFloat.h.


Constructor & Destructor Documentation

IgQtRangeMControlFloat::IgQtRangeMControlFloat ( QWidget *  parent,
int  parts,
float  value = 0.,
const char *  name = 0 
)

Definition at line 20 of file IgQtRangeMControlFloat.cc.

References initialize().

00023     : IgQtRangeMControl  (parent, parts, 1, name),
00024       inherited (value),
00025       m_longStep   (0.1),
00026       m_smallStep  (0.01)
00027 { initialize (parts); }

IgQtRangeMControlFloat::IgQtRangeMControlFloat ( QWidget *  parent,
int  parts,
unsigned int  size,
const float *  values,
const char *  name = 0 
)

Definition at line 29 of file IgQtRangeMControlFloat.cc.

References initialize().

00033     : IgQtRangeMControl  (parent, parts, size, name),
00034       inherited (size, values),
00035       m_longStep   (0.1),
00036       m_smallStep  (0.01)
00037 { initialize (parts); }

IgQtRangeMControlFloat::IgQtRangeMControlFloat ( QWidget *  parent,
int  parts,
const rangeMValues values,
const char *  name = 0 
)

Definition at line 39 of file IgQtRangeMControlFloat.cc.

References initialize().

00042     : IgQtRangeMControl  (parent, parts, values.size (), name),
00043       inherited (values),
00044       m_longStep   (0.1),
00045       m_smallStep  (0.01)
00046 { initialize (parts); }


Member Function Documentation

void IgQtRangeMControlFloat::adjustSliderSteps ( void   )  [protected, virtual]

Adjust the slider to go from minimum to the maximum with as many discrete values as we have small steps, and the page size to the ratio of long step from the small one.

Definition at line 135 of file IgQtRangeMControlFloat.cc.

References HLT_VtxMuL3::connect, IgQtRangeMControl::currentIndex(), m_longStep, IgQtRangeControlCommon::m_slider, m_smallStep, IgQtRangeMValue< float >::maxValue(), IgQtRangeMValue< float >::minValue(), sliderChanged(), IgQtRangeMValue< float >::value(), and valueChanged().

Referenced by setLongStep(), setRange(), and setSmallStep().

00136 {
00137     if (m_slider)
00138     {
00139         disconnect (m_slider, SIGNAL (valueChanged (int)),
00140                     this,     SLOT (sliderChanged (int)));
00141         m_slider->setRange (0, int (round ((maxValue()-minValue()) / m_smallStep)));
00142         m_slider->setPageStep (int (round (m_longStep / m_smallStep)));
00143         m_slider->setValue (int (round ((inherited::value (currentIndex ()) - minValue ()) / m_smallStep)));
00144         connect (m_slider, SIGNAL (valueChanged (int)),
00145                  this,     SLOT (sliderChanged (int)));
00146     }
00147 }

void IgQtRangeMControlFloat::editSettings ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 318 of file IgQtRangeMControlFloat.cc.

References IgQtRangeSetting::clear(), IgQtRangeMControl::currentIndex(), IgQtRangeControlCommon::editSettingsChanged(), IgQtRangeSetting::enablePrecision(), IgQtRangeSetting::enableRange(), IgQtRangeSetting::enableStep(), IgQtRangeSetting::enableValue(), IgQtRangeSetting::getLong(), getLongStep(), IgQtRangeSetting::getMax(), IgQtRangeSetting::getMin(), IgQtRangeSetting::getPrecision(), IgQtRangeSetting::getSmall(), getSmallStep(), IgQtRangeSetting::getValue(), IgQtRangeSetting::isApplied(), IgQtRangeSetting::isPrecisionChanged(), IgQtRangeControlCommon::isPrecisionEditable(), IgQtRangeSetting::isRangeChanged(), IgQtRangeControlCommon::isRangeEditable(), IgQtRangeSetting::isStepChanged(), IgQtRangeControlCommon::isStepEditable(), IgQtRangeSetting::isValueChanged(), IgQtRangeControlCommon::isValueEditable(), IgQtRangeMValue< float >::maxValue(), IgQtRangeMValue< float >::minValue(), IgQtRangeValuePrecision::precision(), IgQtRangeControlCommon::setEmitSettingsChanged(), IgQtRangeSetting::setLong(), setLongStep(), IgQtRangeSetting::setMax(), IgQtRangeSetting::setMin(), setPrecision(), IgQtRangeSetting::setPrecision(), setRange(), IgQtRangeSetting::setSmall(), setSmallStep(), IgQtRangeSetting::setValue(), stringToNumber(), textChanged(), IgQtRangeMValue< float >::value(), and IgQtRangeControlCommon::widget().

00319 {
00320     IgQtRangeSetting* setting = new IgQtRangeSetting (widget (), "setting");
00321     setting->setValue (QString::number (inherited::value (currentIndex ())));
00322     setting->setPrecision (QString::number (precision ()));
00323     setting->setMin (QString::number (inherited::minValue ()));
00324     setting->setMax (QString::number (inherited::maxValue ()));
00325     setting->setSmall (QString::number (getSmallStep ()));
00326     setting->setLong (QString::number (getLongStep ()));
00327     setting->enableValue (isValueEditable ());
00328     setting->enableStep (isStepEditable ());
00329     setting->enableRange (isRangeEditable ());
00330     setting->enablePrecision (isPrecisionEditable ());    
00331     setting->clear ();
00332     setting->exec ();
00333     bool changed = false;
00334     setEmitSettingsChanged (false);
00335     if (setting->isApplied ())
00336     {
00337       if (setting->isPrecisionChanged ())
00338       {
00339         setPrecision (stringToNumber (setting->getPrecision ()));
00340         changed = true;
00341       }
00342       if (setting->isRangeChanged ())
00343       {
00344         setRange (stringToNumber (setting->getMin ()),
00345                   stringToNumber (setting->getMax ()));
00346         changed = true;
00347       }
00348       if (setting->isStepChanged ())
00349       {
00350         setSmallStep (stringToNumber (setting->getSmall ()));
00351         setLongStep  (stringToNumber (setting->getLong ()));
00352         changed = true;
00353       }
00354       if (setting->isValueChanged ())
00355         textChanged (setting->getValue ());
00356     }
00357     setEmitSettingsChanged (true);
00358     if (changed)
00359       editSettingsChanged ();
00360     delete setting;
00361 }

void IgQtRangeMControlFloat::emitSignals ( void   )  [protected, virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 182 of file IgQtRangeMControlFloat.cc.

References newValue(), IgQtRangeMValue< float >::value(), IgQtRangeMValue< float >::valueChange(), and valueChanged().

Referenced by setDirty().

00183 {
00184     emit newValue (inherited::value ());
00185     emit valueChanged (valueChange ());
00186 }

void IgQtRangeMControlFloat::fwdEnable ( bool  enable  )  [protected, virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 301 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMValue< float >::boundaryHandling(), IgQtRangeControlCommon::fwdEnable(), and IgQtRangeMValue< float >::MODULATE.

Referenced by updateTextValue().

00302 {
00303     if (!(!value && boundaryHandling () == MODULATE))
00304         IgQtRangeMControl::fwdEnable (value);
00305 }

void IgQtRangeMControlFloat::fwdLong ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 174 of file IgQtRangeMControlFloat.cc.

References m_longStep, IgQtRangeControlCommon::MoveFWD, and moveValue().

void IgQtRangeMControlFloat::fwdMax ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 178 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMControl::currentIndex(), IgQtRangeMValue< float >::maxValue(), and setValue().

00179 { setValue (currentIndex(), maxValue ()); }

void IgQtRangeMControlFloat::fwdSmall ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 170 of file IgQtRangeMControlFloat.cc.

References m_smallStep, IgQtRangeControlCommon::MoveFWD, and moveValue().

float IgQtRangeMControlFloat::getLongStep ( void   )  const

Get the size of the long step.

Definition at line 99 of file IgQtRangeMControlFloat.cc.

References m_longStep.

Referenced by editSettings(), and getSettingString().

00100 { return m_longStep; }

QString IgQtRangeMControlFloat::getSettingString ( void   )  const

Definition at line 364 of file IgQtRangeMControlFloat.cc.

References IgQtRangeControlCommon::addSettingItem(), getLongStep(), getSmallStep(), IgQtRangeMValue< float >::maxValue(), IgQtRangeMValue< float >::minValue(), and IgQtRangeValuePrecision::precision().

00365 {
00366     QString setting ("");
00367     addSettingItem (QString::number(inherited::minValue ()), setting);
00368     addSettingItem (QString::number(inherited::maxValue ()), setting);
00369     addSettingItem (QString::number(getSmallStep ()), setting);
00370     addSettingItem (QString::number(getLongStep ()), setting);
00371     addSettingItem (QString::number(precision ()), setting);
00372     return setting;
00373 }

float IgQtRangeMControlFloat::getSmallStep ( void   )  const

Get the size of the small step.

Definition at line 81 of file IgQtRangeMControlFloat.cc.

References m_smallStep.

Referenced by editSettings(), and getSettingString().

00082 { return m_smallStep; }

void IgQtRangeMControlFloat::initialize ( int  parts  )  [protected, virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 49 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMValue< float >::forceValue(), IgQtRangeMValueFloat::forceValueChanged(), m_smallStep, setPrecision(), setRange(), setValue(), value, and IgQtRangeMValue< float >::value().

Referenced by IgQtRangeMControlFloat().

00050 {
00051     // Pretend to step into the value to get it properly bounded
00052     setPrecision (.01);
00053     float oldValue = inherited::value (0);
00054     setRange (SHRT_MIN, SHRT_MAX);
00055     forceValue (0, inherited::value (0) + m_smallStep);
00056     setValue (0, oldValue);
00057     inherited::forceValueChanged (0, 0.);
00058 }

void IgQtRangeMControlFloat::moveValue ( float  delta,
MoveDirection  dir 
) [protected, virtual]

Definition at line 226 of file IgQtRangeMControlFloat.cc.

References IgQtRangeControlCommon::ADD, IgQtRangeMControl::currentIndex(), index, int, IgQtRangeControlCommon::m_stepType, IgQtRangeControlCommon::MoveREV, IgQtRangeControlCommon::MULTIPLE, IgQtRangeValuePrecision::precision(), IgQtRangeValuePrecision::setPrecision(), setValue(), and IgQtRangeMValue< float >::value().

Referenced by fwdLong(), fwdSmall(), revLong(), and revSmall().

00227 {
00228     float oldPrecision = precision ();
00229     IgQtRangeValuePrecision::setPrecision (delta);
00230     unsigned int index = (unsigned int)(currentIndex());
00231     
00232     switch (m_stepType)
00233     {
00234     case ADD:
00235         setValue (index, inherited::value (index) + (direction == MoveREV ? -delta : delta));
00236         break;
00237 
00238     case MULTIPLE:
00239         setValue (index, inherited::value (index) * (direction == MoveREV ? 1/delta : delta));
00240         break;
00241     }
00242 
00243     IgQtRangeValuePrecision::setPrecision (oldPrecision);
00244 }

void IgQtRangeMControlFloat::newValue ( std::vector< float >  newval  )  [signal]

Referenced by emitSignals().

void IgQtRangeMControlFloat::resize ( unsigned int  size,
float  appendedValues = 0 
) [virtual]

Reimplemented from IgQtRangeMValue< float >.

Definition at line 63 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMValue< float >::resize(), and IgQtRangeMControl::resizeIndex().

00064 {
00065     inherited::resize (size, appendedValues);
00066     IgQtRangeMControl::resizeIndex(size);
00067 }

void IgQtRangeMControlFloat::revEnable ( bool  enable  )  [protected, virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 308 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMValue< float >::boundaryHandling(), IgQtRangeMValue< float >::MODULATE, and IgQtRangeControlCommon::revEnable().

Referenced by updateTextValue().

00309 {
00310     if (!(!value && boundaryHandling () == MODULATE))
00311         IgQtRangeMControl::revEnable (value);
00312 }

void IgQtRangeMControlFloat::revLong ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 162 of file IgQtRangeMControlFloat.cc.

References m_longStep, IgQtRangeControlCommon::MoveREV, and moveValue().

void IgQtRangeMControlFloat::revMin ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 158 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMControl::currentIndex(), IgQtRangeMValue< float >::minValue(), and setValue().

00159 { setValue (currentIndex(), minValue ()); }

void IgQtRangeMControlFloat::revSmall ( void   )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 166 of file IgQtRangeMControlFloat.cc.

References m_smallStep, IgQtRangeControlCommon::MoveREV, and moveValue().

void IgQtRangeMControlFloat::setDirty ( bool  dirty  )  [virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 281 of file IgQtRangeMControlFloat.cc.

References emitSignals(), IgQtRangeMValueFloat::forceValueChanged(), IgQtRangeControlCommon::m_resetChangedValue, and IgControlItem::setDirty().

00282 {
00283     if (dirty)
00284     {
00285         emitSignals ();
00286         IgQtRangeMControl::setDirty (dirty);
00287         if (m_resetChangedValue)
00288           inherited::forceValueChanged (0);
00289     }
00290     else
00291     {
00292         inherited::forceValueChanged (0);
00293         IgQtRangeMControl::setDirty (dirty);
00294     }
00295 }

void IgQtRangeMControlFloat::setLongStep ( float  value  ) 

Set the length of the long step to value.

Definition at line 104 of file IgQtRangeMControlFloat.cc.

References adjustSliderSteps(), IgQtRangeControlCommon::editSettingsChanged(), m_longStep, m_smallStep, IgQtRangeValuePrecision::precision(), and IgQtRangeValuePrecision::setPrecision().

Referenced by editSettings(), and setSettingString().

00105 {
00106     m_longStep = ::fabs (value);
00107     if (m_smallStep > m_longStep)
00108     {
00109         IgQtRangeValuePrecision::setPrecision (m_longStep);
00110         m_smallStep = precision ();
00111     }
00112     adjustSliderSteps ();
00113     editSettingsChanged ();
00114 }

void IgQtRangeMControlFloat::setPrecision ( float  precision  )  [virtual]

Reimplemented from IgQtRangeValuePrecision.

Definition at line 73 of file IgQtRangeMControlFloat.cc.

References IgQtRangeControlCommon::editSettingsChanged(), and IgQtRangeValuePrecision::setPrecision().

Referenced by editSettings(), initialize(), and setSettingString().

void IgQtRangeMControlFloat::setRange ( float  min,
float  max 
) [virtual]

Set the range of the control to be from min to max, inclusive.

If the current value is outside that range, it is adjusted to fall into it.

Reimplemented from IgQtRangeMValue< float >.

Definition at line 123 of file IgQtRangeMControlFloat.cc.

References adjustSliderSteps(), IgQtRangeControlCommon::editSettingsChanged(), and IgQtRangeMValue< float >::setRange().

Referenced by editSettings(), initialize(), and setSettingString().

00124 {
00125     // Like base class, just adjust the number of slider steps.
00126     inherited::setRange (min, max);
00127     adjustSliderSteps ();
00128     editSettingsChanged ();
00129 }

void IgQtRangeMControlFloat::setSettingString ( QString &  setting  ) 

Definition at line 376 of file IgQtRangeMControlFloat.cc.

References IgQtRangeControlCommon::editSettingsChanged(), IgQtRangeControlCommon::getSettingItem(), IgQtRangeControlCommon::isEmitSettingsChanged(), IgQtRangeMValue< float >::maxValue(), min, IgQtRangeControlCommon::setEmitSettingsChanged(), setLongStep(), setPrecision(), setRange(), setSmallStep(), and stringToNumber().

00377 {
00378     bool oldValue = isEmitSettingsChanged ();
00379     setEmitSettingsChanged (false);
00380     
00381     if (!setting.isEmpty ())
00382     {
00383       float min = stringToNumber (getSettingItem (setting));
00384       if (!setting.isEmpty ())
00385         setRange (min , stringToNumber (getSettingItem (setting)));
00386       else
00387         setRange (min , maxValue ());
00388     }
00389 
00390     if (!setting.isEmpty ())
00391       setSmallStep (stringToNumber (getSettingItem (setting)));
00392 
00393     if (!setting.isEmpty ())
00394       setLongStep (stringToNumber (getSettingItem (setting)));
00395 
00396     if (!setting.isEmpty ())
00397       setPrecision (stringToNumber (getSettingItem (setting)));
00398     
00399     setEmitSettingsChanged (oldValue);
00400     editSettingsChanged ();
00401 }

void IgQtRangeMControlFloat::setSmallStep ( float  value  ) 

Set the small step size to value.

Definition at line 86 of file IgQtRangeMControlFloat.cc.

References adjustSliderSteps(), IgQtRangeControlCommon::editSettingsChanged(), m_longStep, m_smallStep, IgQtRangeValuePrecision::precision(), and IgQtRangeValuePrecision::setPrecision().

Referenced by editSettings(), and setSettingString().

00087 {
00088     IgQtRangeValuePrecision::setPrecision (value);
00089     m_smallStep = precision ();
00090     if (m_longStep < m_smallStep)
00091         m_longStep = m_smallStep;
00092 
00093     adjustSliderSteps ();
00094     editSettingsChanged ();
00095 }

void IgQtRangeMControlFloat::setValue ( const rangeMValues newvals  )  [virtual]

Definition at line 219 of file IgQtRangeMControlFloat.cc.

References setValue().

00220 { setValue (newvals.size (), &newvals[0]); }

void IgQtRangeMControlFloat::setValue ( unsigned int  size,
const float *  newvals 
) [virtual]

Reimplemented from IgQtRangeMValue< float >.

Definition at line 207 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMControl::currentIndex(), index, int, IgQtRangeMValue< float >::isValueChanged(), IgControlItem::setDirty(), reco::JetTracksAssociation::setValue(), and updateTextValue().

00208 {
00209     inherited::setValue (size, newvals);
00210     if (isValueChanged ()){
00211       unsigned int index = (unsigned int)(currentIndex());        
00212       if (isValueChanged (index))
00213         updateTextValue ();
00214       setDirty ();
00215     }
00216 }

void IgQtRangeMControlFloat::setValue ( unsigned int  index,
float  newval 
) [virtual]

Reimplemented from IgQtRangeMValueFloat.

Definition at line 196 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMControl::currentIndex(), IgQtRangeMValue< float >::isValueChanged(), IgControlItem::setDirty(), reco::JetTracksAssociation::setValue(), and updateTextValue().

00197 {
00198     inherited::setValue (index, newval);
00199     if (isValueChanged (index)){
00200       if (int(index) == currentIndex ())
00201         updateTextValue ();
00202       setDirty ();
00203     }
00204 }

void IgQtRangeMControlFloat::setValue ( float  newval  )  [virtual]

Definition at line 192 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMControl::currentIndex().

Referenced by fwdMax(), initialize(), moveValue(), revMin(), setValue(), sliderChanged(), and textChanged().

00193 {  setValue (currentIndex (), newval); }

void IgQtRangeMControlFloat::sliderChanged ( int  value  )  [protected, virtual]

Slider has changed to position value small steps from the minimum.

Adjust current control value.

Reimplemented from IgQtRangeControlCommon.

Definition at line 152 of file IgQtRangeMControlFloat.cc.

References IgQtRangeMControl::currentIndex(), m_smallStep, IgQtRangeMValue< float >::minValue(), and setValue().

Referenced by adjustSliderSteps(), and updateTextValue().

00153 { setValue (currentIndex (), (value * m_smallStep) + minValue ()); } 

float IgQtRangeMControlFloat::stringToNumber ( const QString &  val  )  const [inline]

Definition at line 42 of file IgQtRangeMControlFloat.h.

Referenced by editSettings(), setSettingString(), and textChanged().

00043     { return val.toFloat(); }

void IgQtRangeMControlFloat::textChanged ( const QString &  value  )  [protected, virtual]

Reimplemented from IgQtRangeControlCommon.

Definition at line 247 of file IgQtRangeMControlFloat.cc.

References setValue(), and stringToNumber().

Referenced by editSettings().

00248 { setValue (stringToNumber (newval)); }

void IgQtRangeMControlFloat::updateTextValue ( void   )  [protected, virtual]

Reimplemented from IgQtRangeMControl.

Definition at line 251 of file IgQtRangeMControlFloat.cc.

References HLT_VtxMuL3::connect, IgQtRangeMControl::currentIndex(), fwdEnable(), int, IgQtRangeControlCommon::m_slider, m_smallStep, IgQtRangeControlCommon::m_text, IgQtRangeMValue< float >::maxValue(), IgQtRangeMValue< float >::minValue(), IgQtRangeValuePrecision::precision(), revEnable(), IgQtLineEdit::setChanged(), sliderChanged(), value, and valueChanged().

Referenced by setValue().

00252 {
00253     // Adjust the various display.
00254     float newval = inherited::value (currentIndex());
00255 
00256     if (m_text)
00257     {   
00258         int prec = precision () ? int (::fabs (::log10 (precision ())) + .5) : 6;
00259         m_text->setText (QString::number (newval, 'f', prec));
00260         m_text->setChanged (false);
00261     }
00262 
00263     if (m_slider)
00264     {
00265         disconnect (m_slider, SIGNAL (valueChanged (int)),
00266                     this, SLOT (sliderChanged (int)));
00267 
00268         m_slider->setValue (int (::round ((newval - minValue ()) / m_smallStep)));
00269 
00270         connect (m_slider, SIGNAL (inherited::valueChanged (int)),
00271                  this, SLOT (sliderChanged (int)));
00272     }
00273 
00274     // Indicate where we are for various buttons and then set myself
00275     // dirty so they'll get updated.
00276     fwdEnable (maxValue () - newval >= m_smallStep);
00277     revEnable (newval - minValue () >= m_smallStep);
00278 }

void IgQtRangeMControlFloat::valueChanged ( std::vector< float >  delta  )  [signal]

Referenced by adjustSliderSteps(), emitSignals(), and updateTextValue().


Member Data Documentation

float IgQtRangeMControlFloat::m_longStep [protected]

Definition at line 91 of file IgQtRangeMControlFloat.h.

Referenced by adjustSliderSteps(), fwdLong(), getLongStep(), revLong(), setLongStep(), and setSmallStep().

float IgQtRangeMControlFloat::m_smallStep [protected]

Definition at line 92 of file IgQtRangeMControlFloat.h.

Referenced by adjustSliderSteps(), fwdSmall(), getSmallStep(), initialize(), revSmall(), setLongStep(), setSmallStep(), sliderChanged(), and updateTextValue().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:31 2009 for CMSSW by  doxygen 1.5.4