]> git.defcon.no Git - qopencamwidget/blobdiff - doc/html/view_8cpp-source.html
Removing the docs from svn. These are generatet using doxygen anyways.
[qopencamwidget] / doc / html / view_8cpp-source.html
diff --git a/doc/html/view_8cpp-source.html b/doc/html/view_8cpp-source.html
deleted file mode 100644 (file)
index e11a248..0000000
+++ /dev/null
@@ -1,108 +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: view.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>view.cpp</h1><a href="view_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"> QOpenCamWidget demo application main window (view.c)</span>
-<a name="l00003"></a>00003 <span class="comment"> This file is part of a demonstration application, illustrating</span>
-<a name="l00004"></a>00004 <span class="comment"> how to use the QOpenCamWidget, a Qt 4 widget that displays</span>
-<a name="l00005"></a>00005 <span class="comment"> video input from a webcam, along with a snapshot button.</span>
-<a name="l00006"></a>00006 <span class="comment"></span>
-<a name="l00007"></a>00007 <span class="comment"> Copyright (C) 2009 Jon Langseth</span>
-<a name="l00008"></a>00008 <span class="comment"></span>
-<a name="l00009"></a>00009 <span class="comment"> This program is free software; you can redistribute it and/or</span>
-<a name="l00010"></a>00010 <span class="comment"> modify it under the terms of the GNU General Public License</span>
-<a name="l00011"></a>00011 <span class="comment"> as published by the Free Software Foundation in its version 2</span>
-<a name="l00012"></a>00012 <span class="comment"> of the License.</span>
-<a name="l00013"></a>00013 <span class="comment"></span>
-<a name="l00014"></a>00014 <span class="comment"> This program is distributed in the hope that it will be useful,</span>
-<a name="l00015"></a>00015 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
-<a name="l00016"></a>00016 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
-<a name="l00017"></a>00017 <span class="comment"> GNU General Public License for more details.</span>
-<a name="l00018"></a>00018 <span class="comment"></span>
-<a name="l00019"></a>00019 <span class="comment"> You should have received a copy of the GNU General Public License</span>
-<a name="l00020"></a>00020 <span class="comment"> along with this program; if not, write to the Free Software</span>
-<a name="l00021"></a>00021 <span class="comment"> Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</span>
-<a name="l00022"></a>00022 <span class="comment"> */</span>
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="view_8h.html">view.h</a>"</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="qopencamwidget_8h.html">qopencamwidget.h</a>"</span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="comment">// The View class is a QMainWindow, used to display our QOpenCamWidget</span>
-<a name="l00028"></a>00028 <span class="comment">// The constructor of the View takes care of setting up the Widget,</span>
-<a name="l00029"></a>00029 <span class="comment">// and handles the result of a user clicking (or activating) the widget's</span>
-<a name="l00030"></a>00030 <span class="comment">// "Take snapshot" button.</span>
-<a name="l00031"></a>00031 
-<a name="l00032"></a><a class="code" href="classView.html#74d64dd513eae96bc3196131f865a4e8">00032</a> <a class="code" href="classView.html#74d64dd513eae96bc3196131f865a4e8">View::View</a>( QWidget *parent)
-<a name="l00033"></a>00033         : QMainWindow(parent)
-<a name="l00034"></a>00034 {
-<a name="l00035"></a>00035         
-<a name="l00036"></a>00036         <span class="comment">// Create the widget, setting the Main window (this) as its parent.</span>
-<a name="l00037"></a>00037         <a class="code" href="classQOpenCamWidget.html">QOpenCamWidget</a> *cw = <span class="keyword">new</span> <a class="code" href="classQOpenCamWidget.html">QOpenCamWidget</a>(<span class="keyword">this</span>);
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039         <span class="comment">// bool QOpenCamWidget::grabCapture(int source) tries to get a</span>
-<a name="l00040"></a>00040         <span class="comment">// video capture handle from OpenCV, using the source number</span>
-<a name="l00041"></a>00041         <span class="comment">// as the device to open. Here I use -1 as the number, meaning</span>
-<a name="l00042"></a>00042         <span class="comment">// "give me any supported and available video devica you can find".</span>
-<a name="l00043"></a>00043         <span class="keywordflow">if</span> ( cw-&gt;<a class="code" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a" title="Grabs an OpenCV video capture source.">grabCapture</a>(-1) )
-<a name="l00044"></a>00044         {
-<a name="l00045"></a>00045                 <span class="comment">// grabCapture() returns true on success. This means that</span>
-<a name="l00046"></a>00046                 <span class="comment">// we have a capture device available, and can start streaming</span>
-<a name="l00047"></a>00047                 <span class="comment">// video from the device to display on the widget.</span>
-<a name="l00048"></a>00048                 
-<a name="l00049"></a>00049                 <span class="comment">// TODO: Document this feature..</span>
-<a name="l00050"></a>00050                 cw-&gt;<a class="code" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce" title="Changes the visibility of the optional built-in &amp;quot;Take snapshot&amp;quot; button...">setSnapshotVisible</a>(<span class="keyword">true</span>);
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052                 <span class="comment">// Video output does not start until QOpenCamWidget::startCapture()</span>
-<a name="l00053"></a>00053                 <span class="comment">// is explicitly called.</span>
-<a name="l00054"></a>00054                 cw-&gt;<a class="code" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">startCapture</a>();
-<a name="l00055"></a>00055         }
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057         <span class="comment">// The QOpenCamWidget does not provide a video stream for further</span>
-<a name="l00058"></a>00058         <span class="comment">// processing, but it does provide a snapshot of the stream if</span>
-<a name="l00059"></a>00059         <span class="comment">// the SLOT void QOpenCamWidget::startSnap(void) is triggered.</span>
-<a name="l00060"></a>00060         <span class="comment">// In this demo app, the slot is connected to the widgets</span>
-<a name="l00061"></a>00061         <span class="comment">// internal "Take snapshot" trigger button, but the SLOT is</span>
-<a name="l00062"></a>00062         <span class="comment">// public, and may easily be triggered from "outside".</span>
-<a name="l00063"></a>00063         <span class="comment">//</span>
-<a name="l00064"></a>00064         <span class="comment">// When startSnap() is triggered, it will use a SIGNAL to return</span>
-<a name="l00065"></a>00065         <span class="comment">// its image, if the aquisition was successful. The image</span>
-<a name="l00066"></a>00066         <span class="comment">// will be available through QOpenCamWidget::imageReady(Qimage);</span>
-<a name="l00067"></a>00067         <span class="comment">// In this sample, I hook that signal up to a slot on this QMainWindow,</span>
-<a name="l00068"></a>00068         <span class="comment">// that saves the image, and exits the application.</span>
-<a name="l00069"></a>00069         connect( cw, SIGNAL(imageReady(QImage)), <span class="keyword">this</span>, SLOT(<a class="code" href="classView.html#4b82b2654c9dd798bce121f02b30a810">saveImage</a>(QImage)));
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071         this-&gt;setCentralWidget(cw);
-<a name="l00072"></a>00072 }
-<a name="l00073"></a>00073 
-<a name="l00074"></a><a class="code" href="classView.html#450dfab3f21a52edc03db4310593412f">00074</a> <a class="code" href="classView.html#450dfab3f21a52edc03db4310593412f">View::~View</a>(<span class="keywordtype">void</span>)
-<a name="l00075"></a>00075 {
-<a name="l00076"></a>00076 }
-<a name="l00077"></a>00077 
-<a name="l00078"></a><a class="code" href="classView.html#4b82b2654c9dd798bce121f02b30a810">00078</a> <span class="keywordtype">void</span> <a class="code" href="classView.html#4b82b2654c9dd798bce121f02b30a810">View::saveImage</a>(QImage image)
-<a name="l00079"></a>00079 {
-<a name="l00080"></a>00080         <span class="comment">// This is the SLOT that recieves QOpenCamWidget::imageReady(QImage) SIGNAL.</span>
-<a name="l00081"></a>00081         <span class="comment">// To keep the example as simple as possible, I do as little as possible..</span>
-<a name="l00082"></a>00082         qDebug() &lt;&lt; <span class="stringliteral">"Recieved an image of size "</span> 
-<a name="l00083"></a>00083                 &lt;&lt; image.width() &lt;&lt; <span class="stringliteral">"x"</span> &lt;&lt; image.height();
-<a name="l00084"></a>00084         image.save(<span class="stringliteral">"snapshot.png"</span>);
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086         QApplication::exit();
-<a name="l00087"></a>00087 }
-</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>