- bookworm 6.1.4-2
- testing 6.1.4-2
- unstable 6.1.4-2
- experimental 6.2.0-1
QwtAbstractScale(3) | Qwt User's Guide | QwtAbstractScale(3) |
NAME¶
QwtAbstractScale - An abstract base class for widgets having a scale.
SYNOPSIS¶
#include <qwt_abstract_scale.h>
Inherits QWidget.
Inherited by QwtAbstractSlider, and QwtThermo.
Public Member Functions¶
QwtAbstractScale (QWidget *parent=NULL)
virtual ~QwtAbstractScale ()
Destructor. void setScale (double lowerBound, double
upperBound)
Specify a scale. void setScale (const QwtInterval &)
Specify a scale. void setScale (const QwtScaleDiv &)
Specify a scale. const QwtScaleDiv & scaleDiv () const
void setLowerBound (double value)
double lowerBound () const
void setUpperBound (double value)
double upperBound () const
void setScaleStepSize (double stepSize)
Set the step size used for calculating a scale division. double
scaleStepSize () const
void setScaleMaxMajor (int ticks)
Set the maximum number of major tick intervals. int scaleMaxMinor ()
const
void setScaleMaxMinor (int ticks)
Set the maximum number of minor tick intervals. int scaleMaxMajor ()
const
void setScaleEngine (QwtScaleEngine *)
Set a scale engine. const QwtScaleEngine * scaleEngine () const
QwtScaleEngine * scaleEngine ()
int transform (double) const
double invTransform (int) const
bool isInverted () const
double minimum () const
double maximum () const
const QwtScaleMap & scaleMap () const
Protected Member Functions¶
void rescale (double lowerBound, double
upperBound, double stepSize)
void setAbstractScaleDraw (QwtAbstractScaleDraw *)
Set a scale draw. const QwtAbstractScaleDraw * abstractScaleDraw
() const
QwtAbstractScaleDraw * abstractScaleDraw ()
virtual void scaleChange ()
Notify changed scale.
Detailed Description¶
An abstract base class for widgets having a scale.
The scale of an QwtAbstractScale is determined by a QwtScaleDiv definition, that contains the boundaries and the ticks of the scale. The scale is painted using a QwtScaleDraw object.
The scale division might be assigned explicitly - but usually it is calculated from the boundaries using a QwtScaleEngine.
The scale engine also decides the type of transformation of the scale ( linear, logarithmic ... ).
Constructor & Destructor Documentation¶
QwtAbstractScale::QwtAbstractScale (QWidget * parent = NULL)¶
Constructor
Parameters:
Creates a default QwtScaleDraw and a QwtLinearScaleEngine. The initial scale boundaries are set to [ 0.0, 100.0 ]
The scaleStepSize() is initialized to 0.0, scaleMaxMajor() to 5 and scaleMaxMajor to 3.
Member Function Documentation¶
const QwtAbstractScaleDraw * QwtAbstractScale::abstractScaleDraw () const [protected]¶
Returns:
See also:
QwtAbstractScaleDraw * QwtAbstractScale::abstractScaleDraw () [protected]¶
Returns:
See also:
double QwtAbstractScale::invTransform (int value) const¶
Translate a widget coordinate into a scale value
Parameters:
Returns:
See also:
bool QwtAbstractScale::isInverted () const¶
Returns:
double QwtAbstractScale::lowerBound () const¶
Returns:
See also:
double QwtAbstractScale::maximum () const¶
Returns:
See also:
double QwtAbstractScale::minimum () const¶
Returns:
See also:
void QwtAbstractScale::rescale (double lowerBound, double upperBound, double stepSize) [protected]¶
Recalculate the scale division and update the scale.
Parameters:
upperBound Upper limit of the scale interval
stepSize Major step size
See also:
const QwtScaleDiv & QwtAbstractScale::scaleDiv () const¶
Returns:
The scale division might have been assigned explicitly or calculated implicitly by rescale().
const QwtScaleEngine * QwtAbstractScale::scaleEngine () const¶
Returns:
See also:
QwtScaleEngine * QwtAbstractScale::scaleEngine ()¶
Returns:
See also:
const QwtScaleMap & QwtAbstractScale::scaleMap () const¶
Returns:
int QwtAbstractScale::scaleMaxMajor () const¶
Returns:
See also:
int QwtAbstractScale::scaleMaxMinor () const¶
Returns:
See also:
double QwtAbstractScale::scaleStepSize () const¶
Returns:
See also:
void QwtAbstractScale::setAbstractScaleDraw (QwtAbstractScaleDraw * scaleDraw) [protected]¶
Set a scale draw. scaleDraw has to be created with new and will be deleted in the destructor or the next call of setAbstractScaleDraw().
See also:
void QwtAbstractScale::setLowerBound (double value)¶
Set the lower bound of the scale
Parameters:
See also:
Note:
void QwtAbstractScale::setScale (double lowerBound, double upperBound)¶
Specify a scale. Define a scale by an interval
The ticks are calculated using scaleMaxMinor(), scaleMaxMajor() and scaleStepSize().
Parameters:
upperBound upper limit of the scale interval
Note:
void QwtAbstractScale::setScale (const QwtInterval & interval)¶
Specify a scale. Define a scale by an interval
The ticks are calculated using scaleMaxMinor(), scaleMaxMajor() and scaleStepSize().
Parameters:
void QwtAbstractScale::setScale (const QwtScaleDiv & scaleDiv)¶
Specify a scale. scaleMaxMinor(), scaleMaxMajor() and scaleStepSize() and have no effect.
Parameters:
See also:
void QwtAbstractScale::setScaleEngine (QwtScaleEngine * scaleEngine)¶
Set a scale engine. The scale engine is responsible for calculating the scale division and provides a transformation between scale and widget coordinates.
scaleEngine has to be created with new and will be deleted in the destructor or the next call of setScaleEngine.
void QwtAbstractScale::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:
See also:
void QwtAbstractScale::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:
See also:
void QwtAbstractScale::setScaleStepSize (double stepSize)¶
Set the step size used for calculating a scale division. The step size is hint for calculating the intervals for the major ticks of the scale. A value of 0.0 is interpreted as no hint.
Parameters:
See also:
Note:
void QwtAbstractScale::setUpperBound (double value)¶
Set the upper bound of the scale
Parameters:
See also:
Note:
int QwtAbstractScale::transform (double value) const¶
Translate a scale value into a widget coordinate
Parameters:
Returns:
See also:
double QwtAbstractScale::upperBound () const¶
Returns:
See also:
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |