#include <Iguana/GLBrowsers/interface/IgQtRangeMValue.h>
Public Types | |
enum | BoundaryHandling { ACCUMULATE, MODULATE } |
typedef IgQtRangeMValue< T > | inherited |
typedef std::vector< T > | rangeMValues |
Public Member Functions | |
virtual BoundaryHandling | boundaryHandling (void) const |
IgQtRangeMValue (const rangeMValues &values, T min=0, T max=SHRT_MAX) | |
IgQtRangeMValue (unsigned int size, const T *values, T min=0, T max=SHRT_MAX) | |
IgQtRangeMValue (T value=0, T min=0, T max=SHRT_MAX) | |
virtual bool | isValueChanged (unsigned int index) const |
virtual bool | isValueChanged (void) const |
virtual T | maxValue (void) const |
virtual T | minValue (void) const |
virtual void | resize (unsigned int size, T appendedValues=0) |
virtual void | setBoundaryHandling (BoundaryHandling mode) |
virtual void | setMaxValue (T max) |
virtual void | setMinValue (T min) |
virtual void | setRange (T min, T max) |
virtual void | setValue (const rangeMValues &values) |
virtual void | setValue (unsigned int size, const T *values) |
virtual void | setValue (unsigned int index, T value) |
unsigned int | size (void) const |
virtual const rangeMValues & | value (void) const |
virtual T | value (unsigned int index) const |
virtual const rangeMValues & | valueChange (void) const |
virtual T | valueChange (unsigned int index) const |
virtual | ~IgQtRangeMValue (void) |
Protected Member Functions | |
T | accumulate (T value) const |
T | adjustValue (T value) |
virtual void | forceValue (const rangeMValues &values) |
virtual void | forceValue (unsigned int size, const T *values) |
virtual void | forceValue (unsigned int index, T value) |
virtual void | forceValue (T value) |
virtual void | forceValueChanged (const rangeMValues &delta) |
virtual void | forceValueChanged (unsigned int size, const T *delta) |
virtual void | forceValueChanged (unsigned int index, T delta) |
virtual void | forceValueChanged (T delta) |
T | modulate (T value) const |
Protected Attributes | |
BoundaryHandling | m_boundary |
rangeMValues | m_change |
T | m_max |
T | m_min |
rangeMValues | m_value |
bool | m_valueChangeFlag |
Definition at line 19 of file IgQtRangeMValue.h.
typedef IgQtRangeMValue<T> IgQtRangeMValue< T >::inherited |
Reimplemented in IgQtRangeMControlFloat, IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 22 of file IgQtRangeMValue.h.
typedef std::vector<T> IgQtRangeMValue< T >::rangeMValues |
Reimplemented in IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 29 of file IgQtRangeMValue.h.
enum IgQtRangeMValue::BoundaryHandling |
IgQtRangeMValue< T >::IgQtRangeMValue | ( | T | value = 0 , |
|
T | min = 0 , |
|||
T | max = SHRT_MAX | |||
) | [inline] |
Definition at line 235 of file IgQtRangeMValue.h.
References IgQtRangeMValue< T >::m_value, and IgQtRangeMValue< T >::setValue().
00238 : m_value (1, value), 00239 m_change (1, value), 00240 m_min (min), 00241 m_max (max), 00242 m_boundary (ACCUMULATE), 00243 m_valueChangeFlag (false) 00244 { setValue (m_value); }
IgQtRangeMValue< T >::IgQtRangeMValue | ( | unsigned int | size, | |
const T * | values, | |||
T | min = 0 , |
|||
T | max = SHRT_MAX | |||
) | [inline] |
Definition at line 247 of file IgQtRangeMValue.h.
References ASSERT, and IgQtRangeMValue< T >::setValue().
00251 : m_value (size, 0), 00252 m_change (size, 0), 00253 m_min (min), 00254 m_max (max), 00255 m_boundary (ACCUMULATE), 00256 m_valueChangeFlag (false) 00257 { 00258 ASSERT (size); 00259 setValue (size, values); 00260 }
IgQtRangeMValue< T >::IgQtRangeMValue | ( | const rangeMValues & | values, | |
T | min = 0 , |
|||
T | max = SHRT_MAX | |||
) | [inline] |
Definition at line 263 of file IgQtRangeMValue.h.
References ASSERT, and IgQtRangeMValue< T >::setValue().
00266 : m_value (values.size (), 0), 00267 m_change (values.size (), 0), 00268 m_min (min), 00269 m_max (max), 00270 m_boundary (ACCUMULATE), 00271 m_valueChangeFlag (false) 00272 { 00273 ASSERT (values.size()); 00274 setValue (values); 00275 }
virtual IgQtRangeMValue< T >::~IgQtRangeMValue | ( | void | ) | [inline, virtual] |
T IgQtRangeMValue< T >::accumulate | ( | T | value | ) | const [inline, protected] |
T IgQtRangeMValue< T >::adjustValue | ( | T | value | ) | [inline, protected] |
Definition at line 152 of file IgQtRangeMValue.h.
00153 { 00154 switch (boundaryHandling ()) 00155 { 00156 case ACCUMULATE: 00157 value = accumulate (value); 00158 break; 00159 00160 case MODULATE: 00161 value = modulate (value); 00162 break; 00163 } 00164 return value; 00165 }
virtual BoundaryHandling IgQtRangeMValue< T >::boundaryHandling | ( | void | ) | const [inline, virtual] |
virtual void IgQtRangeMValue< T >::forceValue | ( | const rangeMValues & | values | ) | [inline, protected, virtual] |
virtual void IgQtRangeMValue< T >::forceValue | ( | unsigned int | size, | |
const T * | values | |||
) | [inline, protected, virtual] |
virtual void IgQtRangeMValue< T >::forceValue | ( | unsigned int | index, | |
T | value | |||
) | [inline, protected, virtual] |
virtual void IgQtRangeMValue< T >::forceValue | ( | T | value | ) | [inline, protected, virtual] |
virtual void IgQtRangeMValue< T >::forceValueChanged | ( | const rangeMValues & | delta | ) | [inline, protected, virtual] |
Definition at line 216 of file IgQtRangeMValue.h.
00217 { 00218 unsigned int size = delta.size (); 00219 m_valueChangeFlag = false; 00220 for (unsigned int i = 0; i < size; i++) 00221 forceValueChanged (i, delta[i]); 00222 }
virtual void IgQtRangeMValue< T >::forceValueChanged | ( | unsigned int | size, | |
const T * | delta | |||
) | [inline, protected, virtual] |
Definition at line 209 of file IgQtRangeMValue.h.
00210 { 00211 m_valueChangeFlag = false; 00212 for (unsigned int i = 0; i < size; i++) 00213 forceValueChanged (i, delta[i]); 00214 }
virtual void IgQtRangeMValue< T >::forceValueChanged | ( | unsigned int | index, | |
T | delta | |||
) | [inline, protected, virtual] |
Reimplemented in IgQtRangeMValueFloat.
Definition at line 201 of file IgQtRangeMValue.h.
00202 { 00203 ASSERT ( index < m_change.size() ); 00204 m_change [index] = delta; 00205 if(delta != 0) 00206 m_valueChangeFlag = true; 00207 }
virtual void IgQtRangeMValue< T >::forceValueChanged | ( | T | delta | ) | [inline, protected, virtual] |
Reimplemented in IgQtRangeMValueFloat.
Definition at line 193 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMControlImp< T >::initialize(), and IgQtRangeMControlImp< T >::setDirty().
00194 { 00195 unsigned int size = m_change.size (); 00196 for (unsigned int i = 0; i < size; i++) 00197 m_change [i] = delta; 00198 m_valueChangeFlag = delta ? true : false; 00199 }
virtual bool IgQtRangeMValue< T >::isValueChanged | ( | unsigned int | index | ) | const [inline, virtual] |
Reimplemented in IgQtRangeMValueFloat.
Definition at line 99 of file IgQtRangeMValue.h.
00100 { return valueChange (index) != 0 ? true : false; }
virtual bool IgQtRangeMValue< T >::isValueChanged | ( | void | ) | const [inline, virtual] |
virtual T IgQtRangeMValue< T >::maxValue | ( | void | ) | const [inline, virtual] |
Definition at line 119 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMControlImp< T >::moveValue(), and IgQtRangeMControlImp< T >::updateTextValue().
00120 { return m_max; }
virtual T IgQtRangeMValue< T >::minValue | ( | void | ) | const [inline, virtual] |
Definition at line 113 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMControlImp< T >::moveValue(), and IgQtRangeMControlImp< T >::updateTextValue().
00114 { return m_min; }
T IgQtRangeMValue< T >::modulate | ( | T | value | ) | const [inline, protected] |
virtual void IgQtRangeMValue< T >::resize | ( | unsigned int | size, | |
T | appendedValues = 0 | |||
) | [inline, virtual] |
Reimplemented in IgQtRangeMControlFloat, IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 50 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMControlImp< short >::resize().
00051 { 00052 ASSERT (size); 00053 if (size == m_value.size ()) return; 00054 m_value.resize(size, appendedValues); 00055 m_change.resize(size, 0); 00056 }
virtual void IgQtRangeMValue< T >::setBoundaryHandling | ( | BoundaryHandling | mode | ) | [inline, virtual] |
Definition at line 128 of file IgQtRangeMValue.h.
00129 { 00130 if (m_boundary != mode) 00131 { m_boundary = mode; setValue (m_value); } 00132 }
virtual void IgQtRangeMValue< T >::setMaxValue | ( | T | max | ) | [inline, virtual] |
virtual void IgQtRangeMValue< T >::setMinValue | ( | T | min | ) | [inline, virtual] |
virtual void IgQtRangeMValue< T >::setRange | ( | T | min, | |
T | max | |||
) | [inline, virtual] |
Reimplemented in IgQtRangeMControlFloat, IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 102 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMControlImp< short >::editSettings(), IgQtRangeMControlImp< short >::setRange(), and IgQtRangeMControlImp< short >::setSettingString().
00103 { 00104 if (min == m_min && max == m_max) 00105 return; 00106 else if (min > max) 00107 std::swap (min, max); 00108 m_max = max; 00109 m_min = min; 00110 setValue (m_value); 00111 }
virtual void IgQtRangeMValue< T >::setValue | ( | const rangeMValues & | values | ) | [inline, virtual] |
Reimplemented in IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 75 of file IgQtRangeMValue.h.
virtual void IgQtRangeMValue< T >::setValue | ( | unsigned int | size, | |
const T * | values | |||
) | [inline, virtual] |
Reimplemented in IgQtRangeMControlFloat, IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 67 of file IgQtRangeMValue.h.
00068 { 00069 m_valueChangeFlag = false; 00070 resize (size); 00071 for(unsigned int i = 0; i < size; i++) 00072 setValue (i, values [i]); 00073 }
virtual void IgQtRangeMValue< T >::setValue | ( | unsigned int | index, | |
T | value | |||
) | [inline, virtual] |
Reimplemented in IgQtRangeMControlFloat, IgQtRangeMControlImp< T >, IgQtRangeMValueFloat, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 58 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMValue< T >::IgQtRangeMValue(), and IgQtRangeMControlImp< short >::setValue().
00059 { 00060 ASSERT ( index < m_value.size() ); 00061 value = adjustValue (value); 00062 m_change[index] += value - m_value [index]; 00063 m_value[index] = value; 00064 m_valueChangeFlag = isValueChanged (index); 00065 }
unsigned int IgQtRangeMValue< T >::size | ( | void | ) | const [inline] |
virtual const rangeMValues& IgQtRangeMValue< T >::value | ( | void | ) | const [inline, virtual] |
Definition at line 84 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMControlImp< T >::initialize(), and IgQtRangeMControlImp< T >::moveValue().
00085 { return m_value; }
virtual T IgQtRangeMValue< T >::value | ( | unsigned int | index | ) | const [inline, virtual] |
virtual const rangeMValues& IgQtRangeMValue< T >::valueChange | ( | void | ) | const [inline, virtual] |
virtual T IgQtRangeMValue< T >::valueChange | ( | unsigned int | index | ) | const [inline, virtual] |
BoundaryHandling IgQtRangeMValue< T >::m_boundary [protected] |
Definition at line 230 of file IgQtRangeMValue.h.
rangeMValues IgQtRangeMValue< T >::m_change [protected] |
Definition at line 227 of file IgQtRangeMValue.h.
T IgQtRangeMValue< T >::m_max [protected] |
Definition at line 229 of file IgQtRangeMValue.h.
T IgQtRangeMValue< T >::m_min [protected] |
Definition at line 228 of file IgQtRangeMValue.h.
rangeMValues IgQtRangeMValue< T >::m_value [protected] |
Definition at line 226 of file IgQtRangeMValue.h.
Referenced by IgQtRangeMValue< T >::IgQtRangeMValue().
bool IgQtRangeMValue< T >::m_valueChangeFlag [protected] |
Definition at line 231 of file IgQtRangeMValue.h.