Sophie

Sophie

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

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" />
<!-- qdeclarativeimageprovider.cpp -->
  <title>Qt 4.8: QDeclarativeImageProvider 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="qtdeclarative.html">QtDeclarative</a></li>
<li>QDeclarativeImageProvider</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="#details">Detailed Description</a></li>
<li class="level2"><a href="#an-example">An example</a></li>
<li class="level2"><a href="#asynchronous-image-loading">Asynchronous image loading</a></li>
<li class="level2"><a href="#image-caching">Image caching</a></li>
</ul>
</div>
<h1 class="title">QDeclarativeImageProvider Class Reference</h1>
<!-- $$$QDeclarativeImageProvider-brief -->
<p>The QDeclarativeImageProvider class provides an interface for supporting pixmaps and threaded image requests in QML. <a href="#details">More...</a></p>
<!-- @@@QDeclarativeImageProvider -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDeclarativeImageProvider&gt;</span></pre><p>This class was introduced in Qt 4.7.</p>
<ul>
<li><a href="qdeclarativeimageprovider-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="qdeclarativeimageprovider.html#ImageType-enum">ImageType</a></b> { Image, Pixmap }</td></tr>
</table>
<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="qdeclarativeimageprovider.html#QDeclarativeImageProvider">QDeclarativeImageProvider</a></b> ( ImageType <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeimageprovider.html#dtor.QDeclarativeImageProvider">~QDeclarativeImageProvider</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ImageType </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeimageprovider.html#imageType">imageType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QImage </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeimageprovider.html#requestImage">requestImage</a></b> ( const QString &amp; <i>id</i>, QSize * <i>size</i>, const QSize &amp; <i>requestedSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeimageprovider.html#requestPixmap">requestPixmap</a></b> ( const QString &amp; <i>id</i>, QSize * <i>size</i>, const QSize &amp; <i>requestedSize</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QDeclarativeImageProvider-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDeclarativeImageProvider class provides an interface for supporting pixmaps and threaded image requests in QML.</p>
<p>QDeclarativeImageProvider is used to provide advanced image loading features in QML applications. It allows images in QML to be:</p>
<ul>
<li>Loaded using QPixmaps rather than actual image files</li>
<li>Loaded asynchronously in a separate thread, if <a href="qdeclarativeimageprovider.html#imageType">imageType</a>() is <a href="qdeclarativeimageprovider.html#ImageType-enum">ImageType::Image</a></li>
</ul>
<p>To specify that an image should be loaded by an image provider, use the <b>&quot;image:&quot;</b> scheme for the URL source of the image, followed by the identifiers of the image provider and the requested image. For example:</p>
<pre class="qml"> <span class="type"><a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a></span> { <span class="name">source</span>: <span class="string">&quot;image://myimageprovider/image.png&quot;</span> }</pre>
<p>This specifies that the image should be loaded by the image provider named &quot;myimageprovider&quot;, and the image to be loaded is named &quot;image.png&quot;. The QML engine invokes the appropriate image provider according to the providers that have been registered through <a href="qdeclarativeengine.html#addImageProvider">QDeclarativeEngine::addImageProvider</a>().</p>
<p>Note that the identifiers are case-insensitive, but the rest of the URL will be passed on with preserved case. For example, the below snippet would still specify that the image is loaded by the image provider named &quot;myimageprovider&quot;, but it would request a different image than the above snippet (&quot;Image.png&quot; instead of &quot;image.png&quot;).</p>
<pre class="qml"> <span class="type"><a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a></span> { <span class="name">source</span>: <span class="string">&quot;image://MyImageProvider/Image.png&quot;</span> }</pre>
<p>If you want the rest of the URL to be case insensitive, you will have to take care of that yourself inside your image provider.</p>
<a name="an-example"></a>
<h4>An example</h4>
<p>Here are two images. Their <tt>source</tt> values indicate they should be loaded by an image provider named &quot;colors&quot;, and the images to be loaded are &quot;yellow&quot; and &quot;red&quot;, respectively:</p>
<pre class="qml"> <span class="type"><a href="qml-column.html">Column</a></span> {
     <span class="type"><a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a></span> { <span class="name">source</span>: <span class="string">&quot;image://colors/yellow&quot;</span> }
     <span class="type"><a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a></span> { <span class="name">source</span>: <span class="string">&quot;image://colors/red&quot;</span> }
 }</pre>
<p>When these images are loaded by QML, it looks for a matching image provider and calls its <a href="qdeclarativeimageprovider.html#requestImage">requestImage</a>() or <a href="qdeclarativeimageprovider.html#requestPixmap">requestPixmap</a>() method (depending on its <a href="qdeclarativeimageprovider.html#imageType">imageType</a>()) to load the image. The method is called with the <tt>id</tt> parameter set to &quot;yellow&quot; for the first image, and &quot;red&quot; for the second.</p>
<p>Here is an image provider implementation that can load the images requested by the above QML. This implementation dynamically generates <a href="qpixmap.html">QPixmap</a> images that are filled with the requested color:</p>
<pre class="cpp"> <span class="keyword">class</span> ColorImageProvider : <span class="keyword">public</span> <span class="type">QDeclarativeImageProvider</span>
 {
 <span class="keyword">public</span>:
     ColorImageProvider()
         : <span class="type">QDeclarativeImageProvider</span>(<span class="type">QDeclarativeImageProvider</span><span class="operator">::</span>Pixmap)
     {
     }

     <span class="type"><a href="qpixmap.html">QPixmap</a></span> requestPixmap(<span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&amp;</span>id<span class="operator">,</span> <span class="type"><a href="qsize.html">QSize</a></span> <span class="operator">*</span>size<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qsize.html">QSize</a></span> <span class="operator">&amp;</span>requestedSize)
     {
         <span class="type">int</span> width <span class="operator">=</span> <span class="number">100</span>;
         <span class="type">int</span> height <span class="operator">=</span> <span class="number">50</span>;

         <span class="keyword">if</span> (size)
             <span class="operator">*</span>size <span class="operator">=</span> <span class="type"><a href="qsize.html">QSize</a></span>(width<span class="operator">,</span> height);
         <span class="type"><a href="qpixmap.html">QPixmap</a></span> pixmap(requestedSize<span class="operator">.</span>width() <span class="operator">&gt;</span> <span class="number">0</span> <span class="operator">?</span> requestedSize<span class="operator">.</span>width() : width<span class="operator">,</span>
                        requestedSize<span class="operator">.</span>height() <span class="operator">&gt;</span> <span class="number">0</span> <span class="operator">?</span> requestedSize<span class="operator">.</span>height() : height);
         pixmap<span class="operator">.</span>fill(<span class="type"><a href="qcolor.html">QColor</a></span>(id)<span class="operator">.</span>rgba());

         <span class="keyword">return</span> pixmap;
     }
 };</pre>
<p>To make this provider accessible to QML, it is registered with the QML engine with a &quot;colors&quot; identifier:</p>
<pre class="cpp"> <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
 {
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>

     <span class="type"><a href="qdeclarativeengine.html">QDeclarativeEngine</a></span> engine;
     engine<span class="operator">-</span><span class="operator">&gt;</span>addImageProvider(QLatin1String(<span class="string">&quot;colors&quot;</span>)<span class="operator">,</span> <span class="keyword">new</span> ColorPixmapProvider);

     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 }</pre>
<p>Now the images can be successfully loaded in QML:</p>
<p class="centerAlign"><img src="images/imageprovider.png" alt="" /></p><p>A complete example is available in Qt's <a href="declarative-cppextensions-imageprovider.html">examples/declarative/cppextensions/imageprovider</a> directory. Note the example registers the provider via a <a href="qdeclarativeextensionplugin.html">plugin</a> instead of registering it in the application <tt>main()</tt> function as shown above.</p>
<a name="asynchronous-image-loading"></a>
<h4>Asynchronous image loading</h4>
<p>Image providers that support <a href="qimage.html">QImage</a> loading automatically include support for asychronous loading of images. To enable asynchronous loading for an image source, set the <tt>asynchronous</tt> property to <tt>true</tt> for the relevant <a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a>, <a href="qml-borderimage.html">BorderImage</a> or <a href="qml-animatedimage.html">AnimatedImage</a> object. When this is enabled, the image request to the provider is run in a low priority thread, allowing image loading to be executed in the background, and reducing the performance impact on the user interface.</p>
<p>Asynchronous loading is not supported for image providers that provide <a href="qpixmap.html">QPixmap</a> rather than <a href="qimage.html">QImage</a> values, as pixmaps can only be created in the main thread. In this case, if <a href="qml-image.html#asynchronous-prop">asynchronous</a> is set to <tt>true</tt>, the value is ignored and the image is loaded synchronously.</p>
<a name="image-caching"></a>
<h4>Image caching</h4>
<p>Images returned by a QDeclarativeImageProvider are automatically cached, similar to any image loaded by the QML engine. When an image with a &quot;image://&quot; prefix is loaded from cache, <a href="qdeclarativeimageprovider.html#requestImage">requestImage</a>() and <a href="qdeclarativeimageprovider.html#requestPixmap">requestPixmap</a>() will not be called for the relevant image provider. If an image should always be fetched from the image provider, and should not be cached at all, set the <tt>cache</tt> property to <tt>false</tt> for the relevant <a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a>, <a href="qml-borderimage.html">BorderImage</a> or <a href="qml-animatedimage.html">AnimatedImage</a> object.</p>
</div>
<p><b>See also </b><a href="qdeclarativeengine.html#addImageProvider">QDeclarativeEngine::addImageProvider</a>().</p>
<!-- @@@QDeclarativeImageProvider -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ImageType$$$Image$$$Pixmap -->
<h3 class="fn"><a name="ImageType-enum"></a>enum QDeclarativeImageProvider::<span class="name">ImageType</span></h3>
<p>Defines the type of image supported by this image provider.</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>QDeclarativeImageProvider::Image</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The Image Provider provides <a href="qimage.html">QImage</a> images. The <a href="qdeclarativeimageprovider.html#requestImage">requestImage</a>() method will be called for all image requests.</td></tr>
<tr><td class="topAlign"><tt>QDeclarativeImageProvider::Pixmap</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The Image Provider provides <a href="qpixmap.html">QPixmap</a> images. The <a href="qdeclarativeimageprovider.html#requestPixmap">requestPixmap</a>() method will be called for all image requests.</td></tr>
</table>
<!-- @@@ImageType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDeclarativeImageProvider[overload1]$$$QDeclarativeImageProviderImageType -->
<h3 class="fn"><a name="QDeclarativeImageProvider"></a>QDeclarativeImageProvider::<span class="name">QDeclarativeImageProvider</span> ( <span class="type"><a href="qdeclarativeimageprovider.html#ImageType-enum">ImageType</a></span> <i>type</i> )</h3>
<p>Creates an image provider that will provide images of the given <i>type</i>.</p>
<!-- @@@QDeclarativeImageProvider -->
<!-- $$$~QDeclarativeImageProvider[overload1]$$$~QDeclarativeImageProvider -->
<h3 class="fn"><a name="dtor.QDeclarativeImageProvider"></a>QDeclarativeImageProvider::<span class="name">~QDeclarativeImageProvider</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the <a href="qdeclarativeimageprovider.html">QDeclarativeImageProvider</a></p>
<p><b>Note:</b> The destructor of your derived class need to be thread safe.</p>
<!-- @@@~QDeclarativeImageProvider -->
<!-- $$$imageType[overload1]$$$imageType -->
<h3 class="fn"><a name="imageType"></a><span class="type"><a href="qdeclarativeimageprovider.html#ImageType-enum">ImageType</a></span> QDeclarativeImageProvider::<span class="name">imageType</span> () const</h3>
<p>Returns the image type supported by this provider.</p>
<!-- @@@imageType -->
<!-- $$$requestImage[overload1]$$$requestImageconstQString&QSize*constQSize& -->
<h3 class="fn"><a name="requestImage"></a><span class="type"><a href="qimage.html">QImage</a></span> QDeclarativeImageProvider::<span class="name">requestImage</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>id</i>, <span class="type"><a href="qsize.html">QSize</a></span> * <i>size</i>, const <span class="type"><a href="qsize.html">QSize</a></span> &amp; <i>requestedSize</i> )<tt> [virtual]</tt></h3>
<p>Implement this method to return the image with <i>id</i>. The default implementation returns an empty image.</p>
<p>The <i>id</i> is the requested image source, with the &quot;image:&quot; scheme and provider identifier removed. For example, if the image <a href="qml-image.html#source-prop">source</a> was &quot;image://myprovider/icons/home&quot;, the given <i>id</i> would be &quot;icons/home&quot;.</p>
<p>The <i>requestedSize</i> corresponds to the <a href="qml-image.html#sourceSize-prop">Image::sourceSize</a> requested by an Image element. If <i>requestedSize</i> is a valid size, the image returned should be of that size.</p>
<p>In all cases, <i>size</i> must be set to the original size of the image. This is used to set the <a href="qml-item.html#width-prop">width</a> and <a href="qml-item.html#height-prop">height</a> of the relevant <a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a> if these values have not been set explicitly.</p>
<p><b>Note:</b> this method may be called by multiple threads, so ensure the implementation of this method is reentrant.</p>
<!-- @@@requestImage -->
<!-- $$$requestPixmap[overload1]$$$requestPixmapconstQString&QSize*constQSize& -->
<h3 class="fn"><a name="requestPixmap"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> QDeclarativeImageProvider::<span class="name">requestPixmap</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>id</i>, <span class="type"><a href="qsize.html">QSize</a></span> * <i>size</i>, const <span class="type"><a href="qsize.html">QSize</a></span> &amp; <i>requestedSize</i> )<tt> [virtual]</tt></h3>
<p>Implement this method to return the pixmap with <i>id</i>. The default implementation returns an empty pixmap.</p>
<p>The <i>id</i> is the requested image source, with the &quot;image:&quot; scheme and provider identifier removed. For example, if the image <a href="qml-image.html#source-prop">source</a> was &quot;image://myprovider/icons/home&quot;, the given <i>id</i> would be &quot;icons/home&quot;.</p>
<p>The <i>requestedSize</i> corresponds to the <a href="qml-image.html#sourceSize-prop">Image::sourceSize</a> requested by an Image element. If <i>requestedSize</i> is a valid size, the image returned should be of that size.</p>
<p>In all cases, <i>size</i> must be set to the original size of the image. This is used to set the <a href="qml-item.html#width-prop">width</a> and <a href="qml-item.html#height-prop">height</a> of the relevant <a href="qdeclarativeimageprovider.html#ImageType-enum">Image</a> if these values have not been set explicitly.</p>
<!-- @@@requestPixmap -->
</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>