Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5223

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" />
<!-- qspinbox.cpp -->
  <title>Qt 4.8: QDoubleSpinBox 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><a href="qtgui.html">QtGui</a></li>
<li>QDoubleSpinBox</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="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QDoubleSpinBox Class Reference</h1>
<!-- $$$QDoubleSpinBox-brief -->
<p>The QDoubleSpinBox class provides a spin box widget that takes doubles. <a href="#details">More...</a></p>
<!-- @@@QDoubleSpinBox -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDoubleSpinBox&gt;</span></pre><p><b>Inherits: </b><a href="qabstractspinbox.html">QAbstractSpinBox</a>.</p>
<ul>
<li><a href="qdoublespinbox-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qdoublespinbox.html#cleanText-prop">cleanText</a></b> : const QString</li>
<li class="fn"><b><a href="qdoublespinbox.html#decimals-prop">decimals</a></b> : int</li>
<li class="fn"><b><a href="qdoublespinbox.html#maximum-prop">maximum</a></b> : double</li>
<li class="fn"><b><a href="qdoublespinbox.html#minimum-prop">minimum</a></b> : double</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qdoublespinbox.html#prefix-prop">prefix</a></b> : QString</li>
<li class="fn"><b><a href="qdoublespinbox.html#singleStep-prop">singleStep</a></b> : double</li>
<li class="fn"><b><a href="qdoublespinbox.html#suffix-prop">suffix</a></b> : QString</li>
<li class="fn"><b><a href="qdoublespinbox.html#value-prop">value</a></b> : double</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">11 properties inherited from <a href="qabstractspinbox.html#properties">QAbstractSpinBox</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</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="qdoublespinbox.html#QDoubleSpinBox">QDoubleSpinBox</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#cleanText-prop">cleanText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#decimals-prop">decimals</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#maximum-prop">maximum</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#minimum-prop">minimum</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#prefix-prop">prefix</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#decimals-prop">setDecimals</a></b> ( int <i>prec</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#maximum-prop">setMaximum</a></b> ( double <i>max</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#minimum-prop">setMinimum</a></b> ( double <i>min</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#prefix-prop">setPrefix</a></b> ( const QString &amp; <i>prefix</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#setRange">setRange</a></b> ( double <i>minimum</i>, double <i>maximum</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#singleStep-prop">setSingleStep</a></b> ( double <i>val</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#suffix-prop">setSuffix</a></b> ( const QString &amp; <i>suffix</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#singleStep-prop">singleStep</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#suffix-prop">suffix</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#textFromValue">textFromValue</a></b> ( double <i>value</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#value-prop">value</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual double </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#valueFromText">valueFromText</a></b> ( const QString &amp; <i>text</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#fixup">fixup</a></b> ( QString &amp; <i>input</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QValidator::State </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#validate">validate</a></b> ( QString &amp; <i>text</i>, int &amp; <i>pos</i> ) const</td></tr>
</table>
<ul>
<li class="fn">28 public functions inherited from <a href="qabstractspinbox.html#public-functions">QAbstractSpinBox</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#value-prop">setValue</a></b> ( double <i>val</i> )</td></tr>
</table>
<ul>
<li class="fn">4 public slots inherited from <a href="qabstractspinbox.html#public-slots">QAbstractSpinBox</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#valueChanged">valueChanged</a></b> ( double <i>d</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdoublespinbox.html#valueChanged-2">valueChanged</a></b> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qabstractspinbox.html#signals">QAbstractSpinBox</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">20 protected functions inherited from <a href="qabstractspinbox.html#protected-functions">QAbstractSpinBox</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDoubleSpinBox-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDoubleSpinBox class provides a spin box widget that takes doubles.</p>
<p>QDoubleSpinBox allows the user to choose a value by clicking the up and down buttons or by pressing Up or Down on the keyboard to increase or decrease the value currently displayed. The user can also type the value in manually. The spin box supports double values but can be extended to use different strings with <a href="qdoublespinbox.html#validate">validate</a>(), <a href="qdoublespinbox.html#textFromValue">textFromValue</a>() and <a href="qdoublespinbox.html#valueFromText">valueFromText</a>().</p>
<p>Every time the value changes QDoubleSpinBox emits the <a href="qdoublespinbox.html#valueChanged">valueChanged</a>() signal. The current value can be fetched with <a href="qdoublespinbox.html#value-prop">value</a>() and set with <a href="qdoublespinbox.html#value-prop">setValue</a>().</p>
<p>Note: QDoubleSpinBox will round numbers so they can be displayed with the current precision. In a QDoubleSpinBox with decimals set to 2, calling setValue(2.555) will cause <a href="qdoublespinbox.html#value-prop">value</a>() to return 2.56.</p>
<p>Clicking the up and down buttons or using the keyboard accelerator's Up and Down arrows will increase or decrease the current value in steps of size <a href="qdoublespinbox.html#singleStep-prop">singleStep</a>(). If you want to change this behavior you can reimplement the virtual function <a href="qabstractspinbox.html#stepBy">stepBy</a>(). The minimum and maximum value and the step size can be set using one of the constructors, and can be changed later with <a href="qdoublespinbox.html#minimum-prop">setMinimum</a>(), <a href="qdoublespinbox.html#maximum-prop">setMaximum</a>() and <a href="qdoublespinbox.html#singleStep-prop">setSingleStep</a>(). The spinbox has a default precision of 2 decimal places but this can be changed using <a href="qdoublespinbox.html#decimals-prop">setDecimals</a>().</p>
<p>Most spin boxes are directional, but QDoubleSpinBox can also operate as a circular spin box, i.e&#x2e; if the range is 0.0-99.9 and the current value is 99.9, clicking &quot;up&quot; will give 0 if <a href="qabstractspinbox.html#wrapping-prop">wrapping</a>() is set to true. Use <a href="qabstractspinbox.html#wrapping-prop">setWrapping</a>() if you want circular behavior.</p>
<p>The displayed value can be prepended and appended with arbitrary strings indicating, for example, currency or the unit of measurement. See <a href="qdoublespinbox.html#prefix-prop">setPrefix</a>() and <a href="qdoublespinbox.html#suffix-prop">setSuffix</a>(). The text in the spin box is retrieved with <a href="qabstractspinbox.html#text-prop">text</a>() (which includes any <a href="qdoublespinbox.html#prefix-prop">prefix</a>() and <a href="qdoublespinbox.html#suffix-prop">suffix</a>()), or with <a href="qdoublespinbox.html#cleanText-prop">cleanText</a>() (which has no <a href="qdoublespinbox.html#prefix-prop">prefix</a>(), no <a href="qdoublespinbox.html#suffix-prop">suffix</a>() and no leading or trailing whitespace).</p>
<p>It is often desirable to give the user a special (often default) choice in addition to the range of numeric values. See <a href="qabstractspinbox.html#specialValueText-prop">setSpecialValueText</a>() for how to do this with QDoubleSpinBox.</p>
</div>
<p><b>See also </b><a href="qspinbox.html">QSpinBox</a>, <a href="qdatetimeedit.html">QDateTimeEdit</a>, <a href="qslider.html">QSlider</a>, and <a href="widgets-spinboxes.html">Spin Boxes Example</a>.</p>
<!-- @@@QDoubleSpinBox -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$cleanText-prop$$$cleanText -->
<h3 class="fn"><a name="cleanText-prop"></a><span class="name">cleanText</span> : const <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>cleanText</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="qabstractspinbox.html#text-prop">text</a>, <a href="qdoublespinbox.html#prefix-prop">QDoubleSpinBox::prefix</a>, and <a href="qdoublespinbox.html#suffix-prop">QDoubleSpinBox::suffix</a>.</p>
<!-- @@@cleanText -->
<!-- $$$decimals-prop$$$decimals$$$setDecimalsint -->
<h3 class="fn"><a name="decimals-prop"></a><span class="name">decimals</span> : <span class="type">int</span></h3>
<p>This property holds the precision of the spin box, in decimals.</p>
<p>Sets how many decimals the spinbox will use for displaying and interpreting doubles.</p>
<p><b>Warning:</b> The maximum value for <i>decimals</i> is DBL_MAX_10_EXP + DBL_DIG (ie. 323) because of the limitations of the double type.</p>
<p>Note: The maximum, minimum and value might change as a result of changing this property.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>decimals</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDecimals</b></span> ( int <i>prec</i> )</td></tr>
</table>
<!-- @@@decimals -->
<!-- $$$maximum-prop$$$maximum$$$setMaximumdouble -->
<h3 class="fn"><a name="maximum-prop"></a><span class="name">maximum</span> : <span class="type">double</span></h3>
<p>This property holds the maximum value of the spin box.</p>
<p>When setting this property the <a href="qdoublespinbox.html#minimum-prop">minimum</a> is adjusted if necessary, to ensure that the range remains valid.</p>
<p>The default maximum value is 99.99.</p>
<p>Note: The maximum value will be rounded to match the decimals property.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>maximum</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaximum</b></span> ( double <i>max</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdoublespinbox.html#decimals-prop">decimals</a> and <a href="qdoublespinbox.html#setRange">setRange</a>().</p>
<!-- @@@maximum -->
<!-- $$$minimum-prop$$$minimum$$$setMinimumdouble -->
<h3 class="fn"><a name="minimum-prop"></a><span class="name">minimum</span> : <span class="type">double</span></h3>
<p>This property holds the minimum value of the spin box.</p>
<p>When setting this property the <a href="qdoublespinbox.html#maximum-prop">maximum</a> is adjusted if necessary to ensure that the range remains valid.</p>
<p>The default minimum value is 0.0&#x2e;</p>
<p>Note: The minimum value will be rounded to match the decimals property.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>minimum</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMinimum</b></span> ( double <i>min</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdoublespinbox.html#decimals-prop">decimals</a>, <a href="qdoublespinbox.html#setRange">setRange</a>(), and <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>.</p>
<!-- @@@minimum -->
<!-- $$$prefix-prop$$$prefix$$$setPrefixconstQString& -->
<h3 class="fn"><a name="prefix-prop"></a><span class="name">prefix</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the spin box's prefix.</p>
<p>The prefix is prepended to the start of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:</p>
<pre class="cpp"> spinbox<span class="operator">-</span><span class="operator">&gt;</span>setPrefix(<span class="string">&quot;$&quot;</span>);</pre>
<p>To turn off the prefix display, set this property to an empty string. The default is no prefix. The prefix is not displayed when <a href="qdoublespinbox.html#value-prop">value</a>() == <a href="qdoublespinbox.html#minimum-prop">minimum</a>() and <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() is set.</p>
<p>If no prefix is set, prefix() returns an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>prefix</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPrefix</b></span> ( const QString &amp; <i>prefix</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdoublespinbox.html#suffix-prop">suffix</a>(), <a href="qdoublespinbox.html#suffix-prop">setSuffix</a>(), <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>(), and <a href="qabstractspinbox.html#specialValueText-prop">setSpecialValueText</a>().</p>
<!-- @@@prefix -->
<!-- $$$singleStep-prop$$$singleStep$$$setSingleStepdouble -->
<h3 class="fn"><a name="singleStep-prop"></a><span class="name">singleStep</span> : <span class="type">double</span></h3>
<p>This property holds the step value.</p>
<p>When the user uses the arrows to change the spin box's value the value will be incremented/decremented by the amount of the singleStep. The default value is 1.0&#x2e; Setting a singleStep value of less than 0 does nothing.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>singleStep</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSingleStep</b></span> ( double <i>val</i> )</td></tr>
</table>
<!-- @@@singleStep -->
<!-- $$$suffix-prop$$$suffix$$$setSuffixconstQString& -->
<h3 class="fn"><a name="suffix-prop"></a><span class="name">suffix</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the suffix of the spin box.</p>
<p>The suffix is appended to the end of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:</p>
<pre class="cpp"> spinbox<span class="operator">-</span><span class="operator">&gt;</span>setSuffix(<span class="string">&quot; km&quot;</span>);</pre>
<p>To turn off the suffix display, set this property to an empty string. The default is no suffix. The suffix is not displayed for the <a href="qdoublespinbox.html#minimum-prop">minimum</a>() if <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() is set.</p>
<p>If no suffix is set, suffix() returns an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>suffix</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSuffix</b></span> ( const QString &amp; <i>suffix</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdoublespinbox.html#prefix-prop">prefix</a>(), <a href="qdoublespinbox.html#prefix-prop">setPrefix</a>(), <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>(), and <a href="qabstractspinbox.html#specialValueText-prop">setSpecialValueText</a>().</p>
<!-- @@@suffix -->
<!-- $$$value-prop$$$value$$$setValuedouble$$$valueChangeddouble$$$valueChangedconstQString& -->
<h3 class="fn"><a name="value-prop"></a><span class="name">value</span> : <span class="type">double</span></h3>
<p>This property holds the value of the spin box.</p>
<p>setValue() will emit <a href="qdoublespinbox.html#valueChanged">valueChanged</a>() if the new value is different from the old one.</p>
<p>Note: The value will be rounded so it can be displayed with the current setting of decimals.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> double </td><td class="memItemRight bottomAlign"><span class="name"><b>value</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setValue</b></span> ( double <i>val</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdoublespinbox.html#valueChanged">valueChanged</a></b></span> ( double <i>d</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdoublespinbox.html#valueChanged-2">valueChanged</a></b></span> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdoublespinbox.html#decimals-prop">decimals</a>.</p>
<!-- @@@value -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDoubleSpinBox[overload1]$$$QDoubleSpinBoxQWidget* -->
<h3 class="fn"><a name="QDoubleSpinBox"></a>QDoubleSpinBox::<span class="name">QDoubleSpinBox</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a spin box with 0.0 as minimum value and 99.99 as maximum value, a step value of 1.0 and a precision of 2 decimal places. The value is initially set to 0.00. The spin box has the given <i>parent</i>.</p>
<p><b>See also </b><a href="qdoublespinbox.html#minimum-prop">setMinimum</a>(), <a href="qdoublespinbox.html#maximum-prop">setMaximum</a>(), and <a href="qdoublespinbox.html#singleStep-prop">setSingleStep</a>().</p>
<!-- @@@QDoubleSpinBox -->
<!-- $$$fixup[overload1]$$$fixupQString& -->
<h3 class="fn"><a name="fixup"></a><span class="type">void</span> QDoubleSpinBox::<span class="name">fixup</span> ( <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>input</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractspinbox.html#fixup">QAbstractSpinBox::fixup</a>().</p>
<!-- @@@fixup -->
<!-- $$$setRange[overload1]$$$setRangedoubledouble -->
<h3 class="fn"><a name="setRange"></a><span class="type">void</span> QDoubleSpinBox::<span class="name">setRange</span> ( <span class="type">double</span> <i>minimum</i>, <span class="type">double</span> <i>maximum</i> )</h3>
<p>Convenience function to set the <i>minimum</i> and <i>maximum</i> values with a single function call.</p>
<p>Note: The maximum and minimum values will be rounded to match the decimals property.</p>
<pre class="cpp"> setRange(minimum<span class="operator">,</span> maximum);</pre>
<p>is equivalent to:</p>
<pre class="cpp"> <a href="qdoublespinbox.html#minimum-prop">setMinimum</a>(minimum);
 <a href="qdoublespinbox.html#maximum-prop">setMaximum</a>(maximum);</pre>
<p><b>See also </b><a href="qdoublespinbox.html#minimum-prop">minimum</a> and <a href="qdoublespinbox.html#maximum-prop">maximum</a>.</p>
<!-- @@@setRange -->
<!-- $$$textFromValue[overload1]$$$textFromValuedouble -->
<h3 class="fn"><a name="textFromValue"></a><span class="type"><a href="qstring.html">QString</a></span> QDoubleSpinBox::<span class="name">textFromValue</span> ( <span class="type">double</span> <i>value</i> ) const<tt> [virtual]</tt></h3>
<p>This virtual function is used by the spin box whenever it needs to display the given <i>value</i>. The default implementation returns a string containing <i>value</i> printed using <a href="qwidget.html#locale-prop">QWidget::locale</a>().toString(<i>value</i>, <a href="qlatin1char.html">QLatin1Char</a>('f'), <a href="qdoublespinbox.html#decimals-prop">decimals</a>()) and will remove the thousand separator. Reimplementations may return anything.</p>
<p>Note: <a href="qdoublespinbox.html">QDoubleSpinBox</a> does not call this function for <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() and that neither <a href="qdoublespinbox.html#prefix-prop">prefix</a>() nor <a href="qdoublespinbox.html#suffix-prop">suffix</a>() should be included in the return value.</p>
<p>If you reimplement this, you may also need to reimplement <a href="qdoublespinbox.html#valueFromText">valueFromText</a>().</p>
<p><b>See also </b><a href="qdoublespinbox.html#valueFromText">valueFromText</a>() and <a href="qlocale.html#groupSeparator">QLocale::groupSeparator</a>().</p>
<!-- @@@textFromValue -->
<!-- $$$validate[overload1]$$$validateQString&int& -->
<h3 class="fn"><a name="validate"></a><span class="type"><a href="qvalidator.html#State-enum">QValidator::State</a></span> QDoubleSpinBox::<span class="name">validate</span> ( <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> &amp; <i>pos</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractspinbox.html#validate">QAbstractSpinBox::validate</a>().</p>
<!-- @@@validate -->
<!-- $$$valueChanged[overload1]$$$valueChangeddouble -->
<h3 class="fn"><a name="valueChanged"></a><span class="type">void</span> QDoubleSpinBox::<span class="name">valueChanged</span> ( <span class="type">double</span> <i>d</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the spin box's value is changed. The new value is passed in <i>d</i>.</p>
<!-- @@@valueChanged -->
<!-- $$$valueChanged$$$valueChangedconstQString& -->
<h3 class="fn"><a name="valueChanged-2"></a><span class="type">void</span> QDoubleSpinBox::<span class="name">valueChanged</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>The new value is passed literally in <i>text</i> with no <a href="qdoublespinbox.html#prefix-prop">prefix</a>() or <a href="qdoublespinbox.html#suffix-prop">suffix</a>().</p>
<!-- @@@valueChanged -->
<!-- $$$valueFromText[overload1]$$$valueFromTextconstQString& -->
<h3 class="fn"><a name="valueFromText"></a><span class="type">double</span> QDoubleSpinBox::<span class="name">valueFromText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> ) const<tt> [virtual]</tt></h3>
<p>This virtual function is used by the spin box whenever it needs to interpret <i>text</i> entered by the user as a value.</p>
<p>Subclasses that need to display spin box values in a non-numeric way need to reimplement this function.</p>
<p>Note: <a href="qdoublespinbox.html">QDoubleSpinBox</a> handles <a href="qabstractspinbox.html#specialValueText-prop">specialValueText</a>() separately; this function is only concerned with the other values.</p>
<p><b>See also </b><a href="qdoublespinbox.html#textFromValue">textFromValue</a>() and <a href="qdoublespinbox.html#validate">validate</a>().</p>
<!-- @@@valueFromText -->
</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>