Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4647

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3rangecontrol.cpp -->
  <title>Qt 4.8: Q3RangeControl Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3RangeControl</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3RangeControl Class Reference</h1>
<!-- $$$Q3RangeControl-brief -->
<p>The Q3RangeControl class provides an integer value within a range. <a href="#details">More...</a></p>
<!-- @@@Q3RangeControl -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3RangeControl&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qrangecontrol">Porting to Qt 4</a> for more information.</p>
<ul>
<li><a href="q3rangecontrol-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#Q3RangeControl">Q3RangeControl</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#Q3RangeControl-2">Q3RangeControl</a></b> ( int <i>minValue</i>, int <i>maxValue</i>, int <i>lineStep</i>, int <i>pageStep</i>, int <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#dtor.Q3RangeControl">~Q3RangeControl</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#addLine">addLine</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#addPage">addPage</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#bound">bound</a></b> ( int <i>v</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#lineStepx">lineStep</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#maxValue">maxValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#minValue">minValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#pageStep">pageStep</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#setMaxValue">setMaxValue</a></b> ( int <i>maxVal</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#setMinValue">setMinValue</a></b> ( int <i>minVal</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#setRange">setRange</a></b> ( int <i>minValue</i>, int <i>maxValue</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#setSteps">setSteps</a></b> ( int <i>lineStep</i>, int <i>pageStep</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#setValue">setValue</a></b> ( int <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#subtractLine">subtractLine</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#subtractPage">subtractPage</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#value">value</a></b> () const</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#directSetValue">directSetValue</a></b> ( int <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#positionFromValue">positionFromValue</a></b> ( int <i>logical_val</i>, int <i>span</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#prevValue">prevValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#rangeChange">rangeChange</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#stepChange">stepChange</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#valueChange">valueChange</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3rangecontrol.html#valueFromPosition">valueFromPosition</a></b> ( int <i>pos</i>, int <i>span</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$Q3RangeControl-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3RangeControl class provides an integer value within a range.</p>
<p>Although originally designed for the <a href="qscrollbar.html">QScrollBar</a> widget, the Q3RangeControl can also be used in conjunction with other widgets such as <a href="qslider.html">QSlider</a> and <a href="qspinbox.html">QSpinBox</a>. Here are the five main concepts in the class:</p>
<ol class="1">
<li><i>Current value</i> The bounded integer that Q3RangeControl maintains. <a href="q3rangecontrol.html#value">value</a>() returns it, and several functions, including <a href="q3rangecontrol.html#setValue">setValue</a>(), set it.</li>
<li><i>Minimum</i> The lowest value that <a href="q3rangecontrol.html#value">value</a>() can ever return. Returned by <a href="q3rangecontrol.html#minValue">minValue</a>() and set by <a href="q3rangecontrol.html#setRange">setRange</a>() or one of the constructors.</li>
<li><i>Maximum</i> The highest value that <a href="q3rangecontrol.html#value">value</a>() can ever return. Returned by <a href="q3rangecontrol.html#maxValue">maxValue</a>() and set by <a href="q3rangecontrol.html#setRange">setRange</a>() or one of the constructors.</li>
<li><i>Line step</i> The smaller of two natural steps that Q3RangeControl provides and typically corresponds to the user pressing an arrow key. The line step is returned by <a href="q3rangecontrol.html#lineStepx">lineStep</a>() and set using <a href="q3rangecontrol.html#setSteps">setSteps</a>(). The functions <a href="q3rangecontrol.html#addLine">addLine</a>() and <a href="q3rangecontrol.html#subtractLine">subtractLine</a>() respectively increment and decrement the current value by <a href="q3rangecontrol.html#lineStepx">lineStep</a>().</li>
<li><i>Page step</i> The larger of two natural steps that Q3RangeControl provides and typically corresponds to the user pressing PageUp or PageDown. The page step is returned by <a href="q3rangecontrol.html#pageStep">pageStep</a>() and set using <a href="q3rangecontrol.html#setSteps">setSteps</a>(). The functions <a href="q3rangecontrol.html#addPage">addPage</a>() and substractPage() respectively increment and decrement the current value by <a href="q3rangecontrol.html#pageStep">pageStep</a>().</li>
</ol>
<p>Unity (1) may be viewed as a third step size. <a href="q3rangecontrol.html#setValue">setValue</a>() lets you set the current value to any integer in the allowed range, not just <a href="q3rangecontrol.html#minValue">minValue</a>() + <i>n</i> * <a href="q3rangecontrol.html#lineStepx">lineStep</a>() for integer values of <i>n</i>. Some widgets may allow the user to set any value at all; others may just provide multiples of <a href="q3rangecontrol.html#lineStepx">lineStep</a>() or <a href="q3rangecontrol.html#pageStep">pageStep</a>().</p>
<p>Q3RangeControl provides three virtual functions that are well suited for updating the on-screen representation of range controls and emitting signals: <a href="q3rangecontrol.html#valueChange">valueChange</a>(), <a href="q3rangecontrol.html#rangeChange">rangeChange</a>() and <a href="q3rangecontrol.html#stepChange">stepChange</a>().</p>
<p>Q3RangeControl also provides a function called <a href="q3rangecontrol.html#bound">bound</a>() which lets you force arbitrary integers to be within the allowed range of the range control.</p>
<p>We recommend that all widgets that inherit Q3RangeControl provide at least a signal called valueChanged(); many widgets will want to provide addStep(), <a href="q3rangecontrol.html#addPage">addPage</a>(), substractStep() and substractPage() as slots.</p>
<p>Note that you must use multiple inheritance if you plan to implement a widget using Q3RangeControl because Q3RangeControl is not derived from <a href="qwidget.html">QWidget</a>.</p>
</div>
<!-- @@@Q3RangeControl -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3RangeControl[overload1]$$$Q3RangeControl -->
<h3 class="fn"><a name="Q3RangeControl"></a>Q3RangeControl::<span class="name">Q3RangeControl</span> ()</h3>
<p>Constructs a range control with a minimum value of 0, maximum value of 99, line step of 1, page step of 10 and initial value 0.</p>
<!-- @@@Q3RangeControl -->
<!-- $$$Q3RangeControl$$$Q3RangeControlintintintintint -->
<h3 class="fn"><a name="Q3RangeControl-2"></a>Q3RangeControl::<span class="name">Q3RangeControl</span> ( <span class="type">int</span> <i>minValue</i>, <span class="type">int</span> <i>maxValue</i>, <span class="type">int</span> <i>lineStep</i>, <span class="type">int</span> <i>pageStep</i>, <span class="type">int</span> <i>value</i> )</h3>
<p>Constructs a range control whose value can never be smaller than <i>minValue</i> or greater than <i>maxValue</i>, whose line step size is <i>lineStep</i> and page step size is <i>pageStep</i> and whose value is initially <i>value</i> (which is guaranteed to be in range using <a href="q3rangecontrol.html#bound">bound</a>()).</p>
<!-- @@@Q3RangeControl -->
<!-- $$$~Q3RangeControl[overload1]$$$~Q3RangeControl -->
<h3 class="fn"><a name="dtor.Q3RangeControl"></a>Q3RangeControl::<span class="name">~Q3RangeControl</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the range control</p>
<!-- @@@~Q3RangeControl -->
<!-- $$$addLine[overload1]$$$addLine -->
<h3 class="fn"><a name="addLine"></a><span class="type">void</span> Q3RangeControl::<span class="name">addLine</span> ()</h3>
<p>Equivalent to <tt>setValue(value() + lineStep())</tt>.</p>
<p>If the value is changed, then <a href="q3rangecontrol.html#valueChange">valueChange</a>() is called.</p>
<p><b>See also </b><a href="q3rangecontrol.html#subtractLine">subtractLine</a>(), <a href="q3rangecontrol.html#addPage">addPage</a>(), and <a href="q3rangecontrol.html#setValue">setValue</a>().</p>
<!-- @@@addLine -->
<!-- $$$addPage[overload1]$$$addPage -->
<h3 class="fn"><a name="addPage"></a><span class="type">void</span> Q3RangeControl::<span class="name">addPage</span> ()</h3>
<p>Equivalent to <tt>setValue(value() + pageStep())</tt>.</p>
<p>If the value is changed, then <a href="q3rangecontrol.html#valueChange">valueChange</a>() is called.</p>
<p><b>See also </b><a href="q3rangecontrol.html#subtractPage">subtractPage</a>(), <a href="q3rangecontrol.html#addLine">addLine</a>(), and <a href="q3rangecontrol.html#setValue">setValue</a>().</p>
<!-- @@@addPage -->
<!-- $$$bound[overload1]$$$boundint -->
<h3 class="fn"><a name="bound"></a><span class="type">int</span> Q3RangeControl::<span class="name">bound</span> ( <span class="type">int</span> <i>v</i> ) const</h3>
<p>Forces the value <i>v</i> to be within the range from <a href="q3rangecontrol.html#minValue">minValue</a>() to <a href="q3rangecontrol.html#maxValue">maxValue</a>() inclusive, and returns the result.</p>
<p>This function is provided so that you can easily force other numbers than <a href="q3rangecontrol.html#value">value</a>() into the allowed range. You do not need to call it in order to use <a href="q3rangecontrol.html" class="compat">Q3RangeControl</a> itself.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setValue">setValue</a>(), <a href="q3rangecontrol.html#value">value</a>(), <a href="q3rangecontrol.html#minValue">minValue</a>(), and <a href="q3rangecontrol.html#maxValue">maxValue</a>().</p>
<!-- @@@bound -->
<!-- $$$directSetValue[overload1]$$$directSetValueint -->
<h3 class="fn"><a name="directSetValue"></a><span class="type">void</span> Q3RangeControl::<span class="name">directSetValue</span> ( <span class="type">int</span> <i>value</i> )<tt> [protected]</tt></h3>
<p>Sets the range control <i>value</i> directly without calling <a href="q3rangecontrol.html#valueChange">valueChange</a>().</p>
<p>Forces the new <i>value</i> to be within the legal range.</p>
<p>You will rarely have to call this function. However, if you want to change the range control's value inside the overloaded method <a href="q3rangecontrol.html#valueChange">valueChange</a>(), <a href="q3rangecontrol.html#setValue">setValue</a>() would call the function <a href="q3rangecontrol.html#valueChange">valueChange</a>() again. To avoid this recursion you must use directSetValue() instead.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setValue">setValue</a>().</p>
<!-- @@@directSetValue -->
<!-- $$$lineStep[overload1]$$$lineStep -->
<h3 class="fn"><a name="lineStepx"></a><span class="type">int</span> Q3RangeControl::<span class="name">lineStep</span> () const</h3>
<p>Returns the line step.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setSteps">setSteps</a>() and <a href="q3rangecontrol.html#pageStep">pageStep</a>().</p>
<!-- @@@lineStep -->
<!-- $$$maxValue[overload1]$$$maxValue -->
<h3 class="fn"><a name="maxValue"></a><span class="type">int</span> Q3RangeControl::<span class="name">maxValue</span> () const</h3>
<p>Returns the maximum value of the range.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setMaxValue">setMaxValue</a>(), <a href="q3rangecontrol.html#setRange">setRange</a>(), and <a href="q3rangecontrol.html#minValue">minValue</a>().</p>
<!-- @@@maxValue -->
<!-- $$$minValue[overload1]$$$minValue -->
<h3 class="fn"><a name="minValue"></a><span class="type">int</span> Q3RangeControl::<span class="name">minValue</span> () const</h3>
<p>Returns the minimum value of the range.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setMinValue">setMinValue</a>(), <a href="q3rangecontrol.html#setRange">setRange</a>(), and <a href="q3rangecontrol.html#maxValue">maxValue</a>().</p>
<!-- @@@minValue -->
<!-- $$$pageStep[overload1]$$$pageStep -->
<h3 class="fn"><a name="pageStep"></a><span class="type">int</span> Q3RangeControl::<span class="name">pageStep</span> () const</h3>
<p>Returns the page step.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setSteps">setSteps</a>() and <a href="q3rangecontrol.html#lineStepx">lineStep</a>().</p>
<!-- @@@pageStep -->
<!-- $$$positionFromValue[overload1]$$$positionFromValueintint -->
<h3 class="fn"><a name="positionFromValue"></a><span class="type">int</span> Q3RangeControl::<span class="name">positionFromValue</span> ( <span class="type">int</span> <i>logical_val</i>, <span class="type">int</span> <i>span</i> ) const<tt> [protected]</tt></h3>
<p>Converts <i>logical_val</i> to a pixel position. <a href="q3rangecontrol.html#minValue">minValue</a>() maps to 0, <a href="q3rangecontrol.html#maxValue">maxValue</a>() maps to <i>span</i> and other values are distributed evenly in-between.</p>
<p>This function can handle the entire integer range without overflow, providing <i>span</i> is &lt;= 4096.</p>
<p>Calling this method is useful when actually drawing a range control such as a <a href="qscrollbar.html">QScrollBar</a> on-screen.</p>
<p><b>See also </b><a href="q3rangecontrol.html#valueFromPosition">valueFromPosition</a>().</p>
<!-- @@@positionFromValue -->
<!-- $$$prevValue[overload1]$$$prevValue -->
<h3 class="fn"><a name="prevValue"></a><span class="type">int</span> Q3RangeControl::<span class="name">prevValue</span> () const<tt> [protected]</tt></h3>
<p>Returns the previous value of the range control. &quot;Previous value&quot; means the value before the last change occurred. Setting a new range may affect the value, too, because the value is forced to be inside the specified range. When the range control is initially created, this is the same as <a href="q3rangecontrol.html#value">value</a>().</p>
<p>prevValue() can be outside the current legal range if a call to <a href="q3rangecontrol.html#setRange">setRange</a>() causes the current value to change. For example, if the range was [0, 1000] and the current value is 500, setRange(0, 400) makes <a href="q3rangecontrol.html#value">value</a>() return 400 and prevValue() return 500.</p>
<p><b>See also </b><a href="q3rangecontrol.html#value">value</a>() and <a href="q3rangecontrol.html#setRange">setRange</a>().</p>
<!-- @@@prevValue -->
<!-- $$$rangeChange[overload1]$$$rangeChange -->
<h3 class="fn"><a name="rangeChange"></a><span class="type">void</span> Q3RangeControl::<span class="name">rangeChange</span> ()<tt> [virtual protected]</tt></h3>
<p>This virtual function is called whenever the range control's range changes. You can reimplement it if you want to be notified when the range changes. The default implementation does nothing.</p>
<p>Note that this method is called after the range has changed.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setRange">setRange</a>(), <a href="q3rangecontrol.html#valueChange">valueChange</a>(), and <a href="q3rangecontrol.html#stepChange">stepChange</a>().</p>
<!-- @@@rangeChange -->
<!-- $$$setMaxValue[overload1]$$$setMaxValueint -->
<h3 class="fn"><a name="setMaxValue"></a><span class="type">void</span> Q3RangeControl::<span class="name">setMaxValue</span> ( <span class="type">int</span> <i>maxVal</i> )</h3>
<p>Sets the minimum value of the range to <i>maxVal</i>.</p>
<p>If necessary, the <a href="q3rangecontrol.html#minValue">minValue</a>() is adjusted so that the range remains valid.</p>
<p><b>See also </b><a href="q3rangecontrol.html#maxValue">maxValue</a>() and <a href="q3rangecontrol.html#setMinValue">setMinValue</a>().</p>
<!-- @@@setMaxValue -->
<!-- $$$setMinValue[overload1]$$$setMinValueint -->
<h3 class="fn"><a name="setMinValue"></a><span class="type">void</span> Q3RangeControl::<span class="name">setMinValue</span> ( <span class="type">int</span> <i>minVal</i> )</h3>
<p>Sets the minimum value of the range to <i>minVal</i>.</p>
<p>If necessary, the <a href="q3rangecontrol.html#maxValue">maxValue</a>() is adjusted so that the range remains valid.</p>
<p><b>See also </b><a href="q3rangecontrol.html#minValue">minValue</a>() and <a href="q3rangecontrol.html#setMaxValue">setMaxValue</a>().</p>
<!-- @@@setMinValue -->
<!-- $$$setRange[overload1]$$$setRangeintint -->
<h3 class="fn"><a name="setRange"></a><span class="type">void</span> Q3RangeControl::<span class="name">setRange</span> ( <span class="type">int</span> <i>minValue</i>, <span class="type">int</span> <i>maxValue</i> )</h3>
<p>Sets the range control's minimum value to <i>minValue</i> and its maximum value to <i>maxValue</i>.</p>
<p>Calls the virtual <a href="q3rangecontrol.html#rangeChange">rangeChange</a>() function if one or both of the new minimum and maximum values are different from the previous setting. Calls the virtual <a href="q3rangecontrol.html#valueChange">valueChange</a>() function if the current value is adjusted because it was outside the new range.</p>
<p>If <i>maxValue</i> is smaller than <i>minValue</i>, <i>minValue</i> becomes the only legal value.</p>
<p><b>See also </b><a href="q3rangecontrol.html#minValue">minValue</a>() and <a href="q3rangecontrol.html#maxValue">maxValue</a>().</p>
<!-- @@@setRange -->
<!-- $$$setSteps[overload1]$$$setStepsintint -->
<h3 class="fn"><a name="setSteps"></a><span class="type">void</span> Q3RangeControl::<span class="name">setSteps</span> ( <span class="type">int</span> <i>lineStep</i>, <span class="type">int</span> <i>pageStep</i> )</h3>
<p>Sets the range's line step to <i>lineStep</i> and page step to <i>pageStep</i>.</p>
<p>Calls the virtual <a href="q3rangecontrol.html#stepChange">stepChange</a>() function if the new line step or page step are different from the previous settings.</p>
<p><b>See also </b><a href="q3rangecontrol.html#lineStepx">lineStep</a>(), <a href="q3rangecontrol.html#pageStep">pageStep</a>(), and <a href="q3rangecontrol.html#setRange">setRange</a>().</p>
<!-- @@@setSteps -->
<!-- $$$setValue[overload1]$$$setValueint -->
<h3 class="fn"><a name="setValue"></a><span class="type">void</span> Q3RangeControl::<span class="name">setValue</span> ( <span class="type">int</span> <i>value</i> )</h3>
<p>Sets the range control's value to <i>value</i> and forces it to be within the legal range.</p>
<p>Calls the virtual <a href="q3rangecontrol.html#valueChange">valueChange</a>() function if the new value is different from the previous value. The old value can still be retrieved using <a href="q3rangecontrol.html#prevValue">prevValue</a>().</p>
<p><b>See also </b><a href="q3rangecontrol.html#value">value</a>().</p>
<!-- @@@setValue -->
<!-- $$$stepChange[overload1]$$$stepChange -->
<h3 class="fn"><a name="stepChange"></a><span class="type">void</span> Q3RangeControl::<span class="name">stepChange</span> ()<tt> [virtual protected]</tt></h3>
<p>This virtual function is called whenever the range control's line or page step settings change. You can reimplement it if you want to be notified when the step changes. The default implementation does nothing.</p>
<p>Note that this method is called after a step setting has changed.</p>
<p><b>See also </b><a href="q3rangecontrol.html#setSteps">setSteps</a>(), <a href="q3rangecontrol.html#rangeChange">rangeChange</a>(), and <a href="q3rangecontrol.html#valueChange">valueChange</a>().</p>
<!-- @@@stepChange -->
<!-- $$$subtractLine[overload1]$$$subtractLine -->
<h3 class="fn"><a name="subtractLine"></a><span class="type">void</span> Q3RangeControl::<span class="name">subtractLine</span> ()</h3>
<p>Equivalent to <tt>setValue(value() - lineStep())</tt>.</p>
<p>If the value is changed, then <a href="q3rangecontrol.html#valueChange">valueChange</a>() is called.</p>
<p><b>See also </b><a href="q3rangecontrol.html#addLine">addLine</a>(), <a href="q3rangecontrol.html#subtractPage">subtractPage</a>(), and <a href="q3rangecontrol.html#setValue">setValue</a>().</p>
<!-- @@@subtractLine -->
<!-- $$$subtractPage[overload1]$$$subtractPage -->
<h3 class="fn"><a name="subtractPage"></a><span class="type">void</span> Q3RangeControl::<span class="name">subtractPage</span> ()</h3>
<p>Equivalent to <tt>setValue(value() - pageStep())</tt>.</p>
<p>If the value is changed, then <a href="q3rangecontrol.html#valueChange">valueChange</a>() is called.</p>
<p><b>See also </b><a href="q3rangecontrol.html#addPage">addPage</a>(), <a href="q3rangecontrol.html#subtractLine">subtractLine</a>(), and <a href="q3rangecontrol.html#setValue">setValue</a>().</p>
<!-- @@@subtractPage -->
<!-- $$$value[overload1]$$$value -->
<h3 class="fn"><a name="value"></a><span class="type">int</span> Q3RangeControl::<span class="name">value</span> () const</h3>
<p>Returns the current range control value. This is guaranteed to be within the range [<a href="q3rangecontrol.html#minValue">minValue</a>(), <a href="q3rangecontrol.html#maxValue">maxValue</a>()].</p>
<p><b>See also </b><a href="q3rangecontrol.html#setValue">setValue</a>() and <a href="q3rangecontrol.html#prevValue">prevValue</a>().</p>
<!-- @@@value -->
<!-- $$$valueChange[overload1]$$$valueChange -->
<h3 class="fn"><a name="valueChange"></a><span class="type">void</span> Q3RangeControl::<span class="name">valueChange</span> ()<tt> [virtual protected]</tt></h3>
<p>This virtual function is called whenever the range control value changes. You can reimplement it if you want to be notified when the value changes. The default implementation does nothing.</p>
<p>Note that this method is called after the value has changed. The previous value can be retrieved using <a href="q3rangecontrol.html#prevValue">prevValue</a>().</p>
<p><b>See also </b><a href="q3rangecontrol.html#setValue">setValue</a>(), <a href="q3rangecontrol.html#addPage">addPage</a>(), <a href="q3rangecontrol.html#subtractPage">subtractPage</a>(), <a href="q3rangecontrol.html#addLine">addLine</a>(), <a href="q3rangecontrol.html#subtractLine">subtractLine</a>(), <a href="q3rangecontrol.html#rangeChange">rangeChange</a>(), and <a href="q3rangecontrol.html#stepChange">stepChange</a>().</p>
<!-- @@@valueChange -->
<!-- $$$valueFromPosition[overload1]$$$valueFromPositionintint -->
<h3 class="fn"><a name="valueFromPosition"></a><span class="type">int</span> Q3RangeControl::<span class="name">valueFromPosition</span> ( <span class="type">int</span> <i>pos</i>, <span class="type">int</span> <i>span</i> ) const<tt> [protected]</tt></h3>
<p>Converts the pixel position <i>pos</i> to a value. 0 maps to <a href="q3rangecontrol.html#minValue">minValue</a>(), <i>span</i> maps to <a href="q3rangecontrol.html#maxValue">maxValue</a>() and other values are distributed evenly in-between.</p>
<p>This function can handle the entire integer range without overflow.</p>
<p>Calling this method is useful if you actually implemented a range control widget such as <a href="qscrollbar.html">QScrollBar</a> and want to handle mouse press events. This function then maps screen coordinates to the logical values.</p>
<p><b>See also </b><a href="q3rangecontrol.html#positionFromValue">positionFromValue</a>().</p>
<!-- @@@valueFromPosition -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>