<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>QwtDblRange Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.3 on Thu Dec 14 00:27:14 2000 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>QwtDblRange Class Reference</h1>A class which controls a value within an interval. <a href="#_details">More...</a> <p> <code>#include <qwt_drange.h></code> <p> Inherited by <a class="el" href="class_qwtcounter.html">QwtCounter</a>, and <a class="el" href="class_qwtsliderbase.html">QwtSliderBase</a>. <p> Inheritance diagram for QwtDblRange<p><center><img src="class_qwtdblrange_inherit_graph.gif" border="0" usemap="#QwtDblRange_inherit_map" alt="Inheritance graph"></center> <map name="QwtDblRange_inherit_map"> <area href="class_qwtcounter.html" shape="rect" coords="0,67,77,85"> <area href="class_qwtsliderbase.html" shape="rect" coords="101,67,195,85"> <area href="class_qwtknob.html" shape="rect" coords="27,133,91,152"> <area href="class_qwtslider.html" shape="rect" coords="115,133,181,152"> <area href="class_qwtwheel.html" shape="rect" coords="205,133,275,152"> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwtdblrange-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a0">QwtDblRange</a> ()</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a1">fitValue</a> (double)</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a2">incValue</a> (int)</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a3">incPages</a> (int)</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a4">setPeriodic</a> (bool tf)</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a5">setRange</a> (double vmin, double vmax, double vstep = 0.0, int pagesize = 1)</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a6">setStep</a> (double)</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a7">setValue</a> (double)</td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a8">maxValue</a> () const</td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a9">minValue</a> () const</td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a10">periodic</a> () const</td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a11">step</a> () const</td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a12">pageSize</a> () const</td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#a13">value</a> () const</td></tr> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#b0">exactValue</a> () const</td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#b1">exactPrevValue</a> () const</td></tr> <tr><td nowrap align=right valign=top>double </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#b2">prevValue</a> () const</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#b3">valueChange</a> ()</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#b4">stepChange</a> ()</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="class_qwtdblrange.html#b5">rangeChange</a> ()</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A class which controls a value within an interval. <p> <p> 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 <a class="el" href="class_qwtdblrange.html#a7">QwtDblRange::setValue</a>), or it can be fitted into a step raster (see <a class="el" href="class_qwtdblrange.html#a1">QwtDblRange::fitValue</a> and <a class="el" href="class_qwtdblrange.html#a2">QwtDblRange::incValue</a>). <p> As 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 <a class="el" href="class_qwtdblrange.html#a7">setValue</a>(), <a class="el" href="class_qwtdblrange.html#a1">fitValue</a>(), <a class="el" href="class_qwtdblrange.html#a2">incValue</a>() or <a class="el" href="class_qwtdblrange.html#a3">incPages</a>() are called. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="QwtDblRange::QwtDblRange"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QwtDblRange::QwtDblRange ( </b></td> <td valign="bottom"><b> ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Constructor. <p> <p> The range is initialized to [0.0, 100.0], the step size to 1.0, and the value to 0.0. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="b1" doxytag="QwtDblRange::exactPrevValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::exactPrevValue ( </b></td> <td valign="bottom"><b> ) const<code> [protected]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the exact previous value. <p> </td> </tr> </table> <a name="b0" doxytag="QwtDblRange::exactValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::exactValue ( </b></td> <td valign="bottom"><b> ) const<code> [protected]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the exact value. <p> <p> The exact value is the value which <a class="el" href="class_qwtdblrange.html#a13">QwtDblRange::value</a> would return if the value were not adjusted to the step raster. It differs from the current value only if <a class="el" href="class_qwtdblrange.html#a1">QwtDblRange::fitValue</a> or <a class="el" href="class_qwtdblrange.html#a2">QwtDblRange::incValue</a> have been used before. This function is intended for internal use in derived classes. </td> </tr> </table> <a name="a1" doxytag="QwtDblRange::fitValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::fitValue ( </b></td> <td valign="bottom"><b> double <em>val</em> )<code> [virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Adjust the value to the closest point in the step raster. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>x</em> </td><td> value </td></tr> </table> </dl><dl compact><dt> <b>Warning: </b><dd> The value is clipped when it lies outside the range. When the range is <a class="el" href="class_qwtdblrange.html#a10">QwtDblRange::periodic</a>, it will be mapped to a point in the interval such that <div class="fragment"><pre> new value := x + n * (max. value - min. value)</div></pre> with an integer number n. </dl> <p> Reimplemented in <a class="el" href="class_qwtsliderbase.html#g1">QwtSliderBase</a>. </td> </tr> </table> <a name="a3" doxytag="QwtDblRange::incPages"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::incPages ( </b></td> <td valign="bottom"><b> int <em>nPages</em> )<code> [virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Increment the value by a specified number of pages. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>nPages</em> </td><td> Number of pages to increment. A negative number decrements the value. </td></tr> </table> </dl><dl compact><dt> <b>Warning: </b><dd> The Page size is specified in the constructor. </dl> </td> </tr> </table> <a name="a2" doxytag="QwtDblRange::incValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::incValue ( </b></td> <td valign="bottom"><b> int <em>steps</em> )<code> [virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Increment the value by a specified number of steps. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>nSteps</em> </td><td> Number of steps to increment </td></tr> </table> </dl><dl compact><dt> <b>Warning: </b><dd> As a result of this operation, the new value will always be adjusted to the step raster. </dl> <p> Reimplemented in <a class="el" href="class_qwtsliderbase.html#g2">QwtSliderBase</a>. </td> </tr> </table> <a name="a8" doxytag="QwtDblRange::maxValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::maxValue ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the value of the second border of the range. <p> <p> maxValue returns the value which has been specified as the second parameter in <a class="el" href="class_qwtdblrange.html#a5">QwtDblRange::setRange</a>. <p> <dl compact><dt> <b>See also: </b><dd> <a class="el" href="class_qwtdblrange.html#a5">setRange</a>() </dl> </td> </tr> </table> <a name="a9" doxytag="QwtDblRange::minValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::minValue ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the value at the first border of the range. <p> <p> minValue returns the value which has been specified as the first parameter in <a class="el" href="class_qwtdblrange.html#a5">setRange</a>(). <p> <dl compact><dt> <b>See also: </b><dd> <a class="el" href="class_qwtdblrange.html#a5">setRange</a>() </dl> </td> </tr> </table> <a name="a12" doxytag="QwtDblRange::pageSize"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> int QwtDblRange::pageSize ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the page size in steps. <p> </td> </tr> </table> <a name="a10" doxytag="QwtDblRange::periodic"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> bool QwtDblRange::periodic ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns TRUE if the range is periodic. <p> <dl compact><dt> <b>See also: </b><dd> <a class="el" href="class_qwtdblrange.html#a4">setPeriodic</a>() </dl> </td> </tr> </table> <a name="b2" doxytag="QwtDblRange::prevValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::prevValue ( </b></td> <td valign="bottom"><b> ) const<code> [protected]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the previous value. <p> </td> </tr> </table> <a name="b5" doxytag="QwtDblRange::rangeChange"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::rangeChange ( </b></td> <td valign="bottom"><b> )<code> [protected, virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Notify a change of the range. <p> <p> This virtual function is called whenever the range changes. The default implementation does nothing. <p> Reimplemented in <a class="el" href="class_qwtslider.html#b6">QwtSlider</a>. </td> </tr> </table> <a name="a4" doxytag="QwtDblRange::setPeriodic"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::setPeriodic ( </b></td> <td valign="bottom"><b> bool <em>tf</em> ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Make the range periodic. <p> <p> When the range is periodic, the value will be set to a point inside the interval such that <p> <div class="fragment"><pre> point = value + n * width </div></pre> <p> if 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.<dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>tf</em> </td><td> TRUE for a periodic range </td></tr> </table> </dl> </td> </tr> </table> <a name="a5" doxytag="QwtDblRange::setRange"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::setRange ( </b></td> <td valign="bottom"><b> double <em>vmin</em>, </b></td> </tr> <tr> <td></td> <td><b> double <em>vmax</em>, </b></td> </tr> <tr> <td></td> <td><b> double <em>vstep</em> = 0.0, </b></td> </tr> <tr> <td></td> <td><b> int <em>pageSize</em> = 1 ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Specify range and step size. <p> <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>vmin</em> </td><td> lower boundary of the interval </td></tr> <tr><td valign=top><em>vmax</em> </td><td> higher boundary of the interval </td></tr> <tr><td valign=top><em>vstep</em> </td><td> step width </td></tr> <tr><td valign=top><em>pageSize</em> </td><td> page size in steps </td></tr> </table> </dl><dl compact><dt> <b>Warning: </b><dd> <ul> <li> A 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. <li> vmax < vmin is allowed. <li> If the step size is left out or set to zero, it will be set to 1/100 of the interval length. <li> If the step size has an absurd value, it will be corrected to a better one. </ul> </dl> </td> </tr> </table> <a name="a6" doxytag="QwtDblRange::setStep"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::setStep ( </b></td> <td valign="bottom"><b> double <em>vstep</em> ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Change the step raster. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>vstep</em> </td><td> new step width </td></tr> </table> </dl><dl compact><dt> <b>Warning: </b><dd> The value will <em>not</em> be adjusted to the new step raster. </dl> </td> </tr> </table> <a name="a7" doxytag="QwtDblRange::setValue"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::setValue ( </b></td> <td valign="bottom"><b> double <em>val</em> )<code> [virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Set a new value without adjusting to the step raster. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>x</em> </td><td> new value </td></tr> </table> </dl><dl compact><dt> <b>Warning: </b><dd> The value is clipped when it lies outside the range. When the range is <a class="el" href="class_qwtdblrange.html#a10">QwtDblRange::periodic</a>, it will be mapped to a point in the interval such that <div class="fragment"><pre> new value := x + n * (max. value - min. value)</div></pre> with an integer number n. </dl> <p> Reimplemented in <a class="el" href="class_qwtsliderbase.html#g0">QwtSliderBase</a>. </td> </tr> </table> <a name="a11" doxytag="QwtDblRange::step"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::step ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <dl compact><dt> <b>Returns: </b><dd> the step size </dl><dl compact><dt> <b>See also: </b><dd> <a class="el" href="class_qwtdblrange.html#a6">QwtDblRange::setStep</a>, <a class="el" href="class_qwtdblrange.html#a5">QwtDblRange::setRange</a> </dl> </td> </tr> </table> <a name="b4" doxytag="QwtDblRange::stepChange"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::stepChange ( </b></td> <td valign="bottom"><b> )<code> [protected, virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Notify a change of the step size. <p> <p> This virtual function is called whenever the step size changes. The default implementation does nothing. </td> </tr> </table> <a name="a13" doxytag="QwtDblRange::value"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> double QwtDblRange::value ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the current value. <p> </td> </tr> </table> <a name="b3" doxytag="QwtDblRange::valueChange"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void QwtDblRange::valueChange ( </b></td> <td valign="bottom"><b> )<code> [protected, virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Notify a change of value. <p> <p> This virtual function is called whenever the value changes. The default implementation does nothing. <p> Reimplemented in <a class="el" href="class_qwtsliderbase.html#b2">QwtSliderBase</a>, and <a class="el" href="class_qwtslider.html#b5">QwtSlider</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li>qwt_drange.h<li>qwt_drange.cpp</ul> <hr><address><small>Generated at Thu Dec 14 00:27:15 2000 for Qwt User's Guide by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.3 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2000</small></address> </body> </html>