RangeMapper Class Referenceabstract

#include <RangeMapper.h>

Inheritance diagram for RangeMapper:
Inheritance graph

Public Member Functions

virtual ~RangeMapper ()
 
virtual int getPositionForValue (double value) const =0
 Return the position that maps to the given value, rounding to the nearest position and clamping to the minimum and maximum extents of the mapper's positional range. More...
 
virtual int getPositionForValueUnclamped (double value) const =0
 Return the position that maps to the given value, rounding to the nearest position, without clamping. More...
 
virtual double getValueForPosition (int position) const =0
 Return the value mapped from the given position, clamping to the minimum and maximum extents of the mapper's value range. More...
 
virtual double getValueForPositionUnclamped (int position) const =0
 Return the value mapped from the given position, without clamping. More...
 
virtual QString getUnit () const
 Get the unit of the mapper's value range. More...
 
virtual QString getLabel (int) const
 The mapper may optionally provide special labels for one or more individual positions (such as the minimum position, the default, or indeed all positions). More...
 

Detailed Description

Definition at line 24 of file RangeMapper.h.

Constructor & Destructor Documentation

virtual RangeMapper::~RangeMapper ( )
inlinevirtual

Member Function Documentation

virtual int RangeMapper::getPositionForValue ( double  value) const
pure virtual

Return the position that maps to the given value, rounding to the nearest position and clamping to the minimum and maximum extents of the mapper's positional range.

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by PropertyContainer::convertPropertyStrings(), AutoRangeMapper::getPositionForValue(), AutoRangeMapper::getType(), and ~RangeMapper().

virtual int RangeMapper::getPositionForValueUnclamped ( double  value) const
pure virtual

Return the position that maps to the given value, rounding to the nearest position, without clamping.

That is, whatever mapping function is in use will be projected even outside the minimum and maximum extents of the mapper's positional range. (The mapping outside that range is not guaranteed to be exact, except if the mapper is a linear one.)

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by AutoRangeMapper::getPositionForValueUnclamped(), AutoRangeMapper::getType(), and ~RangeMapper().

virtual double RangeMapper::getValueForPosition ( int  position) const
pure virtual

Return the value mapped from the given position, clamping to the minimum and maximum extents of the mapper's value range.

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by AutoRangeMapper::getType(), AutoRangeMapper::getValueForPosition(), and ~RangeMapper().

virtual double RangeMapper::getValueForPositionUnclamped ( int  position) const
pure virtual

Return the value mapped from the given position, without clamping.

That is, whatever mapping function is in use will be projected even outside the minimum and maximum extents of the mapper's value range. (The mapping outside that range is not guaranteed to be exact, except if the mapper is a linear one.)

Implemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Referenced by AutoRangeMapper::getType(), AutoRangeMapper::getValueForPositionUnclamped(), and ~RangeMapper().

virtual QString RangeMapper::getUnit ( ) const
inlinevirtual

Get the unit of the mapper's value range.

Reimplemented in AutoRangeMapper, InterpolatingRangeMapper, LogRangeMapper, and LinearRangeMapper.

Definition at line 64 of file RangeMapper.h.

virtual QString RangeMapper::getLabel ( int  ) const
inlinevirtual

The mapper may optionally provide special labels for one or more individual positions (such as the minimum position, the default, or indeed all positions).

These should be used in any display context in preference to just showing the numerical value for the position. If a position has such a label, return it here.

Reimplemented in LinearRangeMapper.

Definition at line 74 of file RangeMapper.h.

Referenced by LinearRangeMapper::getUnit().


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