Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 1912

qt-mobility-doc-1.2.0-13.mga5.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" />
<!-- slideshow.qdoc -->
  <title>Qt Mobility 1.2: SlideShow Example</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="http://qt.nokia.com/doc/4.7/all-examples.html">Examples</a></li>
<li>SlideShow Example</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<h1 class="title">SlideShow Example</h1>
<span class="subtitle"></span>
<!-- $$$slideshow-description -->
<div class="descr"> <a name="details"></a>
<p>Files:</p>
<ul>
<li><a href="slideshow-slideshow-cpp.html">slideshow/slideshow.cpp</a></li>
<li><a href="slideshow-slideshow-h.html">slideshow/slideshow.h</a></li>
<li><a href="slideshow-main-cpp.html">slideshow/main.cpp</a></li>
<li><a href="slideshow-slideshow-pro.html">slideshow/slideshow.pro</a></li>
</ul>
<p class="centerAlign"><img src="images/slideshow-img1.png" alt="" /></p><p>Slideshow displays a series of time delayed images after you select a source image directory to use. The folder button presents a list of three options: browse for a directory, load a playlist or enter a location.</p>
<p>This implementation uses a <a href="qmediaimageviewer.html">QMediaImageViewer</a> object for the image with a <a href="qvideowidget.html">QVideoWidget</a> used to do the display. Whether the the source is a browsed directory, a playlist file or a URL to a local or remote location the playlist object in Slideshow is updated with the file or multiple file locations.</p>
<pre class="cpp"> connect(imageViewer<span class="operator">,</span> SIGNAL(stateChanged(<span class="type"><a href="qmediaimageviewer.html">QMediaImageViewer</a></span><span class="operator">::</span>State))<span class="operator">,</span>
         <span class="keyword">this</span><span class="operator">,</span> SLOT(stateChanged(<span class="type"><a href="qmediaimageviewer.html">QMediaImageViewer</a></span><span class="operator">::</span>State)));

 playlist <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmediaplaylist.html">QMediaPlaylist</a></span>;
 playlist<span class="operator">-</span><span class="operator">&gt;</span>setMediaObject(imageViewer);</pre>
<p>We create a <a href="qvideowidget.html">QVideoWidget</a> to display the viewer and add it to the dialog.</p>
<pre class="cpp"> <span class="type"><a href="qvideowidget.html">QVideoWidget</a></span> <span class="operator">*</span>videoWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qvideowidget.html">QVideoWidget</a></span>;
 videoWidget<span class="operator">-</span><span class="operator">&gt;</span>setMediaObject(imageViewer);</pre>
<pre class="cpp"> layout<span class="operator">-</span><span class="operator">&gt;</span>addWidget(videoWidget<span class="operator">,</span> <span class="type"><a href="http://qt.nokia.com/doc/4.7/qt.html">Qt</a></span><span class="operator">::</span>AlignCenter);</pre>
<p>The timeout between images is set by changing the timeout property in <a href="qmediaimageviewer.html">QMediaImageViewer</a> which is in milliseconds. So to change the timeout to five seconds</p>
<pre class="cpp"> imageViewer<span class="operator">-</span><span class="operator">&gt;</span>setTimeout( <span class="number">5000</span> );</pre>
</div>
<!-- @@@slideshow -->
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used 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>
</div>
</body>
</html>