Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5773

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" />
<!-- qdeclarativeanimatedimage.cpp -->
  <title>Qt 4.8: QML AnimatedImage Element</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="qdeclarativeelements.html">QML Elements</a></li>
<li>QML AnimatedImage Element</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">
<p class="naviNextPrevious headerNavi">
</p><p/>
<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="#details">Detailed Description</a></li>
<li class="level2"><a href="#example-usage">Example Usage</a></li>
</ul>
</div>
<h1 class="title">QML AnimatedImage Element</h1>
<span class="subtitle"></span>
<p>Inherits <a href="qml-image.html">Image</a></p>
<p>This element was introduced in Qt 4.7.</p>
<ul>
<li><a href="qml-animatedimage-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-animatedimage.html#asynchronous-prop">asynchronous</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#cache-prop">cache</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#currentFrame-prop">currentFrame</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#frameCount-prop">frameCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#mirror-prop">mirror</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#paused-prop">paused</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#playing-prop">playing</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-animatedimage.html#source-prop">source</a></b></b> : url</li>
</ul>
<!-- $$$AnimatedImage-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>The AnimatedImage element extends the features of the <a href="qml-image.html">Image</a> element, providing a way to play animations stored as images containing a series of frames, such as those stored in GIF files.</p>
<p>Information about the current frame and totla length of the animation can be obtained using the <a href="qml-animatedimage.html#currentFrame-prop">currentFrame</a> and <a href="qml-animatedimage.html#frameCount-prop">frameCount</a> properties. You can start, pause and stop the animation by changing the values of the <a href="qml-animatedimage.html#playing-prop">playing</a> and <a href="qml-animatedimage.html#paused-prop">paused</a> properties.</p>
<p>The full list of supported formats can be determined with <a href="qmovie.html#supportedFormats">QMovie::supportedFormats()</a>.</p>
<a name="example-usage"></a>
<h2>Example Usage</h2>
<div style="float: left; margin-right: 2em"><p class="centerAlign"><img src="images/animatedimageitem.gif" alt="" /></p></div><p>The following QML shows how to display an animated image and obtain information about its state, such as the current frame and total number of frames. The result is an animated image with a simple progress indicator underneath it.</p>
<br style="clear: both" /><pre class="qml"> import QtQuick 1.0

 <span class="type"><a href="qml-rectangle.html">Rectangle</a></span> {
     <span class="name">width</span>: <span class="name">animation</span>.<span class="name">width</span>; <span class="name">height</span>: <span class="name">animation</span>.<span class="name">height</span> <span class="operator">+</span> <span class="number">8</span>

     <span class="type">AnimatedImage</span> { <span class="name">id</span>: <span class="name">animation</span>; <span class="name">source</span>: <span class="string">&quot;animation.gif&quot;</span> }

     <span class="type"><a href="qml-rectangle.html">Rectangle</a></span> {
         property <span class="type"><a href="qml-int.html">int</a></span> <span class="name">frames</span>: <span class="name">animation</span>.<span class="name">frameCount</span>

         <span class="name">width</span>: <span class="number">4</span>; <span class="name">height</span>: <span class="number">8</span>
         <span class="name">x</span>: (<span class="name">animation</span>.<span class="name">width</span> <span class="operator">-</span> <span class="name">width</span>) <span class="operator">*</span> <span class="name">animation</span>.<span class="name">currentFrame</span> <span class="operator">/</span> <span class="name">frames</span>
         <span class="name">y</span>: <span class="name">animation</span>.<span class="name">height</span>
         <span class="name">color</span>: <span class="string">&quot;red&quot;</span>
     }
 }</pre>
<p><b>See also </b><a href="qml-borderimage.html">BorderImage</a> and <a href="qml-image.html">Image</a>.</p>
<!-- @@@AnimatedImage -->
<h2>Property Documentation</h2>
<!-- $$$asynchronous -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="asynchronous-prop"></a><span class="name">asynchronous</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Specifies that images on the local filesystem should be loaded asynchronously in a separate thread. The default value is false, causing the user interface thread to block while the image is loaded. Setting <i>asynchronous</i> to true is useful where maintaining a responsive user interface is more desirable than having images immediately visible.</p>
<p>Note that this property is only valid for images read from the local filesystem. Images loaded via a network resource (e.g&#x2e; HTTP) are always loaded asynchonously.</p>
</div></div><!-- @@@asynchronous -->
<br/>
<!-- $$$cache -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="cache-prop"></a><span class="name">cache</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>Specifies whether the image should be cached. The default value is true. Setting <i>cache</i> to false is useful when dealing with large images, to make sure that they aren't cached at the expense of small 'ui element' images.</p>
<p>This property group was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@cache -->
<br/>
<!-- $$$currentFrame -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="currentFrame-prop"></a><span class="name">currentFrame</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr><tr valign="top" class="even"><td class="tblQmlPropNode"><p><a name="frameCount-prop"></a><span class="name">frameCount</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>currentFrame is the frame that is currently visible. By monitoring this property for changes, you can animate other items at the same time as the image.</p>
<p><a href="qml-animatedimage.html#frameCount-prop">frameCount</a> is the number of frames in the animation. For some animation formats, <a href="qml-animatedimage.html#frameCount-prop">frameCount</a> is unknown and has a value of zero.</p>
</div></div><!-- @@@currentFrame -->
<br/>
<!-- $$$mirror -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="mirror-prop"></a><span class="name">mirror</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image).</p>
<p>The default value is false.</p>
<p>This property group was introduced in  QtQuick 1.1.</p>
</div></div><!-- @@@mirror -->
<br/>
<!-- $$$paused -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="paused-prop"></a><span class="name">paused</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the animated image is paused.</p>
<p>By default, this property is false. Set it to true when you want to pause the animation.</p>
</div></div><!-- @@@paused -->
<br/>
<!-- $$$playing -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="playing-prop"></a><span class="name">playing</span> : <span class="type"><a href="qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the animated image is playing.</p>
<p>By default, this property is true, meaning that the animation will start playing immediately.</p>
</div></div><!-- @@@playing -->
<br/>
<!-- $$$source -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="source-prop"></a><span class="name">source</span> : <span class="type"><a href="qml-url.html">url</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the URL that refers to the source image.</p>
<p><a href="qml-animatedimage.html">AnimatedImage</a> can handle any image format supported by Qt, loaded from any URL scheme supported by Qt.</p>
<p><b>See also </b><a href="qdeclarativeimageprovider.html">QDeclarativeImageProvider</a>.</p>
</div></div><!-- @@@source -->
<br/>
<p class="naviNextPrevious footerNavi">
</p>
      </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>