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

Base class for scale engines. Más...

#include <qwt_scale_engine.h>

Diagrama de herencias de QwtScaleEngine
QwtLinearScaleEngine QwtLog10ScaleEngine

Lista de todos los miembros.

Clases

class  PrivateData

Tipos públicos

enum  Attribute {
  NoAttribute = 0, IncludeReference = 1, Symmetric = 2, Floating = 4,
  Inverted = 8
}
 see QwtScaleEngine::setAttribute, testAttribute Más...

Métodos públicos

 QwtScaleEngine ()
 Ctor.
virtual ~QwtScaleEngine ()
 Dtor.
void setAttribute (Attribute, bool on=true)
bool testAttribute (Attribute) const
void setAttributes (int)
int attributes () const
void setReference (double reference)
 Specify a reference point.
double reference () const
void setMargins (double m1, double m2)
 Specify margins at the scale's endpoints.
double loMargin () const
double hiMargin () const
virtual void autoScale (int maxNumSteps, double &x1, double &x2, double &stepSize) const =0
virtual QwtScaleDiv divideScale (double x1, double x2, int maxMajSteps, int maxMinSteps, double stepSize=0.0) const =0
 Calculate a scale division.
virtual QwtScaleTransformationtransformation () const =0

Métodos protegidos

bool contains (const QwtDoubleInterval &, double val) const
QwtValueList strip (const QwtValueList &, const QwtDoubleInterval &) const
double divideInterval (double interval, int numSteps) const
QwtDoubleInterval buildInterval (double v) const
 Build an interval for a value.

Descripción detallada

Base class for scale engines.

A scale engine trys to find "reasonable" ranges and step sizes for scales.

The layout of the scale can be varied with setAttribute().

Qwt offers implementations for logarithmic (log10) and linear scales. Contributions for other types of scale engines (date/time, log2 ... ) are welcome.


Documentación de las enumeraciones miembro de la clase

see QwtScaleEngine::setAttribute, testAttribute

Valores de enumeraciones:
NoAttribute 
IncludeReference 
Symmetric 
Floating 
Inverted 

Documentación del constructor y destructor

QwtScaleEngine::QwtScaleEngine ( ) [explicit]

Ctor.

QwtScaleEngine::~QwtScaleEngine ( ) [virtual]

Dtor.


Documentación de las funciones miembro

int QwtScaleEngine::attributes ( ) const

Return the scale attributes

virtual void QwtScaleEngine::autoScale ( int  maxNumSteps,
double &  x1,
double &  x2,
double &  stepSize 
) const [pure virtual]

Align and divide an interval

Parámetros:
maxNumStepsMax. number of steps
x1First limit of the interval (In/Out)
x2Second limit of the interval (In/Out)
stepSizeStep size (Return value)

Implementado en QwtLinearScaleEngine y QwtLog10ScaleEngine.

QwtDoubleInterval QwtScaleEngine::buildInterval ( double  v) const [protected]

Build an interval for a value.

In case of v == 0.0 the interval is [-0.5, 0.5], otherwide it is [0.5 * v, 1.5 * v]

bool QwtScaleEngine::contains ( const QwtDoubleInterval interval,
double  value 
) const [protected]

Check if an interval "contains" a value

Parámetros:
intervalInterval
valueValue
Ver también:
QwtScaleArithmetic::compareEps
double QwtScaleEngine::divideInterval ( double  intervalSize,
int  numSteps 
) const [protected]

Calculate a step size for an interval size

Parámetros:
intervalSizeInterval size
numStepsNumber of steps
Devuelve:
Step size
virtual QwtScaleDiv QwtScaleEngine::divideScale ( double  x1,
double  x2,
int  maxMajSteps,
int  maxMinSteps,
double  stepSize = 0.0 
) const [pure virtual]

Calculate a scale division.

Parámetros:
x1First interval limit
x2Second interval limit
maxMajStepsMaximum for the number of major steps
maxMinStepsMaximum number of minor steps
stepSizeStep size. If stepSize == 0.0, the scaleEngine calculates one.

Implementado en QwtLinearScaleEngine y QwtLog10ScaleEngine.

double QwtScaleEngine::hiMargin ( ) const
Devuelve:
the margin at the upper end of the scale The default margin is 0.
Ver también:
QwtScaleEngine::setMargins()
double QwtScaleEngine::loMargin ( ) const
Devuelve:
the margin at the lower end of the scale The default margin is 0.
Ver también:
QwtScaleEngine::setMargins()
double QwtScaleEngine::reference ( ) const
Devuelve:
the reference value
Ver también:
QwtScaleEngine::setReference(), QwtScaleEngine::setAttribute()
void QwtScaleEngine::setAttribute ( Attribute  attribute,
bool  on = true 
)

Change a scale attribute

Parámetros:
attributeAttribute to change
onOn/Off

The behaviour of the scale engine can be changed with the following attributes:

QwtScaleEngine::IncludeReference
Build a scale which includes the reference value.
QwtScaleEngine::Symmetric
Build a scale which is symmetric to the reference value.
QwtScaleEngine::Floating
The endpoints of the scale are supposed to be equal the outmost included values plus the specified margins (see setMargins()). If this attribute is not* set, the endpoints of the scale will be integer multiples of the step size.
QwtScaleEngine::Inverted
Turn the scale upside down.
Ver también:
QwtScaleEngine::testAttribute()
void QwtScaleEngine::setAttributes ( int  attributes)

Change the scale attribute

Parámetros:
attributesSet scale attributes
Ver también:
QwtScaleEngine::attributes()
void QwtScaleEngine::setMargins ( double  mlo,
double  mhi 
)

Specify margins at the scale's endpoints.

Parámetros:
mlominimum distance between the scale's lower boundary and the smallest enclosed value
mhiminimum distance between the scale's upper boundary and the greatest enclosed value

Margins can be used to leave a minimum amount of space between the enclosed intervals and the boundaries of the scale.

Atención:
Ver también:
QwtScaleEngine::hiMargin, QwtScaleEngine::loMargin
void QwtScaleEngine::setReference ( double  r)

Specify a reference point.

Parámetros:
rnew reference value

The reference point is needed if options IncludeRef or Symmetric are active. Its default value is 0.0.

QwtValueList QwtScaleEngine::strip ( const QwtValueList ticks,
const QwtDoubleInterval interval 
) const [protected]

Remove ticks from a list, that are not inside an interval

Parámetros:
ticksTick list
intervalInterval
Devuelve:
Stripped tick list
bool QwtScaleEngine::testAttribute ( Attribute  attribute) const

Check if a attribute is set.

Parámetros:
attributeAttribute to be tested
Ver también:
QwtScaleEngine::setAttribute() for a description of the possible options.
virtual QwtScaleTransformation* QwtScaleEngine::transformation ( ) const [pure virtual]
Devuelve:
a transformation

Implementado en QwtLinearScaleEngine y QwtLog10ScaleEngine.


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'