📄 qwtdblrange.3
字号:
.TH "QwtDblRange" 3 "4 Nov 2003" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtDblRange \- .SH SYNOPSIS.br.PPInherited by \fBQwtCounter\fP, and \fBQwtSliderBase\fP..PP.SH "Detailed Description".PP 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 \fBQwtDblRange::setValue\fP), or it can be fitted into a step raster (see \fBQwtDblRange::fitValue\fP and \fBQwtDblRange::incValue\fP)..PPAs a special case, a QwtDblRange can be periodic, which means that a value outside the interval will be mapped to a value inside the interval when \fBQwtDblRange::setValue()\fP, \fBQwtDblRange::fitValue()\fP, \fBQwtDblRange::incValue()\fP or \fBQwtDblRange::incPages()\fP are called. .PP.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtDblRange\fP ()".br.ti -1c.RI "virtual \fB~QwtDblRange\fP ()".br.ti -1c.RI "void \fBsetRange\fP (double vmin, double vmax, double vstep=0.0, int pagesize=1)".br.ti -1c.RI "void \fBsetValid\fP (bool)".br.ti -1c.RI "bool \fBisValid\fP () const ".br.ti -1c.RI "virtual void \fBsetValue\fP (double)".br.ti -1c.RI "double \fBvalue\fP () const ".br.ti -1c.RI "void \fBsetPeriodic\fP (bool tf)".br.ti -1c.RI "bool \fBperiodic\fP () const ".br.ti -1c.RI "void \fBsetStep\fP (double)".br.ti -1c.RI "double \fBstep\fP () const ".br.ti -1c.RI "double \fBmaxValue\fP () const ".br.ti -1c.RI "double \fBminValue\fP () const ".br.ti -1c.RI "int \fBpageSize\fP () const ".br.ti -1c.RI "virtual void \fBincValue\fP (int)".br.ti -1c.RI "virtual void \fBincPages\fP (int)".br.ti -1c.RI "virtual void \fBfitValue\fP (double)".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "double \fBexactValue\fP () const ".br.ti -1c.RI "double \fBexactPrevValue\fP () const ".br.ti -1c.RI "double \fBprevValue\fP () const ".br.ti -1c.RI "virtual void \fBvalueChange\fP ()".br.ti -1c.RI "virtual void \fBstepChange\fP ()".br.ti -1c.RI "virtual void \fBrangeChange\fP ()".br.in -1c.SH "Constructor & Destructor Documentation".PP .SS "QwtDblRange::QwtDblRange ()".PPThe range is initialized to [0.0, 100.0], the step size to 1.0, and the value to 0.0. .SS "QwtDblRange::~\fBQwtDblRange\fP ()\fC [virtual]\fP".PPDestroys the QwtDblRange. .SH "Member Function Documentation".PP .SS "double QwtDblRange::exactPrevValue () const\fC [protected]\fP".PPReturns the exact previous value. .SS "double QwtDblRange::exactValue () const\fC [protected]\fP".PPReturns the exact value. The exact value is the value which \fBQwtDblRange::value\fP would return if the value were not adjusted to the step raster. It differs from the current value only if \fBQwtDblRange::fitValue\fP or \fBQwtDblRange::incValue\fP have been used before. This function is intended for internal use in derived classes. .SS "void QwtDblRange::fitValue (double x)\fC [virtual]\fP".PPAdjust the value to the closest point in the step raster. \fBParameters:\fP.RS 4\fIx\fP value .RE.PP\fBWarning:\fP.RS 4The value is clipped when it lies outside the range. When the range is \fBQwtDblRange::periodic\fP, it will be mapped to a point in the interval such that .PP.nf new value := x + n * (max. value - min. value).PPwith an integer number n. .RE.PPReimplemented in \fBQwtSliderBase\fP..SS "void QwtDblRange::incPages (int nPages)\fC [virtual]\fP".PPIncrement the value by a specified number of pages. \fBParameters:\fP.RS 4\fInPages\fP Number of pages to increment. A negative number decrements the value. .RE.PP\fBWarning:\fP.RS 4The Page size is specified in the constructor. .RE.PP.SS "void QwtDblRange::incValue (int nSteps)\fC [virtual]\fP".PPIncrement the value by a specified number of steps. \fBParameters:\fP.RS 4\fInSteps\fP Number of steps to increment .RE.PP\fBWarning:\fP.RS 4As a result of this operation, the new value will always be adjusted to the step raster. .RE.PPReimplemented in \fBQwtSliderBase\fP..SS "bool QwtDblRange::isValid () const".PPIndicates if the value is valid. Reimplemented in \fBQwtSliderBase\fP..SS "double QwtDblRange::maxValue () const".PPReturns the value of the second border of the range. maxValue returns the value which has been specified as the second parameter in \fBQwtDblRange::setRange\fP..PP\fBSee also:\fP.RS 4\fBQwtDblRange::setRange()\fP .RE.PP.SS "double QwtDblRange::minValue () const".PPReturns the value at the first border of the range. minValue returns the value which has been specified as the first parameter in \fBsetRange()\fP..PP\fBSee also:\fP.RS 4\fBQwtDblRange::setRange()\fP .RE.PP.SS "int QwtDblRange::pageSize () const".PPReturns the page size in steps. .SS "bool QwtDblRange::periodic () const".PPReturns TRUE if the range is periodic. \fBSee also:\fP.RS 4\fBQwtDblRange::setPeriodic()\fP .RE.PP.SS "double QwtDblRange::prevValue () const\fC [protected]\fP".PPReturns the previous value. .SS "void QwtDblRange::rangeChange ()\fC [protected, virtual]\fP".PPNotify a change of the range. This virtual function is called whenever the range changes. The default implementation does nothing. Reimplemented in \fBQwtCounter\fP, \fBQwtDial\fP, and \fBQwtSlider\fP..SS "void QwtDblRange::setPeriodic (bool tf)".PPMake the range periodic. When the range is periodic, the value will be set to a point inside the interval such that.PP.PP.nf point = value + n * width .PP.PPif 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..PP\fBParameters:\fP.RS 4\fItf\fP TRUE for a periodic range .RE.PP.SS "void QwtDblRange::setRange (double vmin, double vmax, double vstep = 0.0, int pageSize = 1)".PPSpecify range and step size. \fBParameters:\fP.RS 4\fIvmin\fP lower boundary of the interval .br\fIvmax\fP higher boundary of the interval .br\fIvstep\fP step width .br\fIpageSize\fP page size in steps .RE.PP\fBWarning:\fP.RS 4.IP "\(bu" 2A 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. .IP "\(bu" 2vmax < vmin is allowed. .IP "\(bu" 2If the step size is left out or set to zero, it will be set to 1/100 of the interval length. .IP "\(bu" 2If the step size has an absurd value, it will be corrected to a better one. .PP.RE.PP.SS "void QwtDblRange::setStep (double vstep)".PPChange the step raster. \fBParameters:\fP.RS 4\fIvstep\fP new step width .RE.PP\fBWarning:\fP.RS 4The value will \fInot\fP be adjusted to the new step raster. .RE.PPReimplemented in \fBQwtCounter\fP..SS "void QwtDblRange::setValid (bool)".PPSet the value to be valid/invalid. Reimplemented in \fBQwtSliderBase\fP..SS "void QwtDblRange::setValue (double x)\fC [virtual]\fP".PPSet a new value without adjusting to the step raster. \fBParameters:\fP.RS 4\fIx\fP new value .RE.PP\fBWarning:\fP.RS 4The value is clipped when it lies outside the range. When the range is \fBQwtDblRange::periodic\fP, it will be mapped to a point in the interval such that .PP.nf new value := x + n * (max. value - min. value).PPwith an integer number n. .RE.PPReimplemented in \fBQwtCounter\fP, and \fBQwtSliderBase\fP..SS "double QwtDblRange::step () const".PP\fBReturns:\fP.RS 4the step size .RE.PP\fBSee also:\fP.RS 4\fBQwtDblRange::setStep\fP, \fBQwtDblRange::setRange\fP .RE.PPReimplemented in \fBQwtCounter\fP..SS "void QwtDblRange::stepChange ()\fC [protected, virtual]\fP".PPNotify a change of the step size. This virtual function is called whenever the step size changes. The default implementation does nothing. .SS "double QwtDblRange::value () const".PPReturns the current value. Reimplemented in \fBQwtCounter\fP..SS "void QwtDblRange::valueChange ()\fC [protected, virtual]\fP".PPNotify a change of value. This virtual function is called whenever the value changes. The default implementation does nothing. Reimplemented in \fBQwtDial\fP, \fBQwtSliderBase\fP, \fBQwtSlider\fP, and \fBQwtWheel\fP..SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -