Sophie

Sophie

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

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" />
<!-- qimageiohandler.cpp -->
  <title>Qt 4.8: QImageIOHandler 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>QImageIOHandler</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>
</ul>
</div>
<h1 class="title">QImageIOHandler Class Reference</h1>
<!-- $$$QImageIOHandler-brief -->
<p>The QImageIOHandler class defines the common image I/O interface for all image formats in Qt. <a href="#details">More...</a></p>
<!-- @@@QImageIOHandler -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QImageIOHandler&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qimageiohandler-members.html">List of all members, including inherited members</a></li>
<li><a href="qimageiohandler-obsolete.html">Obsolete 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="qimageiohandler.html#ImageOption-enum">ImageOption</a></b> { Size, ClipRect, ScaledSize, ScaledClipRect, ..., ImageFormat }</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="qimageiohandler.html#QImageIOHandler">QImageIOHandler</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#dtor.QImageIOHandler">~QImageIOHandler</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#canRead">canRead</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#currentImageNumber">currentImageNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#currentImageRect">currentImageRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#device">device</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#format">format</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#imageCount">imageCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#jumpToImage">jumpToImage</a></b> ( int <i>imageNumber</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#jumpToNextImage">jumpToNextImage</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#loopCount">loopCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#nextImageDelay">nextImageDelay</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#option">option</a></b> ( ImageOption <i>option</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#read">read</a></b> ( QImage * <i>image</i> ) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#setDevice">setDevice</a></b> ( QIODevice * <i>device</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#setFormat">setFormat</a></b> ( const QByteArray &amp; <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#setFormat-2">setFormat</a></b> ( const QByteArray &amp; <i>format</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#setOption">setOption</a></b> ( ImageOption <i>option</i>, const QVariant &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#supportsOption">supportsOption</a></b> ( ImageOption <i>option</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qimageiohandler.html#write">write</a></b> ( const QImage &amp; <i>image</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QImageIOHandler-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QImageIOHandler class defines the common image I/O interface for all image formats in Qt.</p>
<p>Qt uses QImageIOHandler for reading and writing images through <a href="qimagereader.html">QImageReader</a> and <a href="qimagewriter.html">QImageWriter</a>. You can also derive from this class to write your own image format handler using Qt's plugin mechanism.</p>
<p>Call <a href="qimageiohandler.html#setDevice">setDevice</a>() to assign a device to the handler, and <a href="qimageiohandler.html#setFormat">setFormat</a>() to assign a format to it. One QImageIOHandler may support more than one image format. <a href="qimageiohandler.html#canRead">canRead</a>() returns true if an image can be read from the device, and <a href="qimageiohandler.html#read">read</a>() and <a href="qimageiohandler.html#write">write</a>() return true if reading or writing an image was completed successfully.</p>
<p>QImageIOHandler also has support for animations formats, through the functions <a href="qimageiohandler.html#loopCount">loopCount</a>(), <a href="qimageiohandler.html#imageCount">imageCount</a>(), <a href="qimageiohandler.html#nextImageDelay">nextImageDelay</a>() and <a href="qimageiohandler.html#currentImageNumber">currentImageNumber</a>().</p>
<p>In order to determine what options an image handler supports, Qt will call <a href="qimageiohandler.html#supportsOption">supportsOption</a>() and <a href="qimageiohandler.html#setOption">setOption</a>(). Make sure to reimplement these functions if you can provide support for any of the options in the <a href="qimageiohandler.html#ImageOption-enum">ImageOption</a> enum.</p>
<p>To write your own image handler, you must at least reimplement <a href="qimageiohandler.html#canRead">canRead</a>() and <a href="qimageiohandler.html#read">read</a>(). Then create a <a href="qimageioplugin.html">QImageIOPlugin</a> that can create the handler. Finally, install your plugin, and <a href="qimagereader.html">QImageReader</a> and <a href="qimagewriter.html">QImageWriter</a> will then automatically load the plugin, and start using it.</p>
</div>
<p><b>See also </b><a href="qimageioplugin.html">QImageIOPlugin</a>, <a href="qimagereader.html">QImageReader</a>, and <a href="qimagewriter.html">QImageWriter</a>.</p>
<!-- @@@QImageIOHandler -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ImageOption$$$Size$$$ClipRect$$$Description$$$ScaledClipRect$$$ScaledSize$$$CompressionRatio$$$Gamma$$$Quality$$$Name$$$SubType$$$IncrementalReading$$$Endianness$$$Animation$$$BackgroundColor$$$ImageFormat -->
<h3 class="fn"><a name="ImageOption-enum"></a>enum QImageIOHandler::<span class="name">ImageOption</span></h3>
<p>This enum describes the different options supported by <a href="qimageiohandler.html">QImageIOHandler</a>. Some options are used to query an image for properties, and others are used to toggle the way in which an image should be written.</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>QImageIOHandler::Size</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The original size of an image. A handler that supports this option is expected to read the size of the image from the image metadata, and return this size from <a href="qimageiohandler.html#option">option</a>() as a <a href="qsize.html">QSize</a>.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::ClipRect</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The clip rect, or ROI (Region Of Interest). A handler that supports this option is expected to only read the provided <a href="qrect.html">QRect</a> area from the original image in <a href="qimageiohandler.html#read">read</a>(), before any other transformation is applied.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::ScaledSize</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The scaled size of the image. A handler that supports this option is expected to scale the image to the provided size (a <a href="qsize.html">QSize</a>), after applying any clip rect transformation (ClipRect). If the handler does not support this option, <a href="qimagereader.html">QImageReader</a> will perform the scaling after the image has been read.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::ScaledClipRect</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The scaled clip rect (or ROI, Region Of Interest) of the image. A handler that supports this option is expected to apply the provided clip rect (a <a href="qrect.html">QRect</a>), after applying any scaling (ScaleSize) or regular clipping (ClipRect). If the handler does not support this option, <a href="qimagereader.html">QImageReader</a> will apply the scaled clip rect after the image has been read.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::Description</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The image description. Some image formats, such as GIF and PNG, allow embedding of text or comments into the image data (e.g&#x2e;, for storing copyright information). It's common that the text is stored in key-value pairs, but some formats store all text in one continuous block. <a href="qimageiohandler.html">QImageIOHandler</a> returns the text as one <a href="qstring.html">QString</a>, where keys and values are separated by a ':', and keys-value pairs are separated by two newlines (\n\n). For example, &quot;Title: Sunset\n\nAuthor: Jim Smith\nSarah Jones\n\n&quot;. Formats that store text in a single block can use &quot;Description&quot; as the key.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::CompressionRatio</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The compression ratio of the image data. A handler that supports this option is expected to set its compression rate depending on the value of this option (an int) when writing.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::Gamma</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">The gamma level of the image. A handler that supports this option is expected to set the image gamma level depending on the value of this option (a float) when writing.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::Quality</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">The quality level of the image. A handler that supports this option is expected to set the image quality level depending on the value of this option (an int) when writing.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::Name</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">The name of the image. A handler that supports this option is expected to read the name from the image metadata and return this as a <a href="qstring.html">QString</a>, or when writing an image it is expected to store the name in the image metadata.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::SubType</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">The subtype of the image. A handler that supports this option can use the subtype value to help when reading and writing images. For example, a PPM handler may have a subtype value of &quot;ppm&quot; or &quot;ppmraw&quot;.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::IncrementalReading</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign">A handler that supports this option is expected to read the image in several passes, as if it was an animation. <a href="qimagereader.html">QImageReader</a> will treat the image as an animation.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::Endianness</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign">The endianness of the image. Certain image formats can be stored as BigEndian or LittleEndian. A handler that supports Endianness uses the value of this option to determine how the image should be stored.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::Animation</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign">Image formats that support animation return true for this value in <a href="qimageiohandler.html#supportsOption">supportsOption</a>(); otherwise, false is returned.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::BackgroundColor</tt></td><td class="topAlign"><tt>13</tt></td><td class="topAlign">Certain image formats allow the background color to be specified. A handler that supports BackgroundColor initializes the background color to this option (a <a href="qcolor.html">QColor</a>) when reading an image.</td></tr>
<tr><td class="topAlign"><tt>QImageIOHandler::ImageFormat</tt></td><td class="topAlign"><tt>14</tt></td><td class="topAlign">The image's data format returned by the handler. This can be any of the formats listed in <a href="qimage.html#Format-enum">QImage::Format</a>.</td></tr>
</table>
<!-- @@@ImageOption -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QImageIOHandler[overload1]$$$QImageIOHandler -->
<h3 class="fn"><a name="QImageIOHandler"></a>QImageIOHandler::<span class="name">QImageIOHandler</span> ()</h3>
<p>Constructs a <a href="qimageiohandler.html">QImageIOHandler</a> object.</p>
<!-- @@@QImageIOHandler -->
<!-- $$$~QImageIOHandler[overload1]$$$~QImageIOHandler -->
<h3 class="fn"><a name="dtor.QImageIOHandler"></a>QImageIOHandler::<span class="name">~QImageIOHandler</span> ()<tt> [virtual]</tt></h3>
<p>Destructs the <a href="qimageiohandler.html">QImageIOHandler</a> object.</p>
<!-- @@@~QImageIOHandler -->
<!-- $$$canRead[overload1]$$$canRead -->
<h3 class="fn"><a name="canRead"></a><span class="type">bool</span> QImageIOHandler::<span class="name">canRead</span> () const<tt> [pure virtual]</tt></h3>
<p>Returns true if an image can be read from the device (i.e&#x2e;, the image format is supported, the device can be read from and the initial header information suggests that the image can be read); otherwise returns false.</p>
<p>When reimplementing canRead(), make sure that the I/O device (<a href="qimageiohandler.html#device">device</a>()) is left in its original state (e.g&#x2e;, by using peek() rather than <a href="qimageiohandler.html#read">read</a>()).</p>
<p><b>See also </b><a href="qimageiohandler.html#read">read</a>() and <a href="qiodevice.html#peek">QIODevice::peek</a>().</p>
<!-- @@@canRead -->
<!-- $$$currentImageNumber[overload1]$$$currentImageNumber -->
<h3 class="fn"><a name="currentImageNumber"></a><span class="type">int</span> QImageIOHandler::<span class="name">currentImageNumber</span> () const<tt> [virtual]</tt></h3>
<p>For image formats that support animation, this function returns the sequence number of the current image in the animation. If this function is called before any image is <a href="qimageiohandler.html#read">read</a>(), -1 is returned. The number of the first image in the sequence is 0.</p>
<p>If the image format does not support animation, 0 is returned.</p>
<p><b>See also </b><a href="qimageiohandler.html#read">read</a>().</p>
<!-- @@@currentImageNumber -->
<!-- $$$currentImageRect[overload1]$$$currentImageRect -->
<h3 class="fn"><a name="currentImageRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QImageIOHandler::<span class="name">currentImageRect</span> () const<tt> [virtual]</tt></h3>
<p>Returns the rect of the current image. If no rect is defined for the image, and empty QRect() is returned.</p>
<p>This function is useful for animations, where only parts of the frame may be updated at a time.</p>
<!-- @@@currentImageRect -->
<!-- $$$device[overload1]$$$device -->
<h3 class="fn"><a name="device"></a><span class="type"><a href="qiodevice.html">QIODevice</a></span> * QImageIOHandler::<span class="name">device</span> () const</h3>
<p>Returns the device currently assigned to the <a href="qimageiohandler.html">QImageIOHandler</a>. If not device has been assigned, 0 is returned.</p>
<p><b>See also </b><a href="qimageiohandler.html#setDevice">setDevice</a>().</p>
<!-- @@@device -->
<!-- $$$format[overload1]$$$format -->
<h3 class="fn"><a name="format"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QImageIOHandler::<span class="name">format</span> () const</h3>
<p>Returns the format that is currently assigned to <a href="qimageiohandler.html">QImageIOHandler</a>. If no format has been assigned, an empty string is returned.</p>
<p><b>See also </b><a href="qimageiohandler.html#setFormat">setFormat</a>().</p>
<!-- @@@format -->
<!-- $$$imageCount[overload1]$$$imageCount -->
<h3 class="fn"><a name="imageCount"></a><span class="type">int</span> QImageIOHandler::<span class="name">imageCount</span> () const<tt> [virtual]</tt></h3>
<p>For image formats that support animation, this function returns the number of images in the animation. If the image format does not support animation, or if it is unable to determine the number of images, 0 is returned.</p>
<p>The default implementation returns 1 if <a href="qimageiohandler.html#canRead">canRead</a>() returns true; otherwise 0 is returned.</p>
<!-- @@@imageCount -->
<!-- $$$jumpToImage[overload1]$$$jumpToImageint -->
<h3 class="fn"><a name="jumpToImage"></a><span class="type">bool</span> QImageIOHandler::<span class="name">jumpToImage</span> ( <span class="type">int</span> <i>imageNumber</i> )<tt> [virtual]</tt></h3>
<p>For image formats that support animation, this function jumps to the image whose sequence number is <i>imageNumber</i>. The next call to <a href="qimageiohandler.html#read">read</a>() will attempt to read this image.</p>
<p>The default implementation does nothing, and returns false.</p>
<!-- @@@jumpToImage -->
<!-- $$$jumpToNextImage[overload1]$$$jumpToNextImage -->
<h3 class="fn"><a name="jumpToNextImage"></a><span class="type">bool</span> QImageIOHandler::<span class="name">jumpToNextImage</span> ()<tt> [virtual]</tt></h3>
<p>For image formats that support animation, this function jumps to the next image.</p>
<p>The default implementation does nothing, and returns false.</p>
<!-- @@@jumpToNextImage -->
<!-- $$$loopCount[overload1]$$$loopCount -->
<h3 class="fn"><a name="loopCount"></a><span class="type">int</span> QImageIOHandler::<span class="name">loopCount</span> () const<tt> [virtual]</tt></h3>
<p>For image formats that support animation, this function returns the number of times the animation should loop. If the image format does not support animation, 0 is returned.</p>
<!-- @@@loopCount -->
<!-- $$$nextImageDelay[overload1]$$$nextImageDelay -->
<h3 class="fn"><a name="nextImageDelay"></a><span class="type">int</span> QImageIOHandler::<span class="name">nextImageDelay</span> () const<tt> [virtual]</tt></h3>
<p>For image formats that support animation, this function returns the number of milliseconds to wait until reading the next image. If the image format does not support animation, 0 is returned.</p>
<!-- @@@nextImageDelay -->
<!-- $$$option[overload1]$$$optionImageOption -->
<h3 class="fn"><a name="option"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QImageIOHandler::<span class="name">option</span> ( <span class="type"><a href="qimageiohandler.html#ImageOption-enum">ImageOption</a></span> <i>option</i> ) const<tt> [virtual]</tt></h3>
<p>Returns the value assigned to <i>option</i> as a <a href="qvariant.html">QVariant</a>. The type of the value depends on the option. For example, option(Size) returns a <a href="qsize.html">QSize</a> variant.</p>
<p><b>See also </b><a href="qimageiohandler.html#setOption">setOption</a>() and <a href="qimageiohandler.html#supportsOption">supportsOption</a>().</p>
<!-- @@@option -->
<!-- $$$read[overload1]$$$readQImage* -->
<h3 class="fn"><a name="read"></a><span class="type">bool</span> QImageIOHandler::<span class="name">read</span> ( <span class="type"><a href="qimage.html">QImage</a></span> * <i>image</i> )<tt> [pure virtual]</tt></h3>
<p>Read an image from the device, and stores it in <i>image</i>. Returns true if the image is successfully read; otherwise returns false.</p>
<p>For image formats that support incremental loading, and for animation formats, the image handler can assume that <i>image</i> points to the previous frame.</p>
<p><b>See also </b><a href="qimageiohandler.html#canRead">canRead</a>().</p>
<!-- @@@read -->
<!-- $$$setDevice[overload1]$$$setDeviceQIODevice* -->
<h3 class="fn"><a name="setDevice"></a><span class="type">void</span> QImageIOHandler::<span class="name">setDevice</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>device</i> )</h3>
<p>Sets the device of the <a href="qimageiohandler.html">QImageIOHandler</a> to <i>device</i>. The image handler will use this device when reading and writing images.</p>
<p>The device can only be set once and must be set before calling <a href="qimageiohandler.html#canRead">canRead</a>(), <a href="qimageiohandler.html#read">read</a>(), <a href="qimageiohandler.html#write">write</a>(), etc. If you need to read multiple files, construct multiple instances of the appropriate <a href="qimageiohandler.html">QImageIOHandler</a> subclass.</p>
<p><b>See also </b><a href="qimageiohandler.html#device">device</a>().</p>
<!-- @@@setDevice -->
<!-- $$$setFormat[overload1]$$$setFormatconstQByteArray& -->
<h3 class="fn"><a name="setFormat"></a><span class="type">void</span> QImageIOHandler::<span class="name">setFormat</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>format</i> )</h3>
<p>Sets the format of the <a href="qimageiohandler.html">QImageIOHandler</a> to <i>format</i>. The format is most useful for handlers that support multiple image formats.</p>
<p><b>See also </b><a href="qimageiohandler.html#format">format</a>().</p>
<!-- @@@setFormat -->
<!-- $$$setFormat$$$setFormatconstQByteArray& -->
<h3 class="fn"><a name="setFormat-2"></a><span class="type">void</span> QImageIOHandler::<span class="name">setFormat</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>format</i> ) const</h3>
<p>Sets the format of the <a href="qimageiohandler.html">QImageIOHandler</a> to <i>format</i>. The format is most useful for handlers that support multiple image formats.</p>
<p>This function is declared const so that it can be called from <a href="qimageiohandler.html#canRead">canRead</a>().</p>
<p><b>See also </b><a href="qimageiohandler.html#format">format</a>().</p>
<!-- @@@setFormat -->
<!-- $$$setOption[overload1]$$$setOptionImageOptionconstQVariant& -->
<h3 class="fn"><a name="setOption"></a><span class="type">void</span> QImageIOHandler::<span class="name">setOption</span> ( <span class="type"><a href="qimageiohandler.html#ImageOption-enum">ImageOption</a></span> <i>option</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>value</i> )<tt> [virtual]</tt></h3>
<p>Sets the option <i>option</i> with the value <i>value</i>.</p>
<p><b>See also </b><a href="qimageiohandler.html#option">option</a>() and <a href="qimageiohandler.html#ImageOption-enum">ImageOption</a>.</p>
<!-- @@@setOption -->
<!-- $$$supportsOption[overload1]$$$supportsOptionImageOption -->
<h3 class="fn"><a name="supportsOption"></a><span class="type">bool</span> QImageIOHandler::<span class="name">supportsOption</span> ( <span class="type"><a href="qimageiohandler.html#ImageOption-enum">ImageOption</a></span> <i>option</i> ) const<tt> [virtual]</tt></h3>
<p>Returns true if the <a href="qimageiohandler.html">QImageIOHandler</a> supports the option <i>option</i>; otherwise returns false. For example, if the <a href="qimageiohandler.html">QImageIOHandler</a> supports the <a href="qimageiohandler.html#ImageOption-enum">Size</a> option, supportsOption(Size) must return true.</p>
<p><b>See also </b><a href="qimageiohandler.html#setOption">setOption</a>() and <a href="qimageiohandler.html#option">option</a>().</p>
<!-- @@@supportsOption -->
<!-- $$$write[overload1]$$$writeconstQImage& -->
<h3 class="fn"><a name="write"></a><span class="type">bool</span> QImageIOHandler::<span class="name">write</span> ( const <span class="type"><a href="qimage.html">QImage</a></span> &amp; <i>image</i> )<tt> [virtual]</tt></h3>
<p>Writes the image <i>image</i> to the assigned device. Returns true on success; otherwise returns false.</p>
<p>The default implementation does nothing, and simply returns false.</p>
<!-- @@@write -->
</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>