123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547 |
- .TH "QwtAbstractScale" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- QwtAbstractScale \- An abstract base class for widgets having a scale\&.
- .SH SYNOPSIS
- .br
- .PP
- .PP
- \fC#include <qwt_abstract_scale\&.h>\fP
- .PP
- Inherits QWidget\&.
- .PP
- Inherited by \fBQwtAbstractSlider\fP, and \fBQwtThermo\fP\&.
- .SS "Public Member Functions"
- .in +1c
- .ti -1c
- .RI "\fBQwtAbstractScale\fP (QWidget *parent=NULL)"
- .br
- .ti -1c
- .RI "virtual \fB~QwtAbstractScale\fP ()"
- .br
- .RI "Destructor\&. "
- .ti -1c
- .RI "void \fBsetScale\fP (double \fBlowerBound\fP, double \fBupperBound\fP)"
- .br
- .RI "Specify a scale\&. "
- .ti -1c
- .RI "void \fBsetScale\fP (const \fBQwtInterval\fP &)"
- .br
- .RI "Specify a scale\&. "
- .ti -1c
- .RI "void \fBsetScale\fP (const \fBQwtScaleDiv\fP &)"
- .br
- .RI "Specify a scale\&. "
- .ti -1c
- .RI "const \fBQwtScaleDiv\fP & \fBscaleDiv\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetLowerBound\fP (double value)"
- .br
- .ti -1c
- .RI "double \fBlowerBound\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetUpperBound\fP (double value)"
- .br
- .ti -1c
- .RI "double \fBupperBound\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetScaleStepSize\fP (double stepSize)"
- .br
- .RI "Set the step size used for calculating a scale division\&. "
- .ti -1c
- .RI "double \fBscaleStepSize\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetScaleMaxMajor\fP (int ticks)"
- .br
- .RI "Set the maximum number of major tick intervals\&. "
- .ti -1c
- .RI "int \fBscaleMaxMinor\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetScaleMaxMinor\fP (int ticks)"
- .br
- .RI "Set the maximum number of minor tick intervals\&. "
- .ti -1c
- .RI "int \fBscaleMaxMajor\fP () const"
- .br
- .ti -1c
- .RI "void \fBsetScaleEngine\fP (\fBQwtScaleEngine\fP *)"
- .br
- .RI "Set a scale engine\&. "
- .ti -1c
- .RI "const \fBQwtScaleEngine\fP * \fBscaleEngine\fP () const"
- .br
- .ti -1c
- .RI "\fBQwtScaleEngine\fP * \fBscaleEngine\fP ()"
- .br
- .ti -1c
- .RI "int \fBtransform\fP (double) const"
- .br
- .ti -1c
- .RI "double \fBinvTransform\fP (int) const"
- .br
- .ti -1c
- .RI "bool \fBisInverted\fP () const"
- .br
- .ti -1c
- .RI "double \fBminimum\fP () const"
- .br
- .ti -1c
- .RI "double \fBmaximum\fP () const"
- .br
- .ti -1c
- .RI "const \fBQwtScaleMap\fP & \fBscaleMap\fP () const"
- .br
- .in -1c
- .SS "Protected Member Functions"
- .in +1c
- .ti -1c
- .RI "void \fBrescale\fP (double \fBlowerBound\fP, double \fBupperBound\fP, double stepSize)"
- .br
- .ti -1c
- .RI "void \fBsetAbstractScaleDraw\fP (\fBQwtAbstractScaleDraw\fP *)"
- .br
- .RI "Set a scale draw\&. "
- .ti -1c
- .RI "const \fBQwtAbstractScaleDraw\fP * \fBabstractScaleDraw\fP () const"
- .br
- .ti -1c
- .RI "\fBQwtAbstractScaleDraw\fP * \fBabstractScaleDraw\fP ()"
- .br
- .ti -1c
- .RI "virtual void \fBscaleChange\fP ()"
- .br
- .RI "Notify changed scale\&. "
- .in -1c
- .SH "Detailed Description"
- .PP
- An abstract base class for widgets having a scale\&.
- The scale of an \fBQwtAbstractScale\fP is determined by a \fBQwtScaleDiv\fP definition, that contains the boundaries and the ticks of the scale\&. The scale is painted using a \fBQwtScaleDraw\fP object\&.
- .PP
- The scale division might be assigned explicitly - but usually it is calculated from the boundaries using a \fBQwtScaleEngine\fP\&.
- .PP
- The scale engine also decides the type of transformation of the scale ( linear, logarithmic \&.\&.\&. )\&.
- .SH "Constructor & Destructor Documentation"
- .PP
- .SS "QwtAbstractScale::QwtAbstractScale (QWidget * parent = \fCNULL\fP)"
- Constructor
- .PP
- \fBParameters\fP
- .RS 4
- \fIparent\fP Parent widget
- .RE
- .PP
- Creates a default \fBQwtScaleDraw\fP and a \fBQwtLinearScaleEngine\fP\&. The initial scale boundaries are set to [ 0\&.0, 100\&.0 ]
- .PP
- The \fBscaleStepSize()\fP is initialized to 0\&.0, \fBscaleMaxMajor()\fP to 5 and scaleMaxMajor to 3\&.
- .SH "Member Function Documentation"
- .PP
- .SS "\fBQwtAbstractScaleDraw\fP * QwtAbstractScale::abstractScaleDraw ()\fC [protected]\fP"
- .PP
- \fBReturns\fP
- .RS 4
- Scale draw
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetAbstractScaleDraw()\fP
- .RE
- .PP
- .SS "const \fBQwtAbstractScaleDraw\fP * QwtAbstractScale::abstractScaleDraw () const\fC [protected]\fP"
- .PP
- \fBReturns\fP
- .RS 4
- Scale draw
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetAbstractScaleDraw()\fP
- .RE
- .PP
- .SS "double QwtAbstractScale::invTransform (int value) const"
- Translate a widget coordinate into a scale value
- .PP
- \fBParameters\fP
- .RS 4
- \fIvalue\fP Widget coordinate
- .RE
- .PP
- \fBReturns\fP
- .RS 4
- Corresponding scale coordinate for value
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBscaleMap()\fP, \fBtransform()\fP
- .RE
- .PP
- .SS "bool QwtAbstractScale::isInverted () const"
- .PP
- \fBReturns\fP
- .RS 4
- True, when the scale is increasing in opposite direction to the widget coordinates
- .RE
- .PP
- .SS "double QwtAbstractScale::lowerBound () const"
- .PP
- \fBReturns\fP
- .RS 4
- Lower bound of the scale
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetLowerBound()\fP, \fBsetScale()\fP, \fBupperBound()\fP
- .RE
- .PP
- .SS "double QwtAbstractScale::maximum () const"
- .PP
- \fBReturns\fP
- .RS 4
- The boundary with the larger value
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBminimum()\fP, \fBlowerBound()\fP, \fBupperBound()\fP
- .RE
- .PP
- .SS "double QwtAbstractScale::minimum () const"
- .PP
- \fBReturns\fP
- .RS 4
- The boundary with the smaller value
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBmaximum()\fP, \fBlowerBound()\fP, \fBupperBound()\fP
- .RE
- .PP
- .SS "void QwtAbstractScale::rescale (double lowerBound, double upperBound, double stepSize)\fC [protected]\fP"
- Recalculate the scale division and update the scale\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIlowerBound\fP Lower limit of the scale interval
- .br
- \fIupperBound\fP Upper limit of the scale interval
- .br
- \fIstepSize\fP Major step size
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBscaleChange()\fP
- .RE
- .PP
- .SS "const \fBQwtScaleDiv\fP & QwtAbstractScale::scaleDiv () const"
- .PP
- \fBReturns\fP
- .RS 4
- Scale boundaries and positions of the ticks
- .RE
- .PP
- The scale division might have been assigned explicitly or calculated implicitly by \fBrescale()\fP\&.
- .SS "\fBQwtScaleEngine\fP * QwtAbstractScale::scaleEngine ()"
- .PP
- \fBReturns\fP
- .RS 4
- Scale engine
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetScaleEngine()\fP
- .RE
- .PP
- .SS "const \fBQwtScaleEngine\fP * QwtAbstractScale::scaleEngine () const"
- .PP
- \fBReturns\fP
- .RS 4
- Scale engine
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetScaleEngine()\fP
- .RE
- .PP
- .SS "const \fBQwtScaleMap\fP & QwtAbstractScale::scaleMap () const"
- .PP
- \fBReturns\fP
- .RS 4
- Map to translate between scale and widget coordinates
- .RE
- .PP
- .SS "int QwtAbstractScale::scaleMaxMajor () const"
- .PP
- \fBReturns\fP
- .RS 4
- Maximal number of major tick intervals
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetScaleMaxMajor()\fP, \fBscaleMaxMinor()\fP
- .RE
- .PP
- .SS "int QwtAbstractScale::scaleMaxMinor () const"
- .PP
- \fBReturns\fP
- .RS 4
- Maximal number of minor tick intervals
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetScaleMaxMinor()\fP, \fBscaleMaxMajor()\fP
- .RE
- .PP
- .SS "double QwtAbstractScale::scaleStepSize () const"
- .PP
- \fBReturns\fP
- .RS 4
- Hint for the step size of the scale
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP
- .RE
- .PP
- .SS "void QwtAbstractScale::setAbstractScaleDraw (\fBQwtAbstractScaleDraw\fP * scaleDraw)\fC [protected]\fP"
- .PP
- Set a scale draw\&. scaleDraw has to be created with new and will be deleted in the destructor or the next call of \fBsetAbstractScaleDraw()\fP\&.
- .PP
- \fBSee also\fP
- .RS 4
- \fBabstractScaleDraw()\fP
- .RE
- .PP
- .SS "void QwtAbstractScale::setLowerBound (double value)"
- Set the lower bound of the scale
- .PP
- \fBParameters\fP
- .RS 4
- \fIvalue\fP Lower bound
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBlowerBound()\fP, \fBsetScale()\fP, \fBsetUpperBound()\fP
- .RE
- .PP
- \fBNote\fP
- .RS 4
- For inverted scales the lower bound is greater than the upper bound
- .RE
- .PP
- .SS "void QwtAbstractScale::setScale (const \fBQwtInterval\fP & interval)"
- .PP
- Specify a scale\&. Define a scale by an interval
- .PP
- The ticks are calculated using \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIinterval\fP Interval
- .RE
- .PP
- .SS "void QwtAbstractScale::setScale (const \fBQwtScaleDiv\fP & scaleDiv)"
- .PP
- Specify a scale\&. \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP and have no effect\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIscaleDiv\fP Scale division
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- setAutoScale()
- .RE
- .PP
- .SS "void QwtAbstractScale::setScale (double lowerBound, double upperBound)"
- .PP
- Specify a scale\&. Define a scale by an interval
- .PP
- The ticks are calculated using \fBscaleMaxMinor()\fP, \fBscaleMaxMajor()\fP and \fBscaleStepSize()\fP\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIlowerBound\fP lower limit of the scale interval
- .br
- \fIupperBound\fP upper limit of the scale interval
- .RE
- .PP
- \fBNote\fP
- .RS 4
- For inverted scales the lower bound is greater than the upper bound
- .RE
- .PP
- .SS "void QwtAbstractScale::setScaleEngine (\fBQwtScaleEngine\fP * scaleEngine)"
- .PP
- Set a scale engine\&. The scale engine is responsible for calculating the scale division and provides a transformation between scale and widget coordinates\&.
- .PP
- scaleEngine has to be created with new and will be deleted in the destructor or the next call of setScaleEngine\&.
- .SS "void QwtAbstractScale::setScaleMaxMajor (int ticks)"
- .PP
- 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\&.
- .PP
- The default value is 5\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIticks\fP Maximal number of major ticks\&.
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBscaleMaxMajor()\fP, \fBsetScaleMaxMinor()\fP, \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideInterval()\fP
- .RE
- .PP
- .SS "void QwtAbstractScale::setScaleMaxMinor (int ticks)"
- .PP
- 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\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIticks\fP Maximal number of minor ticks\&.
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBscaleMaxMajor()\fP, \fBsetScaleMaxMinor()\fP, \fBsetScaleStepSize()\fP, \fBQwtScaleEngine::divideInterval()\fP
- .RE
- .PP
- .SS "void QwtAbstractScale::setScaleStepSize (double stepSize)"
- .PP
- 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\&.
- .PP
- \fBParameters\fP
- .RS 4
- \fIstepSize\fP Hint for the step size of the scale
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBscaleStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP
- .RE
- .PP
- \fBNote\fP
- .RS 4
- Position and distance between the major ticks also depends on \fBscaleMaxMajor()\fP\&.
- .RE
- .PP
- .SS "void QwtAbstractScale::setUpperBound (double value)"
- Set the upper bound of the scale
- .PP
- \fBParameters\fP
- .RS 4
- \fIvalue\fP Upper bound
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBupperBound()\fP, \fBsetScale()\fP, \fBsetLowerBound()\fP
- .RE
- .PP
- \fBNote\fP
- .RS 4
- For inverted scales the lower bound is greater than the upper bound
- .RE
- .PP
- .SS "int QwtAbstractScale::transform (double value) const"
- Translate a scale value into a widget coordinate
- .PP
- \fBParameters\fP
- .RS 4
- \fIvalue\fP Scale value
- .RE
- .PP
- \fBReturns\fP
- .RS 4
- Corresponding widget coordinate for value
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBscaleMap()\fP, \fBinvTransform()\fP
- .RE
- .PP
- .SS "double QwtAbstractScale::upperBound () const"
- .PP
- \fBReturns\fP
- .RS 4
- Upper bound of the scale
- .RE
- .PP
- \fBSee also\fP
- .RS 4
- \fBsetUpperBound()\fP, \fBsetScale()\fP, \fBlowerBound()\fP
- .RE
- .PP
- .SH "Author"
- .PP
- Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
|