⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwtdimap.3

📁 linux下qt的第三方的一个类
💻 3
字号:
.TH "QwtDiMap" 3 "16 Nov 2004" "Version 4.2.0" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtDiMap \- .SH SYNOPSIS.br.PPInherited by \fBQwtScaleDraw\fP..PP.SH "Detailed Description".PP Map a double interval into an integer interval. The QwtDiMap class maps an interval of type double into an interval of type int. It consists of two intervals D = [d1, d2] (double) and I = [i1, i2] (int), which are specified with the \fBQwtDiMap::setDblRange\fP and \fBQwtDiMap::setIntRange\fP members. The point d1 is mapped to the point i1, and d2 is mapped to i2. Any point inside or outside D can be mapped to a point inside or outside I using \fBQwtDiMap::transform\fP or \fBQwtDiMap::limTransform\fP or vice versa using \fBQwtPlot::invTransform\fP. D can be scaled linearly or logarithmically, as specified with \fBQwtDiMap::setDblRange\fP..PP\fBUsage\fP .PP.nf#include <qwt_dimap.h>QwtDiMap map;int ival;double dval;map.setDblRange(0.0, 3.1415);   // Assign an interval of type double with                // linear mappingmap.setIntRange(0,100);         // Assign an integer intervalival = map.transform(1.0);      // obtain integer value corresponding to 1.0dval = map.invTransform(77);    // obtain double value corresponding to 77.fi.PP.PPDefinition at line 46 of file qwt_dimap.h..SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtDiMap\fP ()".br.ti -1c.RI "\fBQwtDiMap\fP (int i1, int i2, double d1, double d2, bool lg=FALSE)".br.ti -1c.RI "\fB~QwtDiMap\fP ()".br.ti -1c.RI "bool \fBcontains\fP (double x) const".br.ti -1c.RI "bool \fBcontains\fP (int x) const".br.ti -1c.RI "void \fBsetIntRange\fP (int i1, int i2)".br.ti -1c.RI "void \fBsetDblRange\fP (double d1, double d2, bool lg=FALSE)".br.ti -1c.RI "int \fBtransform\fP (double x) const".br.ti -1c.RI "double \fBinvTransform\fP (int i) const".br.ti -1c.RI "int \fBlimTransform\fP (double x) const".br.ti -1c.RI "double \fBxTransform\fP (double x) const".br.ti -1c.RI "double \fBd1\fP () const".br.ti -1c.RI "double \fBd2\fP () const".br.ti -1c.RI "int \fBi1\fP () const".br.ti -1c.RI "int \fBi2\fP () const".br.ti -1c.RI "bool \fBlogarithmic\fP () const".br.in -1c.SS "Public Attributes".in +1c.ti -1c.RI "QT_STATIC_CONST double \fBLogMin\fP = 1.0e-150".br.ti -1c.RI "QT_STATIC_CONST double \fBLogMax\fP = 1.0e150".br.in -1c.SH "Constructor & Destructor Documentation".PP .SS "QwtDiMap::QwtDiMap ()".PPConstructor. .PPThe double and integer intervals are both set to [0,1]. Definition at line 20 of file qwt_dimap.cpp..SS "QwtDiMap::QwtDiMap (int i1, int i2, double d1, double d2, bool logarithmic = \fCFALSE\fP)".PPConstructor. .PPConstructs a QwtDiMap instance with initial integer and double intervals.PP\fBParameters:\fP.RS 4\fIi1\fP first border of integer interval .br\fIi2\fP second border of integer interval .br\fId1\fP first border of double interval .br\fId2\fP second border of double interval .br\fIlogarithmic\fP logarithmic mapping, TRUE or FALSE. .RE.PPDefinition at line 43 of file qwt_dimap.cpp..PPReferences setDblRange()..SS "QwtDiMap::~\fBQwtDiMap\fP ()".PPDestructor. .PPDefinition at line 54 of file qwt_dimap.cpp..SH "Member Function Documentation".PP .SS "bool QwtDiMap::contains (int x) const".PP\fBReturns:\fP.RS 4TRUE if a value x lies inside or at the border of the map's integer range .RE.PP\fBParameters:\fP.RS 4\fIx\fP value .RE.PPDefinition at line 73 of file qwt_dimap.cpp..SS "bool QwtDiMap::contains (double x) const".PP\fBReturns:\fP.RS 4TRUE if a value x lies inside or at the border of the map's double range. .RE.PP\fBParameters:\fP.RS 4\fIx\fP value .RE.PPDefinition at line 63 of file qwt_dimap.cpp..SS "double QwtDiMap::d1 () const".PP\fBReturns:\fP.RS 4the first border of the double interval .RE.PPDefinition at line 86 of file qwt_dimap.h..PPReferenced by QwtSlider::getValue(), and QwtSlider::xyPosition()..SS "double QwtDiMap::d2 () const".PP\fBReturns:\fP.RS 4the second border of the double interval .RE.PPDefinition at line 94 of file qwt_dimap.h..PPReferenced by QwtSlider::getValue(), and QwtSlider::xyPosition()..SS "int QwtDiMap::i1 () const".PP\fBReturns:\fP.RS 4the second border of the integer interval .RE.PPDefinition at line 102 of file qwt_dimap.h..PPReferenced by QwtScaleDraw::drawBackbone(), QwtSlider::getScrollMode(), QwtSlider::getValue(), and QwtSlider::xyPosition()..SS "int QwtDiMap::i2 () const".PP\fBReturns:\fP.RS 4the second border of the integer interval .RE.PPDefinition at line 110 of file qwt_dimap.h..PPReferenced by QwtScaleDraw::drawBackbone(), QwtSlider::getScrollMode(), QwtSlider::getValue(), and QwtSlider::xyPosition()..SS "double QwtDiMap::invTransform (int y) const".PPTransform an integer value into a double value. .PP\fBParameters:\fP.RS 4\fIy\fP integer value to be transformed .RE.PP\fBReturns:\fP.RS 4.IP "\fBlinear mapping:\fP" 1cd1 + (d2 - d1) / (i2 - i1) * (y - i1) .IP "\fBlogarithmic mapping:\fP" 1cd1 + (d2 - d1) / log(i2 / i1) * log(y / i1) .PP.RE.PPDefinition at line 132 of file qwt_dimap.cpp..PPReferenced by QwtSlider::getValue(), QwtPlotPicker::invTransform(), and QwtPlot::invTransform()..SS "int QwtDiMap::limTransform (double x) const".PPTransform and limit. .PPThe function is similar to \fBQwtDiMap::transform\fP, but limits the input value to the nearest border of the map's double interval if it lies outside that interval..PP\fBParameters:\fP.RS 4\fIx\fP value to be transformed .RE.PP\fBReturns:\fP.RS 4transformed value .RE.PPDefinition at line 155 of file qwt_dimap.cpp..PPReferences transform()..PPReferenced by QwtThermo::drawThermo()..SS "bool QwtDiMap::logarithmic () const".PP\fBReturns:\fP.RS 4TRUE if the double interval is scaled logarithmically .RE.PPDefinition at line 118 of file qwt_dimap.h..SS "void QwtDiMap::setDblRange (double d1, double d2, bool lg = \fCFALSE\fP)".PPSpecify the borders of the double interval. .PP\fBParameters:\fP.RS 4\fId1\fP first border .br\fId2\fP second border .br\fIlg\fP logarithmic (TRUE) or linear (FALSE) scaling .RE.PPDefinition at line 84 of file qwt_dimap.cpp..PPReferenced by QwtPlot::canvasMap(), QwtDiMap(), QwtThermo::setRange(), and QwtScaleDraw::setScale()..SS "void QwtDiMap::setIntRange (int i1, int i2)".PPSpecify the borders of the integer interval. .PP\fBParameters:\fP.RS 4\fIi1\fP first border .br\fIi2\fP second border .RE.PPDefinition at line 116 of file qwt_dimap.cpp..PPReferenced by QwtPlot::canvasMap(), QwtSlider::layoutSlider(), QwtThermo::layoutThermo(), QwtScaleDraw::setAngleRange(), and QwtScaleDraw::setGeometry()..SS "int QwtDiMap::transform (double x) const".PPTransform a point in double interval into an point in the integer interval. .PP\fBParameters:\fP.RS 4\fIx\fP value .RE.PP\fBReturns:\fP.RS 4.IP "\fBlinear mapping:\fP" 1crint(i1 + (i2 - i1) / (d2 - d1) * (x - d1)) .IP "\fBlogarithmic mapping:\fP" 1crint(i1 + (i2 - i1) / log(d2 / d1) * log(x / d1)) .PP.RE.PP\fBWarning:\fP.RS 4The specified point is allowed to lie outside the intervals. If you want to limit the returned value, use \fBQwtDiMap::limTransform\fP. .RE.PPDefinition at line 136 of file qwt_dimap.h..PPReferenced by QwtCurve::closePolyline(), QwtGrid::draw(), QwtCurve::drawDots(), QwtCurve::drawLines(), QwtCurve::drawSteps(), QwtCurve::drawSticks(), QwtCurve::drawSymbols(), QwtScaleDraw::drawTick(), QwtScaleDraw::labelPlacement(), limTransform(), QwtPlotPicker::transform(), QwtPlot::transform(), and QwtSlider::xyPosition()..SS "double QwtDiMap::xTransform (double x) const".PPExact transformation. .PPThis function is similar to \fBQwtDiMap::transform\fP, but makes the integer interval appear to be double. .PP\fBParameters:\fP.RS 4\fIx\fP value to be transformed .RE.PP\fBReturns:\fP.RS 4.IP "\fBlinear mapping:\fP" 1ci1 + (i2 - i1) / (d2 - d1) * (x - d1) .IP "\fBlogarithmic mapping:\fP" 1ci1 + (i2 - i1) / log(d2 / d1) * log(x / d1) .PP.RE.PPDefinition at line 185 of file qwt_dimap.cpp..PPReferenced by QwtPlot::closestCurve(), QwtPlot::closestMarker(), and QwtCurve::drawSpline()..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 + -