Sophie

Sophie

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

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" />
<!-- qbrush.cpp -->
  <title>Qt 4.8: QGradient 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>QGradient</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-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QGradient Class Reference</h1>
<!-- $$$QGradient-brief -->
<p>The QGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify gradient fills. <a href="#details">More...</a></p>
<!-- @@@QGradient -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QGradient&gt;</span></pre><p><b>Inherited by: </b><a href="qconicalgradient.html">QConicalGradient</a>, <a href="qlineargradient.html">QLinearGradient</a>, and <a href="qradialgradient.html">QRadialGradient</a>.</p>
<ul>
<li><a href="qgradient-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#CoordinateMode-enum">CoordinateMode</a></b> { LogicalMode, StretchToDeviceMode, ObjectBoundingMode }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#Spread-enum">Spread</a></b> { PadSpread, RepeatSpread, ReflectSpread }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#Type-enum">Type</a></b> { LinearGradient, RadialGradient, ConicalGradient, NoGradient }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> CoordinateMode </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#coordinateMode">coordinateMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#setColorAt">setColorAt</a></b> ( qreal <i>position</i>, const QColor &amp; <i>color</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#setCoordinateMode">setCoordinateMode</a></b> ( CoordinateMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#setSpread">setSpread</a></b> ( Spread <i>method</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#setStops">setStops</a></b> ( const QGradientStops &amp; <i>stopPoints</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Spread </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#spread">spread</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGradientStops </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#stops">stops</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#operator-not-eq">operator!=</a></b> ( const QGradient &amp; <i>gradient</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#operator-eq-eq">operator==</a></b> ( const QGradient &amp; <i>gradient</i> ) const</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#QGradientStop-typedef">QGradientStop</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qgradient.html#QGradientStops-typedef">QGradientStops</a></b></td></tr>
</table>
<a name="details"></a>
<!-- $$$QGradient-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGradient class is used in combination with <a href="qbrush.html">QBrush</a> to specify gradient fills.</p>
<p>Qt currently supports three types of gradient fills:</p>
<ul>
<li><i>Linear</i> gradients interpolate colors between start and end points.</li>
<li><i>Simple</i> radial gradients interpolate colors between a focal point and end points on a circle surrounding it.</li>
<li><i>Extended</i> radial gradients interpolate colors between a center and a focal circle.</li>
<li><i>Conical</i> gradients interpolate colors around a center point.</li>
</ul>
<p>A gradient's type can be retrieved using the <a href="qgradient.html#type">type</a>() function. Each of the types is represented by a subclass of QGradient:</p>
<table class="generic">
<thead><tr class="qt-style"><th ><a href="qlineargradient.html">QLinearGradient</a></th><th ><a href="qradialgradient.html">QRadialGradient</a></th><th ><a href="qconicalgradient.html">QConicalGradient</a></th></tr></thead>
<tr valign="top" class="odd"><td ><img src="images/qgradient-linear.png" alt="" /></td><td ><img src="images/qgradient-radial.png" alt="" /></td><td ><img src="images/qgradient-conical.png" alt="" /></td></tr>
</table>
<p>The colors in a gradient are defined using stop points of the <a href="qgradient.html#QGradientStop-typedef">QGradientStop</a> type; i.e&#x2e;, a position and a color. Use the <a href="qgradient.html#setColorAt">setColorAt</a>() function to define a single stop point. Alternatively, use the <a href="qgradient.html#setStops">setStops</a>() function to define several stop points in one go. Note that the latter function <i>replaces</i> the current set of stop points.</p>
<p>It is the gradient's complete set of stop points (accessible through the <a href="qgradient.html#stops">stops</a>() function) that describes how the gradient area should be filled. If no stop points have been specified, a gradient of black at 0 to white at 1 is used.</p>
<p>A diagonal linear gradient from black at (100, 100) to white at (200, 200) could be specified like this:</p>
<pre class="cpp">     <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> linearGrad(<span class="type"><a href="qpointf.html">QPointF</a></span>(<span class="number">100</span><span class="operator">,</span> <span class="number">100</span>)<span class="operator">,</span> <span class="type"><a href="qpointf.html">QPointF</a></span>(<span class="number">200</span><span class="operator">,</span> <span class="number">200</span>));
     linearGrad<span class="operator">.</span>setColorAt(<span class="number">0</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>black);
     linearGrad<span class="operator">.</span>setColorAt(<span class="number">1</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>white);</pre>
<p>A gradient can have an arbitrary number of stop points. The following would create a radial gradient starting with red in the center, blue and then green on the edges:</p>
<pre class="cpp">     <span class="type"><a href="qradialgradient.html">QRadialGradient</a></span> radialGrad(<span class="type"><a href="qpointf.html">QPointF</a></span>(<span class="number">100</span><span class="operator">,</span> <span class="number">100</span>)<span class="operator">,</span> <span class="number">100</span>);
     radialGrad<span class="operator">.</span>setColorAt(<span class="number">0</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>red);
     radialGrad<span class="operator">.</span>setColorAt(<span class="number">0.5</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>blue);
     radialGrad<span class="operator">.</span>setColorAt(<span class="number">1</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>green);</pre>
<p>It is possible to repeat or reflect the gradient outside its area by specifiying the <a href="qgradient.html#Spread-enum">spread method</a> using the <a href="qgradient.html#setSpread">setSpread</a>() function. The default is to pad the outside area with the color at the closest stop point. The currently set <a href="qgradient.html#Spread-enum">spread method</a> can be retrieved using the <a href="qgradient.html#spread">spread</a>() function. The <a href="qgradient.html#Spread-enum">QGradient::Spread</a> enum defines three different methods:</p>
<table class="generic">
<tr valign="top" class="odd"><td ><img src="images/qradialgradient-pad.png" alt="" /></td><td ><img src="images/qradialgradient-repeat.png" alt="" /></td><td ><img src="images/qradialgradient-reflect.png" alt="" /></td></tr>
<tr valign="top" class="even"><td ><a href="qgradient.html#Spread-enum">PadSpread</a></td><td ><a href="qgradient.html#Spread-enum">RepeatSpread</a></td><td ><a href="qgradient.html#Spread-enum">ReflectSpread</a></td></tr>
</table>
<p>Note that the <a href="qgradient.html#setSpread">setSpread</a>() function only has effect for linear and radial gradients. The reason is that the conical gradient is closed by definition, i.e&#x2e; the <i>conical</i> gradient fills the entire circle from 0 - 360 degrees, while the boundary of a radial or a linear gradient can be specified through its radius or final stop points, respectively.</p>
<p>The gradient coordinates can be specified in logical coordinates, relative to device coordinates, or relative to object bounding box coordinates. The <a href="qgradient.html#CoordinateMode-enum">coordinate mode</a> can be set using the <a href="qgradient.html#setCoordinateMode">setCoordinateMode</a>() function. The default is <a href="qgradient.html#CoordinateMode-enum">LogicalMode</a>, where the gradient coordinates are specified in the same way as the object coordinates. To retrieve the currently set <a href="qgradient.html#CoordinateMode-enum">coordinate mode</a> use <a href="qgradient.html#coordinateMode">coordinateMode</a>().</p>
</div>
<p><b>See also </b><a href="demos-gradients.html">The Gradients Demo</a> and <a href="qbrush.html">QBrush</a>.</p>
<!-- @@@QGradient -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CoordinateMode$$$LogicalMode$$$StretchToDeviceMode$$$ObjectBoundingMode -->
<h3 class="fn"><a name="CoordinateMode-enum"></a>enum QGradient::<span class="name">CoordinateMode</span></h3>
<p>This enum specifies how gradient coordinates map to the paint device on which the gradient is used.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QGradient::LogicalMode</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">This is the default mode. The gradient coordinates are specified logical space just like the object coordinates.</td></tr>
<tr><td class="topAlign"><tt>QGradient::StretchToDeviceMode</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">In this mode the gradient coordinates are relative to the bounding rectangle of the paint device, with (0,0) in the top left corner, and (1,1) in the bottom right corner of the paint device.</td></tr>
<tr><td class="topAlign"><tt>QGradient::ObjectBoundingMode</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">In this mode the gradient coordinates are relative to the bounding rectangle of the object being drawn, with (0,0) in the top left corner, and (1,1) in the bottom right corner of the object's bounding rectangle.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.4.</p>
<!-- @@@CoordinateMode -->
<!-- $$$Spread$$$PadSpread$$$ReflectSpread$$$RepeatSpread -->
<h3 class="fn"><a name="Spread-enum"></a>enum QGradient::<span class="name">Spread</span></h3>
<p>Specifies how the area outside the gradient area should be filled.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QGradient::PadSpread</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The area is filled with the closest stop color. This is the default.</td></tr>
<tr><td class="topAlign"><tt>QGradient::RepeatSpread</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The gradient is repeated outside the gradient area.</td></tr>
<tr><td class="topAlign"><tt>QGradient::ReflectSpread</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The gradient is reflected outside the gradient area.</td></tr>
</table>
<p><b>See also </b><a href="qgradient.html#spread">spread</a>() and <a href="qgradient.html#setSpread">setSpread</a>().</p>
<!-- @@@Spread -->
<!-- $$$Type$$$LinearGradient$$$RadialGradient$$$ConicalGradient$$$NoGradient -->
<h3 class="fn"><a name="Type-enum"></a>enum QGradient::<span class="name">Type</span></h3>
<p>Specifies the type of gradient.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QGradient::LinearGradient</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Interpolates colors between start and end points (<a href="qlineargradient.html">QLinearGradient</a>).</td></tr>
<tr><td class="topAlign"><tt>QGradient::RadialGradient</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Interpolate colors between a focal point and end points on a circle surrounding it (<a href="qradialgradient.html">QRadialGradient</a>).</td></tr>
<tr><td class="topAlign"><tt>QGradient::ConicalGradient</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Interpolate colors around a center point (<a href="qconicalgradient.html">QConicalGradient</a>).</td></tr>
<tr><td class="topAlign"><tt>QGradient::NoGradient</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">No gradient is used.</td></tr>
</table>
<p><b>See also </b><a href="qgradient.html#type">type</a>().</p>
<!-- @@@Type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$coordinateMode[overload1]$$$coordinateMode -->
<h3 class="fn"><a name="coordinateMode"></a><span class="type"><a href="qgradient.html#CoordinateMode-enum">CoordinateMode</a></span> QGradient::<span class="name">coordinateMode</span> () const</h3>
<p>Returns the coordinate mode of this gradient. The default mode is <a href="qgradient.html#CoordinateMode-enum">LogicalMode</a>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qgradient.html#setCoordinateMode">setCoordinateMode</a>().</p>
<!-- @@@coordinateMode -->
<!-- $$$setColorAt[overload1]$$$setColorAtqrealconstQColor& -->
<h3 class="fn"><a name="setColorAt"></a><span class="type">void</span> QGradient::<span class="name">setColorAt</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>position</i>, const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>color</i> )</h3>
<p>Creates a stop point at the given <i>position</i> with the given <i>color</i>. The given <i>position</i> must be in the range 0 to 1.</p>
<p><b>See also </b><a href="qgradient.html#setStops">setStops</a>() and <a href="qgradient.html#stops">stops</a>().</p>
<!-- @@@setColorAt -->
<!-- $$$setCoordinateMode[overload1]$$$setCoordinateModeCoordinateMode -->
<h3 class="fn"><a name="setCoordinateMode"></a><span class="type">void</span> QGradient::<span class="name">setCoordinateMode</span> ( <span class="type"><a href="qgradient.html#CoordinateMode-enum">CoordinateMode</a></span> <i>mode</i> )</h3>
<p>Sets the coordinate mode of this gradient to <i>mode</i>. The default mode is <a href="qgradient.html#CoordinateMode-enum">LogicalMode</a>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qgradient.html#coordinateMode">coordinateMode</a>().</p>
<!-- @@@setCoordinateMode -->
<!-- $$$setSpread[overload1]$$$setSpreadSpread -->
<h3 class="fn"><a name="setSpread"></a><span class="type">void</span> QGradient::<span class="name">setSpread</span> ( <span class="type"><a href="qgradient.html#Spread-enum">Spread</a></span> <i>method</i> )</h3>
<p>Specifies the spread <i>method</i> that should be used for this gradient.</p>
<p>Note that this function only has effect for linear and radial gradients.</p>
<p><b>See also </b><a href="qgradient.html#spread">spread</a>().</p>
<!-- @@@setSpread -->
<!-- $$$setStops[overload1]$$$setStopsconstQGradientStops& -->
<h3 class="fn"><a name="setStops"></a><span class="type">void</span> QGradient::<span class="name">setStops</span> ( const <span class="type"><a href="qgradient.html#QGradientStops-typedef">QGradientStops</a></span> &amp; <i>stopPoints</i> )</h3>
<p>Replaces the current set of stop points with the given <i>stopPoints</i>. The positions of the points must be in the range 0 to 1, and must be sorted with the lowest point first.</p>
<p><b>See also </b><a href="qgradient.html#setColorAt">setColorAt</a>() and <a href="qgradient.html#stops">stops</a>().</p>
<!-- @@@setStops -->
<!-- $$$spread[overload1]$$$spread -->
<h3 class="fn"><a name="spread"></a><span class="type"><a href="qgradient.html#Spread-enum">Spread</a></span> QGradient::<span class="name">spread</span> () const</h3>
<p>Returns the spread method use by this gradient. The default is <a href="qgradient.html#Spread-enum">PadSpread</a>.</p>
<p><b>See also </b><a href="qgradient.html#setSpread">setSpread</a>().</p>
<!-- @@@spread -->
<!-- $$$stops[overload1]$$$stops -->
<h3 class="fn"><a name="stops"></a><span class="type"><a href="qgradient.html#QGradientStops-typedef">QGradientStops</a></span> QGradient::<span class="name">stops</span> () const</h3>
<p>Returns the stop points for this gradient.</p>
<p>If no stop points have been specified, a gradient of black at 0 to white at 1 is used.</p>
<p><b>See also </b><a href="qgradient.html#setStops">setStops</a>() and <a href="qgradient.html#setColorAt">setColorAt</a>().</p>
<!-- @@@stops -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn"><a name="type"></a><span class="type"><a href="qgradient.html#Type-enum">Type</a></span> QGradient::<span class="name">type</span> () const</h3>
<p>Returns the type of gradient.</p>
<!-- @@@type -->
<!-- $$$operator!=[overload1]$$$operator!=constQGradient& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QGradient::<span class="name">operator!=</span> ( const <span class="type">QGradient</span> &amp; <i>gradient</i> ) const</h3>
<p>Returns true if the gradient is the same as the other <i>gradient</i> specified; otherwise returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qgradient.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQGradient& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QGradient::<span class="name">operator==</span> ( const <span class="type">QGradient</span> &amp; <i>gradient</i> ) const</h3>
<p>Returns true if the gradient is the same as the other <i>gradient</i> specified; otherwise returns false.</p>
<p><b>See also </b><a href="qgradient.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$QGradientStop -->
<h3 class="fn"><a name="QGradientStop-typedef"></a>typedef <span class="name">QGradientStop</span></h3>
<p>Typedef for <a href="qpair.html">QPair</a>&lt;<a href="qtglobal.html#qreal-typedef">qreal</a>, <a href="qcolor.html">QColor</a>&gt;.</p>
<!-- @@@QGradientStop -->
<!-- $$$QGradientStops -->
<h3 class="fn"><a name="QGradientStops-typedef"></a>typedef <span class="name">QGradientStops</span></h3>
<p>Typedef for <a href="qvector.html">QVector</a>&lt;<a href="qgradient.html#QGradientStop-typedef">QGradientStop</a>&gt;.</p>
<!-- @@@QGradientStops -->
</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>