Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos protegidos
Referencia de la Clase QwtDoubleRange

A class which controls a value within an interval. Más...

#include <qwt_double_range.h>

Diagrama de herencias de QwtDoubleRange
QwtAbstractSlider QwtCounter QwtDial QwtKnob QwtSlider QwtWheel QwtAnalogClock QwtCompass

Lista de todos los miembros.

Métodos públicos

 QwtDoubleRange ()
virtual ~QwtDoubleRange ()
 Destroys the QwtDoubleRange.
void setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1)
 Specify range and step size.
void setValid (bool)
 Set the value to be valid/invalid.
bool isValid () const
 Indicates if the value is valid.
virtual void setValue (double)
 Set a new value without adjusting to the step raster.
double value () const
 Returns the current value.
void setPeriodic (bool tf)
 Make the range periodic.
bool periodic () const
 Returns true if the range is periodic.
void setStep (double)
 Change the step raster.
double step () const
double maxValue () const
 Returns the value of the second border of the range.
double minValue () const
 Returns the value at the first border of the range.
int pageSize () const
 Returns the page size in steps.
virtual void incValue (int)
 Increment the value by a specified number of steps.
virtual void incPages (int)
 Increment the value by a specified number of pages.
virtual void fitValue (double)
 Adjust the value to the closest point in the step raster.

Métodos protegidos

double exactValue () const
 Returns the exact value.
double exactPrevValue () const
 Returns the exact previous value.
double prevValue () const
 Returns the previous value.
virtual void valueChange ()
 Notify a change of value.
virtual void stepChange ()
 Notify a change of the step size.
virtual void rangeChange ()
 Notify a change of the range.

Descripción detallada

A class which controls a value within an interval.

This class is useful as a base class or a member for sliders. It represents an interval of type double within which a value can be moved. The value can be either an arbitrary point inside the interval (see QwtDoubleRange::setValue), or it can be fitted into a step raster (see QwtDoubleRange::fitValue and QwtDoubleRange::incValue).

As a special case, a QwtDoubleRange can be periodic, which means that a value outside the interval will be mapped to a value inside the interval when QwtDoubleRange::setValue(), QwtDoubleRange::fitValue(), QwtDoubleRange::incValue() or QwtDoubleRange::incPages() are called.


Documentación del constructor y destructor

QwtDoubleRange::QwtDoubleRange ( )

The range is initialized to [0.0, 100.0], the step size to 1.0, and the value to 0.0.

QwtDoubleRange::~QwtDoubleRange ( ) [virtual]

Destroys the QwtDoubleRange.


Documentación de las funciones miembro

double QwtDoubleRange::exactPrevValue ( ) const [protected]

Returns the exact previous value.

double QwtDoubleRange::exactValue ( ) const [protected]

Returns the exact value.

The exact value is the value which QwtDoubleRange::value would return if the value were not adjusted to the step raster. It differs from the current value only if QwtDoubleRange::fitValue or QwtDoubleRange::incValue have been used before. This function is intended for internal use in derived classes.

void QwtDoubleRange::fitValue ( double  x) [virtual]

Adjust the value to the closest point in the step raster.

Parámetros:
xvalue
Atención:
The value is clipped when it lies outside the range. When the range is QwtDoubleRange::periodic, it will be mapped to a point in the interval such that
new value := x + n * (max. value - min. value)
with an integer number n.

Reimplementado en QwtAbstractSlider.

void QwtDoubleRange::incPages ( int  nPages) [virtual]

Increment the value by a specified number of pages.

Parámetros:
nPagesNumber of pages to increment. A negative number decrements the value.
Atención:
The Page size is specified in the constructor.
void QwtDoubleRange::incValue ( int  nSteps) [virtual]

Increment the value by a specified number of steps.

Parámetros:
nStepsNumber of steps to increment
Atención:
As a result of this operation, the new value will always be adjusted to the step raster.

Reimplementado en QwtAbstractSlider.

bool QwtDoubleRange::isValid ( void  ) const

Indicates if the value is valid.

Reimplementado en QwtAbstractSlider.

double QwtDoubleRange::maxValue ( ) const

Returns the value of the second border of the range.

maxValue returns the value which has been specified as the second parameter in QwtDoubleRange::setRange.

Ver también:
QwtDoubleRange::setRange()
double QwtDoubleRange::minValue ( ) const

Returns the value at the first border of the range.

minValue returns the value which has been specified as the first parameter in setRange().

Ver también:
QwtDoubleRange::setRange()
int QwtDoubleRange::pageSize ( ) const

Returns the page size in steps.

bool QwtDoubleRange::periodic ( ) const

Returns true if the range is periodic.

Ver también:
QwtDoubleRange::setPeriodic()
double QwtDoubleRange::prevValue ( ) const [protected]

Returns the previous value.

void QwtDoubleRange::rangeChange ( ) [protected, virtual]

Notify a change of the range.

This virtual function is called whenever the range changes. The default implementation does nothing.

Reimplementado en QwtCounter, QwtDial y QwtSlider.

void QwtDoubleRange::setPeriodic ( bool  tf)

Make the range periodic.

When the range is periodic, the value will be set to a point inside the interval such that

point = value + n * width 

if the user tries to set a new value which is outside the range. If the range is nonperiodic (the default), values outside the range will be clipped.

Parámetros:
tftrue for a periodic range
void QwtDoubleRange::setRange ( double  vmin,
double  vmax,
double  vstep = 0.0,
int  pageSize = 1 
)

Specify range and step size.

Parámetros:
vminlower boundary of the interval
vmaxhigher boundary of the interval
vstepstep width
pageSizepage size in steps
Atención:
  • A change of the range changes the value if it lies outside the new range. The current value will *not* be adjusted to the new step raster.
  • vmax < vmin is allowed.
  • If the step size is left out or set to zero, it will be set to 1/100 of the interval length.
  • If the step size has an absurd value, it will be corrected to a better one.
void QwtDoubleRange::setStep ( double  vstep)

Change the step raster.

Parámetros:
vstepnew step width
Atención:
The value will not be adjusted to the new step raster.

Reimplementado en QwtCounter.

void QwtDoubleRange::setValid ( bool  isValid)

Set the value to be valid/invalid.

Reimplementado en QwtAbstractSlider.

void QwtDoubleRange::setValue ( double  x) [virtual]

Set a new value without adjusting to the step raster.

Parámetros:
xnew value
Atención:
The value is clipped when it lies outside the range. When the range is QwtDoubleRange::periodic, it will be mapped to a point in the interval such that
new value := x + n * (max. value - min. value)
with an integer number n.

Reimplementado en QwtAbstractSlider y QwtCounter.

double QwtDoubleRange::step ( ) const
Devuelve:
the step size
Ver también:
QwtDoubleRange::setStep, QwtDoubleRange::setRange

Reimplementado en QwtCounter.

void QwtDoubleRange::stepChange ( ) [protected, virtual]

Notify a change of the step size.

This virtual function is called whenever the step size changes. The default implementation does nothing.

double QwtDoubleRange::value ( ) const

Returns the current value.

Reimplementado en QwtCounter.

void QwtDoubleRange::valueChange ( ) [protected, virtual]

Notify a change of value.

This virtual function is called whenever the value changes. The default implementation does nothing.

Reimplementado en QwtAbstractSlider, QwtDial, QwtSlider y QwtWheel.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'