Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

QwtScaleIf Class Reference

An interface class for widgets containing a scale. More...

#include <qwt_sclif.h>

Inherited by QwtKnob, QwtSlider, and QwtThermo.

Inheritance diagram for QwtScaleIf

Inheritance graph
[legend]
List of all members.

Public Methods

 QwtScaleIf ()
virtual ~QwtScaleIf ()
void setScale (double vmin, double vmax, int logarithmic = 0)
void setScale (double vmin, double vmax, double step, int logarithmic = 0)
void setScale (const QwtScaleDiv &s)
void setScaleMaxMajor ( int ticks)
void setScaleMaxMinor ( int ticks)
void autoScale ()
int scaleMaxMinor () const
int scaleMaxMajor () const

Protected Methods

bool hasUserScale ()
virtual void scaleChange () = 0

Protected Attributes

QwtScaleDraw d_scale
int d_maxMajor
int d_maxMinor

Detailed Description

An interface class for widgets containing a scale.

This interface class is used to provide classes with a protected QwtScaleDraw member and a public interface to access that scale.

For internal use only.


Constructor & Destructor Documentation

QwtScaleIf::QwtScaleIf ( )
 

Constructor.

QwtScaleIf::~QwtScaleIf ( ) [virtual]
 

Destructor.


Member Function Documentation

void QwtScaleIf::autoScale ( )
 

Advise the widget to control the scale range internally.

Autoscaling is on by default.

See also:
setScale()

bool QwtScaleIf::hasUserScale ( ) [protected]
 

Check for user-defined scale.

int QwtScaleIf::scaleMaxMajor ( ) const
 

Returns:
max. number of major tick intervals

int QwtScaleIf::scaleMaxMinor ( ) const
 

Returns:
max. number of minor tick intervals

void QwtScaleIf::setScale ( const QwtScaleDiv & s )
 

Parameters:
Assign   a user-defined scale division
s   scale division

void QwtScaleIf::setScale ( double vmin,
double vmax,
double step,
int logarithmic = 0 )
 

Specify a user-defined scale.

By default, the widget is supposed to control the range of its scale automatically, but sometimes it is desirable to have a user-defined scale which is not in sync with the widget's range, e.g. if a logarithmic scale is needed (sliders don't support that) or if the scale is required to have a fixed range (say 0...100%), independent of the widget's range.

Parameters:
vmin  
vmax   interval boundaries
step   major step size
logarithmic   If != 0, build a logarithmic scale
See also:
autoScale()

void QwtScaleIf::setScale ( double vmin,
double vmax,
int logarithmic = 0 )
 

Specify a user-defined scale.

By default, the widget is supposed to control the range of its scale automatically, but sometimes it is desirable to have a user-defined scale which is not in sync with the widget's range, e.g. if a logarithmic scale is needed (sliders don't support that) or if the scale is required to have a fixed range (say 0...100%), independent of the widget's range.

Parameters:
vmin  
vmax   boundary values
logarithmic   If != 0, Build a logarithmic scale
See also:
autoScale()

void QwtScaleIf::setScaleMaxMajor ( int ticks )
 

Set the maximum number of major tick intervals.

The scale's major ticks are calculated automatically such that the number of major intervals does not exceed <ticks>. The default value is 5.

Parameters:
ticks   maximal number of major ticks.
See also:
QwtScaleDraw

void QwtScaleIf::setScaleMaxMinor ( int ticks )
 

Set the maximum number of minor tick intervals.

The scale's minor ticks are calculated automatically such that the number of minor intervals does not exceed <ticks>. The default value is 3.

Parameters:
ticks  
See also:
QwtScaleDraw


The documentation for this class was generated from the following files:
Generated at Thu Dec 14 00:27:20 2000 for Qwt User's Guide by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000