]> git.defcon.no Git - qopencamwidget/blobdiff - doc/html/qopencamwidget_8cpp-source.html
Removing the docs from svn. These are generatet using doxygen anyways.
[qopencamwidget] / doc / html / qopencamwidget_8cpp-source.html
diff --git a/doc/html/qopencamwidget_8cpp-source.html b/doc/html/qopencamwidget_8cpp-source.html
deleted file mode 100644 (file)
index 6086746..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>QOpenCamWidget: qopencamwidget.cpp Source File</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css">
-<link href="tabs.css" rel="stylesheet" type="text/css">
-</head><body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="annotated.html"><span>Classes</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-<h1>qopencamwidget.cpp</h1><a href="qopencamwidget_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> This file is one part of two, that together make</span>
-<a name="l00003"></a>00003 <span class="comment"> QOpenCamWidget, a Qt 4 widget that displays video input </span>
-<a name="l00004"></a>00004 <span class="comment"> from a webcam, along with an optional snapshot button.</span>
-<a name="l00005"></a>00005 <span class="comment"></span>
-<a name="l00006"></a>00006 <span class="comment"> Copyright (C) 2009 Jon Langseth</span>
-<a name="l00007"></a>00007 <span class="comment"></span>
-<a name="l00008"></a>00008 <span class="comment"> This program is free software; you can redistribute it and/or</span>
-<a name="l00009"></a>00009 <span class="comment"> modify it under the terms of the GNU General Public License</span>
-<a name="l00010"></a>00010 <span class="comment"> as published by the Free Software Foundation in its version 2</span>
-<a name="l00011"></a>00011 <span class="comment"> of the License.</span>
-<a name="l00012"></a>00012 <span class="comment"></span>
-<a name="l00013"></a>00013 <span class="comment"> This program is distributed in the hope that it will be useful,</span>
-<a name="l00014"></a>00014 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
-<a name="l00015"></a>00015 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
-<a name="l00016"></a>00016 <span class="comment"> GNU General Public License for more details.</span>
-<a name="l00017"></a>00017 <span class="comment"></span>
-<a name="l00018"></a>00018 <span class="comment"> You should have received a copy of the GNU General Public License</span>
-<a name="l00019"></a>00019 <span class="comment"> along with this program; if not, write to the Free Software</span>
-<a name="l00020"></a>00020 <span class="comment"> Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</span>
-<a name="l00021"></a>00021 <span class="comment"> */</span>
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="qopencamwidget_8h.html">qopencamwidget.h</a>"</span>
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="comment">// ------------------------------------------------------------- //</span>
-<a name="l00026"></a>00026 <span class="comment">// Constructor and Destructor</span>
-<a name="l00027"></a>00027 <span class="comment">// ------------------------------------------------------------- //</span>
-<a name="l00028"></a>00028 
-<a name="l00060"></a><a class="code" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e">00060</a> <a class="code" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e" title="Consctructs a QWidget based widget for displaying video coming from an OpenCV capture...">QOpenCamWidget::QOpenCamWidget</a>(QWidget *parent) 
-<a name="l00061"></a>00061         : QWidget(parent) 
-<a name="l00062"></a>00062 {
-<a name="l00063"></a>00063         <span class="comment">// private CvCapture *nextFrame from class definition</span>
-<a name="l00064"></a>00064         <a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a> = NULL;
-<a name="l00065"></a>00065         <span class="comment">// private QTimer *frametimer from class definition</span>
-<a name="l00066"></a>00066         <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a> = NULL;
-<a name="l00067"></a>00067         <span class="comment">// private QVBoxLayout *layout from class definition</span>
-<a name="l00068"></a>00068         <a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a> = <span class="keyword">new</span> QVBoxLayout(<span class="keyword">this</span>);
-<a name="l00069"></a>00069         
-<a name="l00070"></a>00070         <span class="comment">// private QLabel *canvas from class definition</span>
-<a name="l00071"></a>00071         <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a> = <span class="keyword">new</span> QLabel(<span class="keyword">this</span>);
-<a name="l00072"></a>00072         <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>-&gt;setMinimumSize(200, 100);
-<a name="l00073"></a>00073         <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>-&gt;setAlignment(Qt::AlignCenter);
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075         <span class="comment">// private QPushButton *trigger from class definition</span>
-<a name="l00076"></a>00076         <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a> = <span class="keyword">new</span> QPushButton(<span class="keyword">this</span>);
-<a name="l00077"></a>00077         <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>-&gt;setText(<span class="stringliteral">"Take picture"</span>);
-<a name="l00078"></a>00078         <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>-&gt;setEnabled(<span class="keyword">false</span>);
-<a name="l00079"></a>00079         <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>-&gt;hide();
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081         <span class="comment">// private bool trigger_active from class definition</span>
-<a name="l00082"></a>00082         <a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a> = <span class="keyword">false</span>;
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084         <a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a>-&gt;addWidget(<a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>);
-<a name="l00085"></a>00085         this-&gt;setLayout(<a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a>);
-<a name="l00086"></a>00086 }
-<a name="l00087"></a>00087 
-<a name="l00088"></a><a class="code" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">00088</a> <a class="code" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">QOpenCamWidget::~QOpenCamWidget</a>(<span class="keywordtype">void</span>)
-<a name="l00089"></a>00089 {
-<a name="l00090"></a>00090         cvReleaseCapture( &amp;<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a> );
-<a name="l00091"></a>00091         <span class="keyword">delete</span> <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>;
-<a name="l00092"></a>00092         <span class="keyword">delete</span> <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>;
-<a name="l00093"></a>00093 }
-<a name="l00094"></a>00094 <span class="comment">// ------------------------------------------------------------- //</span>
-<a name="l00095"></a>00095 <span class="comment">// Public methods (not signals/slots)</span>
-<a name="l00096"></a>00096 <span class="comment">// ------------------------------------------------------------- //</span>
-<a name="l00097"></a>00097 
-<a name="l00109"></a>00109 <span class="keywordtype">void</span> 
-<a name="l00110"></a><a class="code" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce">00110</a> <a class="code" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce" title="Changes the visibility of the optional built-in &amp;quot;Take snapshot&amp;quot; button...">QOpenCamWidget::setSnapshotVisible</a>(<span class="keywordtype">bool</span> visible)
-<a name="l00111"></a>00111 {
-<a name="l00112"></a>00112         <span class="comment">// Checking both parameter and private "sanity" variable,</span>
-<a name="l00113"></a>00113         <span class="comment">// as a sanity- and error-control</span>
-<a name="l00114"></a>00114         <span class="keywordflow">if</span> ( visible &amp;&amp; !<a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a> )
-<a name="l00115"></a>00115         {
-<a name="l00116"></a>00116                 connect( <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>, SIGNAL(clicked()), <span class="keyword">this</span>, SLOT(<a class="code" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b" title="Trigger this slot to save a frame from the widget.">startSnap</a>()));
-<a name="l00117"></a>00117                 <a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a>-&gt;addWidget(<a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>);
-<a name="l00118"></a>00118                 <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>-&gt;show();
-<a name="l00119"></a>00119                 <a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a> = <span class="keyword">true</span>;
-<a name="l00120"></a>00120         }
-<a name="l00121"></a>00121         <span class="keywordflow">if</span> ( !visible &amp;&amp; <a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a> )
-<a name="l00122"></a>00122         {
-<a name="l00123"></a>00123                 <a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a>-&gt;removeWidget(<a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>);
-<a name="l00124"></a>00124                 disconnect( <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>, SIGNAL(clicked()), 0, 0 );
-<a name="l00125"></a>00125                 <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>-&gt;hide();
-<a name="l00126"></a>00126                 <a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a> = <span class="keyword">false</span>;
-<a name="l00127"></a>00127         }
-<a name="l00128"></a>00128 }
-<a name="l00143"></a>00143 <span class="keywordtype">void</span> 
-<a name="l00144"></a><a class="code" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6">00144</a> <a class="code" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6" title="A paint event is a request to repaint all or part of a widget.">QOpenCamWidget::paintEvent</a> ( QPaintEvent * event )
-<a name="l00145"></a>00145 {
-<a name="l00146"></a>00146         QPainter * paint = <span class="keyword">new</span> QPainter;
-<a name="l00147"></a>00147         paint-&gt;begin(<span class="keyword">this</span>);
-<a name="l00148"></a>00148                 
-<a name="l00149"></a>00149         <span class="keywordflow">if</span> ( <a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a> )
-<a name="l00150"></a>00150         {
-<a name="l00151"></a>00151                 <span class="comment">// Using this objects painter to draw the image</span>
-<a name="l00152"></a>00152                 <span class="comment">// causes a cute, but not desired effect..</span>
-<a name="l00153"></a>00153                 <span class="comment">//paint-&gt;drawImage(event-&gt;rect(), *nextFrame);</span>
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155                 <span class="comment">// Until I find a better solution on how to do the</span>
-<a name="l00156"></a>00156                 <span class="comment">// redraw of the image, setPixmap on the canvas</span>
-<a name="l00157"></a>00157                 <span class="comment">// does do the job. This may cause a performance</span>
-<a name="l00158"></a>00158                 <span class="comment">// penalty though, and is considered a FIXME</span>
-<a name="l00159"></a>00159                 <span class="comment">// Another drawback is that the widget does not resize..</span>
-<a name="l00160"></a>00160                 <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>-&gt;setPixmap( QPixmap::fromImage(*<a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a>) );
-<a name="l00161"></a>00161         }
-<a name="l00162"></a>00162         <span class="keywordflow">else</span>
-<a name="l00163"></a>00163         {
-<a name="l00164"></a>00164                 <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>-&gt;setText(<span class="stringliteral">"No data, check/test camera"</span>);
-<a name="l00165"></a>00165         }
-<a name="l00166"></a>00166         paint-&gt;end();
-<a name="l00167"></a>00167 }
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169 
-<a name="l00182"></a>00182 <span class="keywordtype">bool</span> 
-<a name="l00183"></a><a class="code" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a">00183</a> <a class="code" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a" title="Grabs an OpenCV video capture source.">QOpenCamWidget::grabCapture</a>(<span class="keywordtype">int</span> source)
-<a name="l00184"></a>00184 {
-<a name="l00185"></a>00185         <a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a> = cvCaptureFromCAM(0);
-<a name="l00186"></a>00186         <span class="keywordflow">if</span> (!<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a>)
-<a name="l00187"></a>00187         {
-<a name="l00188"></a>00188                 qDebug() &lt;&lt; <span class="stringliteral">"QOpenCamWidget::grabCapture("</span> &lt;&lt; source &lt;&lt; <span class="stringliteral">") failed"</span>;
-<a name="l00189"></a>00189                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00190"></a>00190         }
-<a name="l00191"></a>00191         cvGrabFrame(<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a>); <span class="comment">// Grab a single frame, do resizing based on it.</span>
-<a name="l00192"></a>00192         IplImage *image = cvRetrieveFrame(<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a>);
-<a name="l00193"></a>00193         QSize t_size = QSize(image-&gt;width,image-&gt;height);
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195         qDebug() &lt;&lt; <span class="stringliteral">"Device image format: "</span> &lt;&lt; image-&gt;width &lt;&lt; <span class="stringliteral">"x"</span> &lt;&lt; image-&gt;height;
-<a name="l00196"></a>00196         <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>-&gt;setMinimumSize(t_size);
-<a name="l00197"></a>00197         <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>-&gt;setMaximumSize(t_size);
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199         <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00200"></a>00200 }
-<a name="l00201"></a>00201 
-<a name="l00216"></a>00216 <span class="keywordtype">void</span> 
-<a name="l00217"></a><a class="code" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880">00217</a> <a class="code" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">QOpenCamWidget::startCapture</a>(<span class="keywordtype">void</span>)
-<a name="l00218"></a>00218 {
-<a name="l00219"></a>00219         <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a> = <span class="keyword">new</span> QTimer(<span class="keyword">this</span>);
-<a name="l00220"></a>00220         <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>-&gt;start(70);
-<a name="l00221"></a>00221         connect(<a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>,SIGNAL(timeout()), <span class="keyword">this</span>,SLOT(<a class="code" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4" title="Grabs a frame and causes an update() when triggered.">grabFrame</a>()));
-<a name="l00222"></a>00222         <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>-&gt;setEnabled(<span class="keyword">true</span>);
-<a name="l00223"></a>00223 }
-<a name="l00224"></a>00224 
-<a name="l00240"></a>00240 QImage* 
-<a name="l00241"></a><a class="code" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d">00241</a> <a class="code" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d" title="Converts from the OpenCV IplImage data structure to a QImage.">QOpenCamWidget::Ipl2QImage</a>(<span class="keyword">const</span> IplImage *img)
-<a name="l00242"></a>00242 {
-<a name="l00243"></a>00243         IplImage *tmp=cvCloneImage(img);
-<a name="l00244"></a>00244         cvConvertImage(img,tmp, CV_CVTIMG_SWAP_RB  );
-<a name="l00245"></a>00245         QImage * qimage = <span class="keyword">new</span> QImage(reinterpret_cast&lt;uchar*&gt;(tmp-&gt;imageData),
-<a name="l00246"></a>00246                         tmp-&gt;width,
-<a name="l00247"></a>00247                         tmp-&gt;height,
-<a name="l00248"></a>00248                         3* tmp-&gt;width,
-<a name="l00249"></a>00249                         QImage::Format_RGB888);
-<a name="l00250"></a>00250         <span class="keywordflow">return</span> qimage;
-<a name="l00251"></a>00251 
-<a name="l00252"></a>00252 }
-<a name="l00253"></a>00253 <span class="comment">// ------------------------------------------------------------- //</span>
-<a name="l00254"></a>00254 <span class="comment">// Public SLOTS</span>
-<a name="l00255"></a>00255 <span class="comment">// ------------------------------------------------------------- //</span>
-<a name="l00256"></a>00256 
-<a name="l00266"></a><a class="code" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4">00266</a> <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4" title="Grabs a frame and causes an update() when triggered.">QOpenCamWidget::grabFrame</a>(<span class="keywordtype">void</span>)
-<a name="l00267"></a>00267 {
-<a name="l00268"></a>00268         <span class="keywordflow">if</span> ( !<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a> )
-<a name="l00269"></a>00269         {
-<a name="l00270"></a>00270                 qDebug() &lt;&lt; <span class="stringliteral">"Capture device not ready!"</span>;
-<a name="l00271"></a>00271                 <span class="keywordflow">return</span>;
-<a name="l00272"></a>00272         }
-<a name="l00273"></a>00273 
-<a name="l00274"></a>00274         cvGrabFrame(<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a>);
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276         IplImage *iplimage = cvRetrieveFrame(<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a>);
-<a name="l00277"></a>00277 
-<a name="l00278"></a>00278         <span class="keywordflow">if</span> (iplimage)
-<a name="l00279"></a>00279         {
-<a name="l00280"></a>00280                 <a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a> = <a class="code" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d" title="Converts from the OpenCV IplImage data structure to a QImage.">Ipl2QImage</a>(iplimage);
-<a name="l00281"></a>00281         }
-<a name="l00282"></a>00282         <span class="keywordflow">else</span>
-<a name="l00283"></a>00283         {
-<a name="l00284"></a>00284                 <a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a> =  NULL;
-<a name="l00285"></a>00285         }
-<a name="l00286"></a>00286         update();
-<a name="l00287"></a>00287 }
-<a name="l00288"></a>00288 
-<a name="l00306"></a><a class="code" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b">00306</a> <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b" title="Trigger this slot to save a frame from the widget.">QOpenCamWidget::startSnap</a>(<span class="keywordtype">void</span>)
-<a name="l00307"></a>00307 {
-<a name="l00308"></a>00308         <span class="keywordflow">if</span> ( <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a> ) {
-<a name="l00309"></a>00309                 <span class="keywordflow">if</span> (<a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>-&gt;isActive())
-<a name="l00310"></a>00310                 {
-<a name="l00311"></a>00311                         <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>-&gt;stop();
-<a name="l00312"></a>00312                         qDebug() &lt;&lt; <span class="stringliteral">"SNAP!"</span>;
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314                         emit <a class="code" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">imageReady</a>(QImage(*<a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a>));
-<a name="l00315"></a>00315                         <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>-&gt;start();
-<a name="l00316"></a>00316                 }
-<a name="l00317"></a>00317         }
-<a name="l00318"></a>00318 }
-<a name="l00319"></a>00319 
-</pre></div></div>
-<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
-</body>
-</html>