--- /dev/null
+# Doxyfile 1.5.6
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = QOpenCamWidget
+PROJECT_NUMBER =
+OUTPUT_DIRECTORY = /home/jonl/qcv/doc
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = /home/jonl/qcv/
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+TYPEDEF_HIDES_STRUCT = NO
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = YES
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = NO
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = /home/jonl/qcv
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS = *.c \
+ *.cc \
+ *.cxx \
+ *.cpp \
+ *.c++ \
+ *.d \
+ *.java \
+ *.ii \
+ *.ixx \
+ *.ipp \
+ *.i++ \
+ *.inl \
+ *.h \
+ *.hh \
+ *.hxx \
+ *.hpp \
+ *.h++ \
+ *.idl \
+ *.odl \
+ *.cs \
+ *.php \
+ *.php3 \
+ *.inc \
+ *.m \
+ *.mm \
+ *.dox \
+ *.py \
+ *.f90 \
+ *.f \
+ *.vhd \
+ *.vhdl \
+ *.C \
+ *.CC \
+ *.C++ \
+ *.II \
+ *.I++ \
+ *.H \
+ *.HH \
+ *.H++ \
+ *.CS \
+ *.PHP \
+ *.PHP3 \
+ *.M \
+ *.MM \
+ *.PY \
+ *.F90 \
+ *.F \
+ *.VHD \
+ *.VHDL
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS = *
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = YES
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+HTML_DYNAMIC_SECTIONS = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = ALL
+TREEVIEW_WIDTH = 250
+FORMULA_FONTSIZE = 10
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = YES
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = YES
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+DOT_FONTNAME = FreeSans
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = YES
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
--- /dev/null
+<!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: Class List</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current"><a href="annotated.html"><span>Class List</span></a></li>
+ <li><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
+ <tr><td class="indexkey"><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="classView.html">View</a></td><td class="indexvalue"></td></tr>
+</table>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Member List</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>QOpenCamWidget Member List</h1>This is the complete list of members for <a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a">grabCapture</a>(int source)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4">grabFrame</a>(void)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [slot]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">imageReady</a>(QImage snapshot)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [signal]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d">Ipl2QImage</a>(const IplImage *img)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6">paintEvent</a>(QPaintEvent *event)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e">QOpenCamWidget</a>(QWidget *parent=0)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce">setSnapshotVisible</a>(bool visible)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880">startCapture</a>(void)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b">startSnap</a>()</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [slot]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a></td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td><code> [private]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">~QOpenCamWidget</a>(void)</td><td><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td><td></td></tr>
+</table></div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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 Class Reference</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>QOpenCamWidget Class Reference</h1><!-- doxytag: class="QOpenCamWidget" --><code>#include <<a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>></code>
+<p>
+
+<p>
+<a href="classQOpenCamWidget-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Slots</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4">grabFrame</a> (void)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Grabs a frame and causes an update() when triggered. <a href="#27c30cec9a8d44c1802e4218bea7bdb4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b">startSnap</a> ()</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Trigger this slot to save a frame from the widget. <a href="#82540c90d3efa85631f13af3a60fa94b"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">imageReady</a> (QImage snapshot)</td></tr>
+
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e">QOpenCamWidget</a> (QWidget *parent=0)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Consctructs a QWidget based widget for displaying video coming from an OpenCV capture source. <a href="#5835e06a54f1b09b4fd157d88dc72b6e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">~QOpenCamWidget</a> (void)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6">paintEvent</a> (QPaintEvent *event)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">A paint event is a request to repaint all or part of a widget. <a href="#c6186d1e510b5c8635b2d3bf5d94def6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce">setSnapshotVisible</a> (bool visible)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Changes the visibility of the optional built-in "Take snapshot" button. <a href="#8f885a8bb88870cd19cfc9eb4e02e2ce"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a">grabCapture</a> (int source)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Grabs an OpenCV video capture source. <a href="#23574314cbd7a74bc6f32a640041d55a"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880">startCapture</a> (void)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Starts up grabbing of video frames. <a href="#b378daa447e8d9b94e1c7c8c6853b880"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QImage * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d">Ipl2QImage</a> (const IplImage *img)</td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Converts from the OpenCV IplImage data structure to a QImage. <a href="#aba8721f46b41d76326e048e3c876f1d"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">CvCapture * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QTimer * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QImage * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QLabel * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QVBoxLayout * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">QPushButton * </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00029">29</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="5835e06a54f1b09b4fd157d88dc72b6e"></a><!-- doxytag: member="QOpenCamWidget::QOpenCamWidget" ref="5835e06a54f1b09b4fd157d88dc72b6e" args="(QWidget *parent=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QOpenCamWidget::QOpenCamWidget </td>
+ <td>(</td>
+ <td class="paramtype">QWidget * </td>
+ <td class="paramname"> <em>parent</em> = <code>0</code> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Consctructs a QWidget based widget for displaying video coming from an OpenCV capture source.
+<p>
+Including webcam data in a Qt application can be problematic, at least as long as Phonon does not support webcams, and the Phonon GStreamer backend only supports simple pipelines.<p>
+This class solves the complexity of adding a webcam view, by using the cross-platform available OpenCV library.<p>
+Limitations, i.e. reasons to read this code and reimplement, are: saving or streaming video is not really available (unless you do repeated timer-triggered connections to the startSnap slot), the widget size is identical to the video source dimensions (it resizes the wodget using setMinimuSize to the video dimensions, and does not handle resizing to sizes above this dimension.<p>
+A brief summary of how to use this class: <div class="fragment"><pre class="fragment"> <a class="code" href="classQOpenCamWidget.html">QOpenCamWidget</a> *cw = <span class="keyword">new</span> <a class="code" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e" title="Consctructs a QWidget based widget for displaying video coming from an OpenCV capture...">QOpenCamWidget</a>(<span class="keyword">this</span>);
+ <span class="keywordflow">if</span> ( cw-><a class="code" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a" title="Grabs an OpenCV video capture source.">grabCapture</a>(-1) ) {
+ cw-><a class="code" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce" title="Changes the visibility of the optional built-in &quot;Take snapshot&quot; button...">setSnapshotVisible</a>(<span class="keyword">true</span>);
+ cw-><a class="code" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">startCapture</a>();
+ }
+ connect( cw, SIGNAL(<a class="code" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">imageReady</a>(QImage)), <span class="keyword">this</span>, SLOT(saveImage(QImage)));
+</pre></div><p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>*parent</em> </td><td>The parent widget containing this widget, defaults to NULL. </td></tr>
+ </table>
+</dl>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00060">60</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00039">canvas</a>, <a class="el" href="qopencamwidget_8h-source.html#l00036">frametimer</a>, <a class="el" href="qopencamwidget_8h-source.html#l00040">layout</a>, <a class="el" href="qopencamwidget_8h-source.html#l00037">nextFrame</a>, <a class="el" href="qopencamwidget_8h-source.html#l00041">trigger</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00042">trigger_active</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="b0ad4890d7d638354289e074a6f71a3f"></a><!-- doxytag: member="QOpenCamWidget::~QOpenCamWidget" ref="b0ad4890d7d638354289e074a6f71a3f" args="(void)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QOpenCamWidget::~QOpenCamWidget </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00088">88</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00039">canvas</a>, <a class="el" href="qopencamwidget_8h-source.html#l00035">capture</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00041">trigger</a>.</p>
+
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="c6186d1e510b5c8635b2d3bf5d94def6"></a><!-- doxytag: member="QOpenCamWidget::paintEvent" ref="c6186d1e510b5c8635b2d3bf5d94def6" args="(QPaintEvent *event)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void QOpenCamWidget::paintEvent </td>
+ <td>(</td>
+ <td class="paramtype">QPaintEvent * </td>
+ <td class="paramname"> <em>event</em> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+A paint event is a request to repaint all or part of a widget.
+<p>
+It can happen for one of the following reasons:<p>
+<ul>
+<li>repaint() or update() was invoked, </li>
+<li>the widget was obscured and has now been uncovered, or </li>
+<li>many other reasons.</li>
+</ul>
+<a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a> uses the paintEvent to draw each frame onto the screen. The paintEvent itself is regularily triggered by explicit update() calls in <a class="el" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4" title="Grabs a frame and causes an update() when triggered.">QOpenCamWidget::grabFrame()</a>.
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00144">144</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00039">canvas</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00037">nextFrame</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="8f885a8bb88870cd19cfc9eb4e02e2ce"></a><!-- doxytag: member="QOpenCamWidget::setSnapshotVisible" ref="8f885a8bb88870cd19cfc9eb4e02e2ce" args="(bool visible)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void QOpenCamWidget::setSnapshotVisible </td>
+ <td>(</td>
+ <td class="paramtype">bool </td>
+ <td class="paramname"> <em>visible</em> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Changes the visibility of the optional built-in "Take snapshot" button.
+<p>
+The widget contains a push-button that optionally can be displayed. When visible, this button is located at the bottom of the widget, and causes the SLOT <a class="el" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b" title="Trigger this slot to save a frame from the widget.">QOpenCamWidget::startSnap</a> to be triggered when clicked.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>visible</em> </td><td>True makes the button display, and trigger, false turns the feature off. False, i.e. no button, is default. </td></tr>
+ </table>
+</dl>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00110">110</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00040">layout</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00306">startSnap()</a>, <a class="el" href="qopencamwidget_8h-source.html#l00041">trigger</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00042">trigger_active</a>.</p>
+
+<p>Referenced by <a class="el" href="view_8cpp-source.html#l00032">View::View()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="23574314cbd7a74bc6f32a640041d55a"></a><!-- doxytag: member="QOpenCamWidget::grabCapture" ref="23574314cbd7a74bc6f32a640041d55a" args="(int source)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool QOpenCamWidget::grabCapture </td>
+ <td>(</td>
+ <td class="paramtype">int </td>
+ <td class="paramname"> <em>source</em> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Grabs an OpenCV video capture source.
+<p>
+By grabbing a source, it is meant to open the capture source, and have it ready to start streaming/capturing frames. Returns true on success, false on error. The grabCapture is separated from the constructor and/or frame-grabbing, so that you may do the error-checking you really should do before proceeding.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>source</em> </td><td>The OpenCV capture source enumeration index to open </td></tr>
+ </table>
+</dl>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00183">183</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00039">canvas</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00035">capture</a>.</p>
+
+<p>Referenced by <a class="el" href="view_8cpp-source.html#l00032">View::View()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="b378daa447e8d9b94e1c7c8c6853b880"></a><!-- doxytag: member="QOpenCamWidget::startCapture" ref="b378daa447e8d9b94e1c7c8c6853b880" args="(void)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void QOpenCamWidget::startCapture </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Starts up grabbing of video frames.
+<p>
+The actual grabbing and displaying of video frames is performed by a QTimer triggering the SLOT <a class="el" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4" title="Grabs a frame and causes an update() when triggered.">QOpenCamWidget::grabFrame()</a>. <a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">startCapture()</a> sets up the timer running this captureFrame loop.<p>
+The SLOT <a class="el" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b" title="Trigger this slot to save a frame from the widget.">QOpenCamWidget::startSnap()</a> is used to get image frames out from the widget for other uses, like saving or processing. This function relies on the timer created and configured by <a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">startCapture()</a>, and as such, this function is the only permitted way to start the actual capture/streaming of video from the source.
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00217">217</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00036">frametimer</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00266">grabFrame()</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00041">trigger</a>.</p>
+
+<p>Referenced by <a class="el" href="view_8cpp-source.html#l00032">View::View()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="aba8721f46b41d76326e048e3c876f1d"></a><!-- doxytag: member="QOpenCamWidget::Ipl2QImage" ref="aba8721f46b41d76326e048e3c876f1d" args="(const IplImage *img)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QImage * QOpenCamWidget::Ipl2QImage </td>
+ <td>(</td>
+ <td class="paramtype">const IplImage * </td>
+ <td class="paramname"> <em>img</em> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Converts from the OpenCV IplImage data structure to a QImage.
+<p>
+OpenCV uses a data strcuture calles IplImage, optimized for computer vision image processing tasks. This code was adapted from kcamwidget.cpp, part of the KDE SVN at playground/multimedia/kcam/kcamwidget.cpp<p>
+In regard that the IplImage can be forced into a format that aligns well with a RBG888-format, the conversion becomes one of the shortes, simples IplImage->QImage I've seen.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>*img</em> </td><td>The IplImage to be converted to a QImage. </td></tr>
+ </table>
+</dl>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00241">241</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00266">grabFrame()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="27c30cec9a8d44c1802e4218bea7bdb4"></a><!-- doxytag: member="QOpenCamWidget::grabFrame" ref="27c30cec9a8d44c1802e4218bea7bdb4" args="(void)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void QOpenCamWidget::grabFrame </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"> </td>
+ <td> ) </td>
+ <td><code> [slot]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Grabs a frame and causes an update() when triggered.
+<p>
+This is the SLOT that actually reads the video source and causes the widget to display live video. Preferably this slot will never be called my any other signal that a timeout() on the frametimer, which is controlled by <a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">QOpenCamWidget::startCapture()</a>
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00266">266</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00035">capture</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00241">Ipl2QImage()</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00037">nextFrame</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00217">startCapture()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="82540c90d3efa85631f13af3a60fa94b"></a><!-- doxytag: member="QOpenCamWidget::startSnap" ref="82540c90d3efa85631f13af3a60fa94b" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void QOpenCamWidget::startSnap </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"> </td>
+ <td> ) </td>
+ <td><code> [slot]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Trigger this slot to save a frame from the widget.
+<p>
+When this slot is triggered, the widgets capture loop is temporarily stopped, and the last displayed frame is "captured", and made available through the emitting of the class imageReady SIGNAL.<p>
+With the "Take snapshot" button visible (setSnapshotVisible(true)), this SLOT is triggered when the user clicks on the trigger button. If you do not wish to use the internal trigger button, you will have to add a different mechanism to trigger this SLOT.<p>
+It is possible, though I would not recommend, to use repeated triggering of this slot to do repeated frame-capture, and thus make a form of "Animation" or "Video" capture.
+<p>Definition at line <a class="el" href="qopencamwidget_8cpp-source.html#l00306">306</a> of file <a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8h-source.html#l00036">frametimer</a>, <a class="el" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">imageReady()</a>, and <a class="el" href="qopencamwidget_8h-source.html#l00037">nextFrame</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00110">setSnapshotVisible()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="d410be92ce25ff591726ba255070d09e"></a><!-- doxytag: member="QOpenCamWidget::imageReady" ref="d410be92ce25ff591726ba255070d09e" args="(QImage snapshot)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void QOpenCamWidget::imageReady </td>
+ <td>(</td>
+ <td class="paramtype">QImage </td>
+ <td class="paramname"> <em>snapshot</em> </td>
+ <td> ) </td>
+ <td><code> [signal]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00306">startSnap()</a>.</p>
+
+</div>
+</div><p>
+<hr><h2>Member Data Documentation</h2>
+<a class="anchor" name="fde0c9d47e2ea44f2aeea499fd570368"></a><!-- doxytag: member="QOpenCamWidget::capture" ref="fde0c9d47e2ea44f2aeea499fd570368" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">CvCapture* <a class="el" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">QOpenCamWidget::capture</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00035">35</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00183">grabCapture()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00266">grabFrame()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00088">~QOpenCamWidget()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="2e70551b39fd2bd15fc99ca4fa12107f"></a><!-- doxytag: member="QOpenCamWidget::frametimer" ref="2e70551b39fd2bd15fc99ca4fa12107f" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QTimer* <a class="el" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">QOpenCamWidget::frametimer</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00036">36</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00060">QOpenCamWidget()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00217">startCapture()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00306">startSnap()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="92dab283a477c1b8a6d6d5470d5ef94d"></a><!-- doxytag: member="QOpenCamWidget::nextFrame" ref="92dab283a477c1b8a6d6d5470d5ef94d" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QImage* <a class="el" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">QOpenCamWidget::nextFrame</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00037">37</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00266">grabFrame()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00144">paintEvent()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00060">QOpenCamWidget()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00306">startSnap()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="7ac719f26d5f4a0a80ac6e4ffd4fe46d"></a><!-- doxytag: member="QOpenCamWidget::canvas" ref="7ac719f26d5f4a0a80ac6e4ffd4fe46d" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QLabel* <a class="el" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">QOpenCamWidget::canvas</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00039">39</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00183">grabCapture()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00144">paintEvent()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00060">QOpenCamWidget()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00088">~QOpenCamWidget()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="e91d147fdd20819b56ebd7861d7ab44e"></a><!-- doxytag: member="QOpenCamWidget::layout" ref="e91d147fdd20819b56ebd7861d7ab44e" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QVBoxLayout* <a class="el" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">QOpenCamWidget::layout</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00040">40</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00060">QOpenCamWidget()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00110">setSnapshotVisible()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="a0aaf9bfc43d01979a7af03741620624"></a><!-- doxytag: member="QOpenCamWidget::trigger" ref="a0aaf9bfc43d01979a7af03741620624" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">QPushButton* <a class="el" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">QOpenCamWidget::trigger</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00041">41</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00060">QOpenCamWidget()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00110">setSnapshotVisible()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00217">startCapture()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00088">~QOpenCamWidget()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="1718e4971977520cfe642daa78e1997e"></a><!-- doxytag: member="QOpenCamWidget::trigger_active" ref="1718e4971977520cfe642daa78e1997e" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">QOpenCamWidget::trigger_active</a><code> [private]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="qopencamwidget_8h-source.html#l00042">42</a> of file <a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>.</p>
+
+<p>Referenced by <a class="el" href="qopencamwidget_8cpp-source.html#l00060">QOpenCamWidget()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00110">setSnapshotVisible()</a>.</p>
+
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a><li><a class="el" href="qopencamwidget_8cpp-source.html">qopencamwidget.cpp</a></ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Member List</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>View Member List</h1>This is the complete list of members for <a class="el" href="classView.html">View</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classView.html#4b82b2654c9dd798bce121f02b30a810">saveImage</a>(QImage image)</td><td><a class="el" href="classView.html">View</a></td><td><code> [slot]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classView.html#74d64dd513eae96bc3196131f865a4e8">View</a>(QWidget *parent=0)</td><td><a class="el" href="classView.html">View</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classView.html#450dfab3f21a52edc03db4310593412f">~View</a>(void)</td><td><a class="el" href="classView.html">View</a></td><td></td></tr>
+</table></div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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 Class Reference</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>View Class Reference</h1><!-- doxytag: class="View" --><code>#include <<a class="el" href="view_8h-source.html">view.h</a>></code>
+<p>
+
+<p>
+<a href="classView-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Slots</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#4b82b2654c9dd798bce121f02b30a810">saveImage</a> (QImage image)</td></tr>
+
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#74d64dd513eae96bc3196131f865a4e8">View</a> (QWidget *parent=0)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#450dfab3f21a52edc03db4310593412f">~View</a> (void)</td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+
+<p>Definition at line <a class="el" href="view_8h-source.html#l00005">5</a> of file <a class="el" href="view_8h-source.html">view.h</a>.</p>
+<hr><h2>Constructor & Destructor Documentation</h2>
+<a class="anchor" name="74d64dd513eae96bc3196131f865a4e8"></a><!-- doxytag: member="View::View" ref="74d64dd513eae96bc3196131f865a4e8" args="(QWidget *parent=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">View::View </td>
+ <td>(</td>
+ <td class="paramtype">QWidget * </td>
+ <td class="paramname"> <em>parent</em> = <code>0</code> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="view_8cpp-source.html#l00032">32</a> of file <a class="el" href="view_8cpp-source.html">view.cpp</a>.</p>
+
+<p>References <a class="el" href="qopencamwidget_8cpp-source.html#l00183">QOpenCamWidget::grabCapture()</a>, <a class="el" href="view_8cpp-source.html#l00078">saveImage()</a>, <a class="el" href="qopencamwidget_8cpp-source.html#l00110">QOpenCamWidget::setSnapshotVisible()</a>, and <a class="el" href="qopencamwidget_8cpp-source.html#l00217">QOpenCamWidget::startCapture()</a>.</p>
+
+</div>
+</div><p>
+<a class="anchor" name="450dfab3f21a52edc03db4310593412f"></a><!-- doxytag: member="View::~View" ref="450dfab3f21a52edc03db4310593412f" args="(void)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">View::~View </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"> </td>
+ <td> ) </td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="view_8cpp-source.html#l00074">74</a> of file <a class="el" href="view_8cpp-source.html">view.cpp</a>.</p>
+
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="4b82b2654c9dd798bce121f02b30a810"></a><!-- doxytag: member="View::saveImage" ref="4b82b2654c9dd798bce121f02b30a810" args="(QImage image)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void View::saveImage </td>
+ <td>(</td>
+ <td class="paramtype">QImage </td>
+ <td class="paramname"> <em>image</em> </td>
+ <td> ) </td>
+ <td><code> [slot]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="view_8cpp-source.html#l00078">78</a> of file <a class="el" href="view_8cpp-source.html">view.cpp</a>.</p>
+
+<p>Referenced by <a class="el" href="view_8cpp-source.html#l00032">View()</a>.</p>
+
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="view_8h-source.html">view.h</a><li><a class="el" href="view_8cpp-source.html">view.cpp</a></ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+ font-size: 90%;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+}
+H3 {
+ font-size: 100%;
+}
+CAPTION {
+ font-weight: bold
+}
+DIV.qindex {
+ width: 100%;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.navpath {
+ width: 100%;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.navtab {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+TD.navtab {
+ font-size: 70%;
+}
+A.qindex {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D;
+}
+A.qindex:visited {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D
+}
+A.qindex:hover {
+ text-decoration: none;
+ background-color: #ddddff;
+}
+A.qindexHL {
+ text-decoration: none;
+ font-weight: bold;
+ background-color: #6666cc;
+ color: #ffffff;
+ border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff;
+}
+A.qindexHL:visited {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff
+}
+A.el {
+ text-decoration: none;
+ font-weight: bold
+}
+A.elRef {
+ font-weight: bold
+}
+A.code:link {
+ text-decoration: none;
+ font-weight: normal;
+ color: #0000FF
+}
+A.code:visited {
+ text-decoration: none;
+ font-weight: normal;
+ color: #0000FF
+}
+A.codeRef:link {
+ font-weight: normal;
+ color: #0000FF
+}
+A.codeRef:visited {
+ font-weight: normal;
+ color: #0000FF
+}
+A:hover {
+ text-decoration: none;
+ background-color: #f2f2ff
+}
+DL.el {
+ margin-left: -1cm
+}
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 95%;
+}
+PRE.fragment {
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
+ margin-top: 4px;
+ margin-bottom: 4px;
+ margin-left: 2px;
+ margin-right: 8px;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+DIV.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px
+}
+
+DIV.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ margin-bottom: 6px;
+ font-weight: bold;
+}
+DIV.groupText {
+ margin-left: 16px;
+ font-style: italic;
+ font-size: 90%
+}
+BODY {
+ background: white;
+ color: black;
+ margin-right: 20px;
+ margin-left: 20px;
+}
+TD.indexkey {
+ background-color: #e8eef2;
+ font-weight: bold;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+ background-color: #e8eef2;
+ font-style: italic;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TR.memlist {
+ background-color: #f0f0f0;
+}
+P.formulaDsp {
+ text-align: center;
+}
+IMG.formulaDsp {
+}
+IMG.formulaInl {
+ vertical-align: middle;
+}
+SPAN.keyword { color: #008000 }
+SPAN.keywordtype { color: #604020 }
+SPAN.keywordflow { color: #e08000 }
+SPAN.comment { color: #800000 }
+SPAN.preprocessor { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral { color: #008080 }
+SPAN.vhdldigit { color: #ff00ff }
+SPAN.vhdlchar { color: #000000 }
+SPAN.vhdlkeyword { color: #700070 }
+SPAN.vhdllogic { color: #ff0000 }
+
+.mdescLeft {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.mdescRight {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.memItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplParams {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ color: #606060;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+FORM.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+INPUT.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+TD.tiny {
+ font-size: 75%;
+}
+a {
+ color: #1A41A8;
+}
+a:visited {
+ color: #2A3798;
+}
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #84b0c7;
+}
+TH.dirtab {
+ background: #e8eef2;
+ font-weight: bold;
+}
+HR {
+ height: 1px;
+ border: none;
+ border-top: 1px solid black;
+}
+
+/* Style for detailed member documentation */
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+.memitem {
+ padding: 4px;
+ background-color: #eef3f5;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #dedeee;
+ -moz-border-radius: 8px 8px 8px 8px;
+}
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+.memdoc{
+ padding-left: 10px;
+}
+.memproto {
+ background-color: #d5e1e8;
+ width: 100%;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #84b0c7;
+ font-weight: bold;
+ -moz-border-radius: 8px 8px 8px 8px;
+}
+.paramkey {
+ text-align: right;
+}
+.paramtype {
+ white-space: nowrap;
+}
+.paramname {
+ color: #602020;
+ font-style: italic;
+ white-space: nowrap;
+}
+/* End Styling for detailed member documentation */
+
+/* for the tree view */
+.ftvtree {
+ font-family: sans-serif;
+ margin:0.5em;
+}
+/* these are for tree view when used as main index */
+.directory {
+ font-size: 9pt;
+ font-weight: bold;
+}
+.directory h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+/* The following two styles can be used to replace the root node title */
+/* with an image of your choice. Simply uncomment the next two styles, */
+/* specify the name of your image and be sure to set 'height' to the */
+/* proper pixel height of your image. */
+
+/* .directory h3.swap { */
+/* height: 61px; */
+/* background-repeat: no-repeat; */
+/* background-image: url("yourimage.gif"); */
+/* } */
+/* .directory h3.swap span { */
+/* display: none; */
+/* } */
+
+.directory > h3 {
+ margin-top: 0;
+}
+.directory p {
+ margin: 0px;
+ white-space: nowrap;
+}
+.directory div {
+ display: none;
+ margin: 0px;
+}
+.directory img {
+ vertical-align: -30%;
+}
+/* these are for tree view when not used as main index */
+.directory-alt {
+ font-size: 100%;
+ font-weight: bold;
+}
+.directory-alt h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+.directory-alt > h3 {
+ margin-top: 0;
+}
+.directory-alt p {
+ margin: 0px;
+ white-space: nowrap;
+}
+.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+.directory-alt img {
+ vertical-align: -30%;
+}
+
--- /dev/null
+<!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: File Index</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 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>
+ <div class="tabs">
+ <ul>
+ <li class="current"><a href="files.html"><span>File List</span></a></li>
+ <li><a href="globals.html"><span>File Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>File List</h1>Here is a list of all files with brief descriptions:<table>
+ <tr><td class="indexkey"><a class="el" href="main_8cpp.html">main.cpp</a> <a href="main_8cpp-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="qopencamwidget_8cpp.html">qopencamwidget.cpp</a> <a href="qopencamwidget_8cpp-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="qopencamwidget_8h.html">qopencamwidget.h</a> <a href="qopencamwidget_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="view_8cpp.html">view.cpp</a> <a href="view_8cpp-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="view_8h.html">view.h</a> <a href="view_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+</table>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Class Members</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li class="current"><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current"><a href="functions.html"><span>All</span></a></li>
+ <li><a href="functions_func.html"><span>Functions</span></a></li>
+ <li><a href="functions_vars.html"><span>Variables</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+Here is a list of all class members with links to the classes they belong to:
+<p>
+<ul>
+<li>canvas
+: <a class="el" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">QOpenCamWidget</a>
+<li>capture
+: <a class="el" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">QOpenCamWidget</a>
+<li>frametimer
+: <a class="el" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">QOpenCamWidget</a>
+<li>grabCapture()
+: <a class="el" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a">QOpenCamWidget</a>
+<li>grabFrame()
+: <a class="el" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4">QOpenCamWidget</a>
+<li>imageReady()
+: <a class="el" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">QOpenCamWidget</a>
+<li>Ipl2QImage()
+: <a class="el" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d">QOpenCamWidget</a>
+<li>layout
+: <a class="el" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">QOpenCamWidget</a>
+<li>nextFrame
+: <a class="el" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">QOpenCamWidget</a>
+<li>paintEvent()
+: <a class="el" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6">QOpenCamWidget</a>
+<li>QOpenCamWidget()
+: <a class="el" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e">QOpenCamWidget</a>
+<li>saveImage()
+: <a class="el" href="classView.html#4b82b2654c9dd798bce121f02b30a810">View</a>
+<li>setSnapshotVisible()
+: <a class="el" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce">QOpenCamWidget</a>
+<li>startCapture()
+: <a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880">QOpenCamWidget</a>
+<li>startSnap()
+: <a class="el" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b">QOpenCamWidget</a>
+<li>trigger
+: <a class="el" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">QOpenCamWidget</a>
+<li>trigger_active
+: <a class="el" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">QOpenCamWidget</a>
+<li>View()
+: <a class="el" href="classView.html#74d64dd513eae96bc3196131f865a4e8">View</a>
+<li>~QOpenCamWidget()
+: <a class="el" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">QOpenCamWidget</a>
+<li>~View()
+: <a class="el" href="classView.html#450dfab3f21a52edc03db4310593412f">View</a>
+</ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Class Members - Functions</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li class="current"><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="functions.html"><span>All</span></a></li>
+ <li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
+ <li><a href="functions_vars.html"><span>Variables</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+
+<p>
+<ul>
+<li>grabCapture()
+: <a class="el" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a">QOpenCamWidget</a>
+<li>grabFrame()
+: <a class="el" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4">QOpenCamWidget</a>
+<li>imageReady()
+: <a class="el" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">QOpenCamWidget</a>
+<li>Ipl2QImage()
+: <a class="el" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d">QOpenCamWidget</a>
+<li>paintEvent()
+: <a class="el" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6">QOpenCamWidget</a>
+<li>QOpenCamWidget()
+: <a class="el" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e">QOpenCamWidget</a>
+<li>saveImage()
+: <a class="el" href="classView.html#4b82b2654c9dd798bce121f02b30a810">View</a>
+<li>setSnapshotVisible()
+: <a class="el" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce">QOpenCamWidget</a>
+<li>startCapture()
+: <a class="el" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880">QOpenCamWidget</a>
+<li>startSnap()
+: <a class="el" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b">QOpenCamWidget</a>
+<li>View()
+: <a class="el" href="classView.html#74d64dd513eae96bc3196131f865a4e8">View</a>
+<li>~QOpenCamWidget()
+: <a class="el" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">QOpenCamWidget</a>
+<li>~View()
+: <a class="el" href="classView.html#450dfab3f21a52edc03db4310593412f">View</a>
+</ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Class Members - Variables</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 Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class List</span></a></li>
+ <li class="current"><a href="functions.html"><span>Class Members</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="functions.html"><span>All</span></a></li>
+ <li><a href="functions_func.html"><span>Functions</span></a></li>
+ <li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+
+<p>
+<ul>
+<li>canvas
+: <a class="el" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">QOpenCamWidget</a>
+<li>capture
+: <a class="el" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">QOpenCamWidget</a>
+<li>frametimer
+: <a class="el" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">QOpenCamWidget</a>
+<li>layout
+: <a class="el" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">QOpenCamWidget</a>
+<li>nextFrame
+: <a class="el" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">QOpenCamWidget</a>
+<li>trigger
+: <a class="el" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">QOpenCamWidget</a>
+<li>trigger_active
+: <a class="el" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">QOpenCamWidget</a>
+</ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Class Members</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 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>
+ <div class="tabs">
+ <ul>
+ <li><a href="files.html"><span>File List</span></a></li>
+ <li class="current"><a href="globals.html"><span>File Members</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li class="current"><a href="globals.html"><span>All</span></a></li>
+ <li><a href="globals_func.html"><span>Functions</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+Here is a list of all file members with links to the files they belong to:
+<p>
+<ul>
+<li>main()
+: <a class="el" href="main_8cpp.html#0ddf1224851353fc92bfbff6f499fa97">main.cpp</a>
+</ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: Class Members</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 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>
+ <div class="tabs">
+ <ul>
+ <li><a href="files.html"><span>File List</span></a></li>
+ <li class="current"><a href="globals.html"><span>File Members</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="globals.html"><span>All</span></a></li>
+ <li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+
+<p>
+<ul>
+<li>main()
+: <a class="el" href="main_8cpp.html#0ddf1224851353fc92bfbff6f499fa97">main.cpp</a>
+</ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>QOpenCamWidget</title></head>
+<frameset cols="250,*">
+ <frame src="tree.html" name="treefrm">
+ <frame src="main.html" name="basefrm">
+ <noframes>
+ <a href="main.html">Frames are disabled. Click here to go to the main page.</a>
+ </noframes>
+</frameset>
+</html>
--- /dev/null
+<!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: Main Page</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 class="current"><a href="main.html"><span>Main Page</span></a></li>
+ <li><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="contents">
+<h1>QOpenCamWidget Documentation</h1>
+<p>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: main.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 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>main.cpp</h1><a href="main_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 code stup (main.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 <QtGui/QApplication></span>
+<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="view_8h.html">view.h</a>"</span>
+<a name="l00026"></a>00026
+<a name="l00027"></a>00027 <span class="comment">// The contents of this file is simply a Qt Main app stub.</span>
+<a name="l00028"></a><a class="code" href="main_8cpp.html#0ddf1224851353fc92bfbff6f499fa97">00028</a> <span class="keywordtype">int</span> <a class="code" href="main_8cpp.html#0ddf1224851353fc92bfbff6f499fa97">main</a> (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>*argv[])
+<a name="l00029"></a>00029 {
+<a name="l00030"></a>00030 QApplication app(argc, argv);
+<a name="l00031"></a>00031 app.setApplicationName(<span class="stringliteral">"QOpenCamWidget testapp"</span>);
+<a name="l00032"></a>00032 <a class="code" href="classView.html">View</a> v;
+<a name="l00033"></a>00033 v.show();
+<a name="l00034"></a>00034 <span class="keywordflow">return</span> app.exec();
+<a name="l00035"></a>00035 }
+<a name="l00036"></a>00036
+</pre></div></div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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: main.cpp File Reference</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 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>
+</div>
+<div class="contents">
+<h1>main.cpp File Reference</h1><code>#include <QtGui/QApplication></code><br>
+<code>#include "<a class="el" href="view_8h-source.html">view.h</a>"</code><br>
+
+<p>
+<a href="main_8cpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
+
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="0ddf1224851353fc92bfbff6f499fa97"></a><!-- doxytag: member="main.cpp::main" ref="0ddf1224851353fc92bfbff6f499fa97" args="(int argc, char *argv[])" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">int main </td>
+ <td>(</td>
+ <td class="paramtype">int </td>
+ <td class="paramname"> <em>argc</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">char * </td>
+ <td class="paramname"> <em>argv</em>[]</td><td> </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+<p>Definition at line <a class="el" href="main_8cpp-source.html#l00028">28</a> of file <a class="el" href="main_8cpp-source.html">main.cpp</a>.</p>
+
+</div>
+</div><p>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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 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>->setMinimumSize(200, 100);
+<a name="l00073"></a>00073 <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>->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>->setText(<span class="stringliteral">"Take picture"</span>);
+<a name="l00078"></a>00078 <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>->setEnabled(<span class="keyword">false</span>);
+<a name="l00079"></a>00079 <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>->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>->addWidget(<a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>);
+<a name="l00085"></a>00085 this->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( &<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 &quot;Take snapshot&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 && !<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>->addWidget(<a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>);
+<a name="l00118"></a>00118 <a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>->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 && <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>->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>->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->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->drawImage(event->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>->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>->setText(<span class="stringliteral">"No data, check/test camera"</span>);
+<a name="l00165"></a>00165 }
+<a name="l00166"></a>00166 paint->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() << <span class="stringliteral">"QOpenCamWidget::grabCapture("</span> << source << <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->width,image->height);
+<a name="l00194"></a>00194
+<a name="l00195"></a>00195 qDebug() << <span class="stringliteral">"Device image format: "</span> << image->width << <span class="stringliteral">"x"</span> << image->height;
+<a name="l00196"></a>00196 <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>->setMinimumSize(t_size);
+<a name="l00197"></a>00197 <a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>->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>->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>->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<uchar*>(tmp->imageData),
+<a name="l00246"></a>00246 tmp->width,
+<a name="l00247"></a>00247 tmp->height,
+<a name="l00248"></a>00248 3* tmp->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() << <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>->isActive())
+<a name="l00310"></a>00310 {
+<a name="l00311"></a>00311 <a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>->stop();
+<a name="l00312"></a>00312 qDebug() << <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>->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
+<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>
--- /dev/null
+<!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 File Reference</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 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>
+</div>
+<div class="contents">
+<h1>qopencamwidget.cpp File Reference</h1><code>#include "<a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>"</code><br>
+
+<p>
+<a href="qopencamwidget_8cpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+</table>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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.h 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 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.h</h1><a href="qopencamwidget_8h.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">#ifndef QOPENCVWIDGET_H</span>
+<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define QOPENCVWIDGET_H</span>
+<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#include <QtGui></span>
+<a name="l00026"></a>00026 <span class="preprocessor">#include <opencv/cv.h></span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include <opencv/highgui.h></span>
+<a name="l00028"></a>00028
+<a name="l00029"></a><a class="code" href="classQOpenCamWidget.html">00029</a> <span class="keyword">class </span><a class="code" href="classQOpenCamWidget.html">QOpenCamWidget</a>
+<a name="l00030"></a>00030 : <span class="keyword">public</span> QWidget
+<a name="l00031"></a>00031 {
+<a name="l00032"></a>00032 Q_OBJECT
+<a name="l00033"></a>00033
+<a name="l00034"></a>00034 <span class="keyword">private</span>:
+<a name="l00035"></a><a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">00035</a> CvCapture *<a class="code" href="classQOpenCamWidget.html#fde0c9d47e2ea44f2aeea499fd570368">capture</a>;
+<a name="l00036"></a><a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">00036</a> QTimer *<a class="code" href="classQOpenCamWidget.html#2e70551b39fd2bd15fc99ca4fa12107f">frametimer</a>;
+<a name="l00037"></a><a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">00037</a> QImage *<a class="code" href="classQOpenCamWidget.html#92dab283a477c1b8a6d6d5470d5ef94d">nextFrame</a>;
+<a name="l00038"></a>00038 <span class="comment">//QImage *snapshot;</span>
+<a name="l00039"></a><a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">00039</a> QLabel *<a class="code" href="classQOpenCamWidget.html#7ac719f26d5f4a0a80ac6e4ffd4fe46d">canvas</a>;
+<a name="l00040"></a><a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">00040</a> QVBoxLayout *<a class="code" href="classQOpenCamWidget.html#e91d147fdd20819b56ebd7861d7ab44e">layout</a>;
+<a name="l00041"></a><a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">00041</a> QPushButton *<a class="code" href="classQOpenCamWidget.html#a0aaf9bfc43d01979a7af03741620624">trigger</a>;
+<a name="l00042"></a><a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">00042</a> <span class="keywordtype">bool</span> <a class="code" href="classQOpenCamWidget.html#1718e4971977520cfe642daa78e1997e">trigger_active</a>;
+<a name="l00043"></a>00043
+<a name="l00044"></a>00044 <span class="keyword">public</span>:
+<a name="l00045"></a>00045 <span class="comment">// Defaults, standard elements ;)</span>
+<a name="l00046"></a>00046 <a class="code" href="classQOpenCamWidget.html#5835e06a54f1b09b4fd157d88dc72b6e" title="Consctructs a QWidget based widget for displaying video coming from an OpenCV capture...">QOpenCamWidget</a>(QWidget *parent = 0);
+<a name="l00047"></a>00047 <a class="code" href="classQOpenCamWidget.html#b0ad4890d7d638354289e074a6f71a3f">~QOpenCamWidget</a>(<span class="keywordtype">void</span>);
+<a name="l00048"></a>00048
+<a name="l00049"></a>00049 <span class="comment">// Overides, reimplementation of abstract</span>
+<a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#c6186d1e510b5c8635b2d3bf5d94def6" title="A paint event is a request to repaint all or part of a widget.">paintEvent</a> ( QPaintEvent * event );
+<a name="l00051"></a>00051
+<a name="l00052"></a>00052 <span class="comment">// Public methods specific to this class</span>
+<a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce" title="Changes the visibility of the optional built-in &quot;Take snapshot&quot; button...">setSnapshotVisible</a>( <span class="keywordtype">bool</span> visible );
+<a name="l00054"></a>00054 <span class="keywordtype">bool</span> <a class="code" href="classQOpenCamWidget.html#23574314cbd7a74bc6f32a640041d55a" title="Grabs an OpenCV video capture source.">grabCapture</a>(<span class="keywordtype">int</span> source);
+<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#b378daa447e8d9b94e1c7c8c6853b880" title="Starts up grabbing of video frames.">startCapture</a>(<span class="keywordtype">void</span>);
+<a name="l00056"></a>00056 QImage* <a class="code" href="classQOpenCamWidget.html#aba8721f46b41d76326e048e3c876f1d" title="Converts from the OpenCV IplImage data structure to a QImage.">Ipl2QImage</a>(<span class="keyword">const</span> IplImage *img);
+<a name="l00057"></a>00057
+<a name="l00058"></a>00058 <span class="keyword">public</span> slots:
+<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#27c30cec9a8d44c1802e4218bea7bdb4" title="Grabs a frame and causes an update() when triggered.">grabFrame</a>(<span class="keywordtype">void</span>);
+<a name="l00060"></a>00060 <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#82540c90d3efa85631f13af3a60fa94b" title="Trigger this slot to save a frame from the widget.">startSnap</a>();
+<a name="l00061"></a>00061 signals:
+<a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="classQOpenCamWidget.html#d410be92ce25ff591726ba255070d09e">imageReady</a>(QImage snapshot);
+<a name="l00063"></a>00063 };
+<a name="l00064"></a>00064
+<a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
+<a name="l00066"></a>00066 <span class="preprocessor"></span>
+</pre></div></div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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.h File Reference</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 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>
+</div>
+<div class="contents">
+<h1>qopencamwidget.h File Reference</h1><code>#include <QtGui></code><br>
+<code>#include <opencv/cv.h></code><br>
+<code>#include <opencv/highgui.h></code><br>
+
+<p>
+<a href="qopencamwidget_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classQOpenCamWidget.html">QOpenCamWidget</a></td></tr>
+
+</table>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
+
+DIV.tabs
+{
+ float : left;
+ width : 100%;
+ background : url("tab_b.gif") repeat-x bottom;
+ margin-bottom : 4px;
+}
+
+DIV.tabs UL
+{
+ margin : 0px;
+ padding-left : 10px;
+ list-style : none;
+}
+
+DIV.tabs LI, DIV.tabs FORM
+{
+ display : inline;
+ margin : 0px;
+ padding : 0px;
+}
+
+DIV.tabs FORM
+{
+ float : right;
+}
+
+DIV.tabs A
+{
+ float : left;
+ background : url("tab_r.gif") no-repeat right top;
+ border-bottom : 1px solid #84B0C7;
+ font-size : x-small;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+DIV.tabs A:hover
+{
+ background-position: 100% -150px;
+}
+
+DIV.tabs A:link, DIV.tabs A:visited,
+DIV.tabs A:active, DIV.tabs A:hover
+{
+ color: #1A419D;
+}
+
+DIV.tabs SPAN
+{
+ float : left;
+ display : block;
+ background : url("tab_l.gif") no-repeat left top;
+ padding : 5px 9px;
+ white-space : nowrap;
+}
+
+DIV.tabs INPUT
+{
+ float : right;
+ display : inline;
+ font-size : 1em;
+}
+
+DIV.tabs TD
+{
+ font-size : x-small;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+DIV.tabs SPAN {float : none;}
+/* End IE5-Mac hack */
+
+DIV.tabs A:hover SPAN
+{
+ background-position: 0% -150px;
+}
+
+DIV.tabs LI.current A
+{
+ background-position: 100% -150px;
+ border-width : 0px;
+}
+
+DIV.tabs LI.current SPAN
+{
+ background-position: 0% -150px;
+ padding-bottom : 6px;
+}
+
+DIV.navpath
+{
+ background : none;
+ border : none;
+ border-bottom : 1px solid #84B0C7;
+}
--- /dev/null
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta http-equiv="Content-Language" content="en" />
+ <link rel="stylesheet" href="doxygen.css">
+ <title>TreeView</title>
+ <script type="text/javascript">
+ <!-- // Hide script from old browsers
+
+ function toggleFolder(id, imageNode)
+ {
+ var folder = document.getElementById(id);
+ var l = imageNode.src.length;
+ if (imageNode.src.substring(l-20,l)=="ftv2folderclosed.png" ||
+ imageNode.src.substring(l-18,l)=="ftv2folderopen.png")
+ {
+ imageNode = imageNode.previousSibling;
+ l = imageNode.src.length;
+ }
+ if (folder == null)
+ {
+ }
+ else if (folder.style.display == "block")
+ {
+ if (imageNode != null)
+ {
+ imageNode.nextSibling.src = "ftv2folderclosed.png";
+ if (imageNode.src.substring(l-13,l) == "ftv2mnode.png")
+ {
+ imageNode.src = "ftv2pnode.png";
+ }
+ else if (imageNode.src.substring(l-17,l) == "ftv2mlastnode.png")
+ {
+ imageNode.src = "ftv2plastnode.png";
+ }
+ }
+ folder.style.display = "none";
+ }
+ else
+ {
+ if (imageNode != null)
+ {
+ imageNode.nextSibling.src = "ftv2folderopen.png";
+ if (imageNode.src.substring(l-13,l) == "ftv2pnode.png")
+ {
+ imageNode.src = "ftv2mnode.png";
+ }
+ else if (imageNode.src.substring(l-17,l) == "ftv2plastnode.png")
+ {
+ imageNode.src = "ftv2mlastnode.png";
+ }
+ }
+ folder.style.display = "block";
+ }
+ }
+
+ // End script hiding -->
+ </script>
+ </head>
+
+ <body class="ftvtree">
+ <div class="directory">
+ <h3 class="swap"><span>QOpenCamWidget</span></h3>
+ <div style="display: block;">
+ <p><img src="ftv2pnode.png" alt="o" width=16 height=22 onclick="toggleFolder('folder1', this)"/><img src="ftv2folderclosed.png" alt="+" width=24 height=22 onclick="toggleFolder('folder1', this)"/><a class="el" href="annotated.html" target="basefrm">Class List</a></p>
+ <div id="folder1">
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classQOpenCamWidget.html" target="basefrm">QOpenCamWidget</a></p>
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="classView.html" target="basefrm">View</a></p>
+ </div>
+ <p><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="functions.html" target="basefrm">Class Members</a></p>
+ <p><img src="ftv2pnode.png" alt="o" width=16 height=22 onclick="toggleFolder('folder2', this)"/><img src="ftv2folderclosed.png" alt="+" width=24 height=22 onclick="toggleFolder('folder2', this)"/><a class="el" href="files.html" target="basefrm">File List</a></p>
+ <div id="folder2">
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="main_8cpp.html" target="basefrm">main.cpp</a></p>
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="qopencamwidget_8cpp.html" target="basefrm">qopencamwidget.cpp</a></p>
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="qopencamwidget_8h.html" target="basefrm">qopencamwidget.h</a></p>
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="view_8cpp.html" target="basefrm">view.cpp</a></p>
+ <p><img src="ftv2vertline.png" alt="|" width=16 height=22 /><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="view_8h.html" target="basefrm">view.h</a></p>
+ </div>
+ <p><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="globals.html" target="basefrm">File Members</a></p>
+ </div>
+ </div>
+
--- /dev/null
+<!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 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-><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-><a class="code" href="classQOpenCamWidget.html#8f885a8bb88870cd19cfc9eb4e02e2ce" title="Changes the visibility of the optional built-in &quot;Take snapshot&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-><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->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() << <span class="stringliteral">"Recieved an image of size "</span>
+<a name="l00083"></a>00083 << image.width() << <span class="stringliteral">"x"</span> << 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
+<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>
--- /dev/null
+<!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 File Reference</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 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>
+</div>
+<div class="contents">
+<h1>view.cpp File Reference</h1><code>#include "<a class="el" href="view_8h-source.html">view.h</a>"</code><br>
+<code>#include "<a class="el" href="qopencamwidget_8h-source.html">qopencamwidget.h</a>"</code><br>
+
+<p>
+<a href="view_8cpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+</table>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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.h 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 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.h</h1><a href="view_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef VIEW_H</span>
+<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define VIEW_H</span>
+<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#include <QtGui></span>
+<a name="l00004"></a>00004
+<a name="l00005"></a><a class="code" href="classView.html">00005</a> <span class="keyword">class </span><a class="code" href="classView.html">View</a>
+<a name="l00006"></a>00006 : <span class="keyword">public</span> QMainWindow
+<a name="l00007"></a>00007 {
+<a name="l00008"></a>00008 Q_OBJECT
+<a name="l00009"></a>00009
+<a name="l00010"></a>00010 <span class="keyword">public</span>:
+<a name="l00011"></a>00011 <a class="code" href="classView.html#74d64dd513eae96bc3196131f865a4e8">View</a>(QWidget *parent = 0);
+<a name="l00012"></a>00012 <a class="code" href="classView.html#450dfab3f21a52edc03db4310593412f">~View</a>(<span class="keywordtype">void</span>);
+<a name="l00013"></a>00013
+<a name="l00014"></a>00014 <span class="keyword">public</span> slots:
+<a name="l00015"></a>00015 <span class="keywordtype">void</span> <a class="code" href="classView.html#4b82b2654c9dd798bce121f02b30a810">saveImage</a>(QImage image);
+<a name="l00016"></a>00016 };
+<a name="l00017"></a>00017
+<a name="l00018"></a>00018 <span class="preprocessor">#endif</span>
+</pre></div></div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+<!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.h File Reference</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 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>
+</div>
+<div class="contents">
+<h1>view.h File Reference</h1><code>#include <QtGui></code><br>
+
+<p>
+<a href="view_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html">View</a></td></tr>
+
+</table>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jun 11 01:49:57 2009 for QOpenCamWidget by
+<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>
--- /dev/null
+.TH "QOpenCamWidget" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+QOpenCamWidget \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <qopencamwidget.h>\fP
+.PP
+.SS "Public Slots"
+
+.in +1c
+.ti -1c
+.RI "void \fBgrabFrame\fP (void)"
+.br
+.RI "\fIGrabs a frame and causes an update() when triggered. \fP"
+.ti -1c
+.RI "void \fBstartSnap\fP ()"
+.br
+.RI "\fITrigger this slot to save a frame from the widget. \fP"
+.in -1c
+.SS "Signals"
+
+.in +1c
+.ti -1c
+.RI "void \fBimageReady\fP (QImage snapshot)"
+.br
+.in -1c
+.SS "Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "\fBQOpenCamWidget\fP (QWidget *parent=0)"
+.br
+.RI "\fIConsctructs a QWidget based widget for displaying video coming from an OpenCV capture source. \fP"
+.ti -1c
+.RI "\fB~QOpenCamWidget\fP (void)"
+.br
+.ti -1c
+.RI "void \fBpaintEvent\fP (QPaintEvent *event)"
+.br
+.RI "\fIA paint event is a request to repaint all or part of a widget. \fP"
+.ti -1c
+.RI "void \fBsetSnapshotVisible\fP (bool visible)"
+.br
+.RI "\fIChanges the visibility of the optional built-in 'Take snapshot' button. \fP"
+.ti -1c
+.RI "bool \fBgrabCapture\fP (int source)"
+.br
+.RI "\fIGrabs an OpenCV video capture source. \fP"
+.ti -1c
+.RI "void \fBstartCapture\fP (void)"
+.br
+.RI "\fIStarts up grabbing of video frames. \fP"
+.ti -1c
+.RI "QImage * \fBIpl2QImage\fP (const IplImage *img)"
+.br
+.RI "\fIConverts from the OpenCV IplImage data structure to a QImage. \fP"
+.in -1c
+.SS "Private Attributes"
+
+.in +1c
+.ti -1c
+.RI "CvCapture * \fBcapture\fP"
+.br
+.ti -1c
+.RI "QTimer * \fBframetimer\fP"
+.br
+.ti -1c
+.RI "QImage * \fBnextFrame\fP"
+.br
+.ti -1c
+.RI "QLabel * \fBcanvas\fP"
+.br
+.ti -1c
+.RI "QVBoxLayout * \fBlayout\fP"
+.br
+.ti -1c
+.RI "QPushButton * \fBtrigger\fP"
+.br
+.ti -1c
+.RI "bool \fBtrigger_active\fP"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+Definition at line 29 of file qopencamwidget.h.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "QOpenCamWidget::QOpenCamWidget (QWidget * parent = \fC0\fP)"
+.PP
+Consctructs a QWidget based widget for displaying video coming from an OpenCV capture source.
+.PP
+Including webcam data in a Qt application can be problematic, at least as long as Phonon does not support webcams, and the Phonon GStreamer backend only supports simple pipelines.
+.PP
+This class solves the complexity of adding a webcam view, by using the cross-platform available OpenCV library.
+.PP
+Limitations, i.e. reasons to read this code and reimplement, are: saving or streaming video is not really available (unless you do repeated timer-triggered connections to the startSnap slot), the widget size is identical to the video source dimensions (it resizes the wodget using setMinimuSize to the video dimensions, and does not handle resizing to sizes above this dimension.
+.PP
+A brief summary of how to use this class:
+.PP
+.nf
+ QOpenCamWidget *cw = new QOpenCamWidget(this);
+ if ( cw->grabCapture(-1) ) {
+ cw->setSnapshotVisible(true);
+ cw->startCapture();
+ }
+ connect( cw, SIGNAL(imageReady(QImage)), this, SLOT(saveImage(QImage)));
+
+.fi
+.PP
+.PP
+\fBParameters:\fP
+.RS 4
+\fI*parent\fP The parent widget containing this widget, defaults to NULL.
+.RE
+.PP
+
+.PP
+Definition at line 60 of file qopencamwidget.cpp.
+.PP
+References canvas, frametimer, layout, nextFrame, trigger, and trigger_active.
+.SS "QOpenCamWidget::~QOpenCamWidget (void)"
+.PP
+Definition at line 88 of file qopencamwidget.cpp.
+.PP
+References canvas, capture, and trigger.
+.SH "Member Function Documentation"
+.PP
+.SS "void QOpenCamWidget::paintEvent (QPaintEvent * event)"
+.PP
+A paint event is a request to repaint all or part of a widget.
+.PP
+It can happen for one of the following reasons:
+.PP
+.PD 0
+.IP "\(bu" 2
+repaint() or update() was invoked,
+.IP "\(bu" 2
+the widget was obscured and has now been uncovered, or
+.IP "\(bu" 2
+many other reasons.
+.PP
+\fBQOpenCamWidget\fP uses the paintEvent to draw each frame onto the screen. The paintEvent itself is regularily triggered by explicit update() calls in \fBQOpenCamWidget::grabFrame()\fP.
+.PP
+Definition at line 144 of file qopencamwidget.cpp.
+.PP
+References canvas, and nextFrame.
+.SS "void QOpenCamWidget::setSnapshotVisible (bool visible)"
+.PP
+Changes the visibility of the optional built-in 'Take snapshot' button.
+.PP
+The widget contains a push-button that optionally can be displayed. When visible, this button is located at the bottom of the widget, and causes the SLOT \fBQOpenCamWidget::startSnap\fP to be triggered when clicked.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIvisible\fP True makes the button display, and trigger, false turns the feature off. False, i.e. no button, is default.
+.RE
+.PP
+
+.PP
+Definition at line 110 of file qopencamwidget.cpp.
+.PP
+References layout, startSnap(), trigger, and trigger_active.
+.PP
+Referenced by View::View().
+.SS "bool QOpenCamWidget::grabCapture (int source)"
+.PP
+Grabs an OpenCV video capture source.
+.PP
+By grabbing a source, it is meant to open the capture source, and have it ready to start streaming/capturing frames. Returns true on success, false on error. The grabCapture is separated from the constructor and/or frame-grabbing, so that you may do the error-checking you really should do before proceeding.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIsource\fP The OpenCV capture source enumeration index to open
+.RE
+.PP
+
+.PP
+Definition at line 183 of file qopencamwidget.cpp.
+.PP
+References canvas, and capture.
+.PP
+Referenced by View::View().
+.SS "void QOpenCamWidget::startCapture (void)"
+.PP
+Starts up grabbing of video frames.
+.PP
+The actual grabbing and displaying of video frames is performed by a QTimer triggering the SLOT \fBQOpenCamWidget::grabFrame()\fP. \fBstartCapture()\fP sets up the timer running this captureFrame loop.
+.PP
+The SLOT \fBQOpenCamWidget::startSnap()\fP is used to get image frames out from the widget for other uses, like saving or processing. This function relies on the timer created and configured by \fBstartCapture()\fP, and as such, this function is the only permitted way to start the actual capture/streaming of video from the source.
+.PP
+Definition at line 217 of file qopencamwidget.cpp.
+.PP
+References frametimer, grabFrame(), and trigger.
+.PP
+Referenced by View::View().
+.SS "QImage * QOpenCamWidget::Ipl2QImage (const IplImage * img)"
+.PP
+Converts from the OpenCV IplImage data structure to a QImage.
+.PP
+OpenCV uses a data strcuture calles IplImage, optimized for computer vision image processing tasks. This code was adapted from kcamwidget.cpp, part of the KDE SVN at playground/multimedia/kcam/kcamwidget.cpp
+.PP
+In regard that the IplImage can be forced into a format that aligns well with a RBG888-format, the conversion becomes one of the shortes, simples IplImage->QImage I've seen.
+.PP
+\fBParameters:\fP
+.RS 4
+\fI*img\fP The IplImage to be converted to a QImage.
+.RE
+.PP
+
+.PP
+Definition at line 241 of file qopencamwidget.cpp.
+.PP
+Referenced by grabFrame().
+.SS "void QOpenCamWidget::grabFrame (void)\fC [slot]\fP"
+.PP
+Grabs a frame and causes an update() when triggered.
+.PP
+This is the SLOT that actually reads the video source and causes the widget to display live video. Preferably this slot will never be called my any other signal that a timeout() on the frametimer, which is controlled by \fBQOpenCamWidget::startCapture()\fP
+.PP
+Definition at line 266 of file qopencamwidget.cpp.
+.PP
+References capture, Ipl2QImage(), and nextFrame.
+.PP
+Referenced by startCapture().
+.SS "void QOpenCamWidget::startSnap (void)\fC [slot]\fP"
+.PP
+Trigger this slot to save a frame from the widget.
+.PP
+When this slot is triggered, the widgets capture loop is temporarily stopped, and the last displayed frame is 'captured', and made available through the emitting of the class imageReady SIGNAL.
+.PP
+With the 'Take snapshot' button visible (setSnapshotVisible(true)), this SLOT is triggered when the user clicks on the trigger button. If you do not wish to use the internal trigger button, you will have to add a different mechanism to trigger this SLOT.
+.PP
+It is possible, though I would not recommend, to use repeated triggering of this slot to do repeated frame-capture, and thus make a form of 'Animation' or 'Video' capture.
+.PP
+Definition at line 306 of file qopencamwidget.cpp.
+.PP
+References frametimer, imageReady(), and nextFrame.
+.PP
+Referenced by setSnapshotVisible().
+.SS "void QOpenCamWidget::imageReady (QImage snapshot)\fC [signal]\fP"
+.PP
+Referenced by startSnap().
+.SH "Member Data Documentation"
+.PP
+.SS "CvCapture* \fBQOpenCamWidget::capture\fP\fC [private]\fP"
+.PP
+Definition at line 35 of file qopencamwidget.h.
+.PP
+Referenced by grabCapture(), grabFrame(), and ~QOpenCamWidget().
+.SS "QTimer* \fBQOpenCamWidget::frametimer\fP\fC [private]\fP"
+.PP
+Definition at line 36 of file qopencamwidget.h.
+.PP
+Referenced by QOpenCamWidget(), startCapture(), and startSnap().
+.SS "QImage* \fBQOpenCamWidget::nextFrame\fP\fC [private]\fP"
+.PP
+Definition at line 37 of file qopencamwidget.h.
+.PP
+Referenced by grabFrame(), paintEvent(), QOpenCamWidget(), and startSnap().
+.SS "QLabel* \fBQOpenCamWidget::canvas\fP\fC [private]\fP"
+.PP
+Definition at line 39 of file qopencamwidget.h.
+.PP
+Referenced by grabCapture(), paintEvent(), QOpenCamWidget(), and ~QOpenCamWidget().
+.SS "QVBoxLayout* \fBQOpenCamWidget::layout\fP\fC [private]\fP"
+.PP
+Definition at line 40 of file qopencamwidget.h.
+.PP
+Referenced by QOpenCamWidget(), and setSnapshotVisible().
+.SS "QPushButton* \fBQOpenCamWidget::trigger\fP\fC [private]\fP"
+.PP
+Definition at line 41 of file qopencamwidget.h.
+.PP
+Referenced by QOpenCamWidget(), setSnapshotVisible(), startCapture(), and ~QOpenCamWidget().
+.SS "bool \fBQOpenCamWidget::trigger_active\fP\fC [private]\fP"
+.PP
+Definition at line 42 of file qopencamwidget.h.
+.PP
+Referenced by QOpenCamWidget(), and setSnapshotVisible().
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+.TH "View" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+View \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <view.h>\fP
+.PP
+.SS "Public Slots"
+
+.in +1c
+.ti -1c
+.RI "void \fBsaveImage\fP (QImage image)"
+.br
+.in -1c
+.SS "Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "\fBView\fP (QWidget *parent=0)"
+.br
+.ti -1c
+.RI "\fB~View\fP (void)"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+Definition at line 5 of file view.h.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "View::View (QWidget * parent = \fC0\fP)"
+.PP
+Definition at line 32 of file view.cpp.
+.PP
+References QOpenCamWidget::grabCapture(), saveImage(), QOpenCamWidget::setSnapshotVisible(), and QOpenCamWidget::startCapture().
+.SS "View::~View (void)"
+.PP
+Definition at line 74 of file view.cpp.
+.SH "Member Function Documentation"
+.PP
+.SS "void View::saveImage (QImage image)\fC [slot]\fP"
+.PP
+Definition at line 78 of file view.cpp.
+.PP
+Referenced by View().
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+.TH "main.cpp" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+main.cpp \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <QtGui/QApplication>\fP
+.br
+\fC#include 'view.h'\fP
+.br
+
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "int \fBmain\fP (int argc, char *argv[])"
+.br
+.in -1c
+.SH "Function Documentation"
+.PP
+.SS "int main (int argc, char * argv[])"
+.PP
+Definition at line 28 of file main.cpp.
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+.TH "qopencamwidget.cpp" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+qopencamwidget.cpp \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include 'qopencamwidget.h'\fP
+.br
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+.TH "qopencamwidget.h" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+qopencamwidget.h \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <QtGui>\fP
+.br
+\fC#include <opencv/cv.h>\fP
+.br
+\fC#include <opencv/highgui.h>\fP
+.br
+
+.SS "Classes"
+
+.in +1c
+.ti -1c
+.RI "class \fBQOpenCamWidget\fP"
+.br
+.in -1c
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+.TH "view.cpp" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+view.cpp \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include 'view.h'\fP
+.br
+\fC#include 'qopencamwidget.h'\fP
+.br
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+.TH "view.h" 3 "11 Jun 2009" "QOpenCamWidget" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+view.h \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <QtGui>\fP
+.br
+
+.SS "Classes"
+
+.in +1c
+.ti -1c
+.RI "class \fBView\fP"
+.br
+.in -1c
+.SH "Author"
+.PP
+Generated automatically by Doxygen for QOpenCamWidget from the source code.
--- /dev/null
+{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033
+{\comment Begining font list}
+{\fonttbl {\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}
+{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}
+}
+{\comment begin colors}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
+{\comment Beginning style list}
+{\stylesheet
+{\widctlpar\adjustright \fs20\cgrid \snext0 Normal;}
+{\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid \sbasedon0 \snext0 heading 1;}
+{\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid \sbasedon0 \snext0 heading 2;}
+{\s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid \sbasedon0 \snext0 heading 3;}
+{\s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid \sbasedon0 \snext0 heading 4;}{\*\cs10 \additive Default Paragraph Font;}
+{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid \sbasedon0 \snext0 heading 5;}{\*\cs10 \additive Default Paragraph Font;}
+{\s15\qc\sb240\sa60\widctlpar\outlinelevel0\adjustright \b\f1\fs32\kerning28\cgrid \sbasedon0 \snext15 Title;}
+{\s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid \sbasedon0 \snext16 Subtitle;}
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid \sbasedon0 \snext17 BodyText;}
+{\s18\widctlpar\fs22\cgrid \sbasedon0 \snext18 DenseText;}
+{\s28\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext28 header;}
+{\s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid \sbasedon0 \snext29 footer;}
+{\s30\li360\sa60\sb120\keepn\widctlpar\adjustright \b\f1\fs20\cgrid \sbasedon0 \snext30 GroupHeader;}
+{\s40\li0\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext41 Code Example 0;}
+{\s41\li360\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext42 Code Example 1;}
+{\s42\li720\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext43 Code Example 2;}
+{\s43\li1080\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext44 Code Example 3;}
+{\s44\li1440\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext45 Code Example 4;}
+{\s45\li1800\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext46 Code Example 5;}
+{\s46\li2160\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext47 Code Example 6;}
+{\s47\li2520\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext48 Code Example 7;}
+{\s48\li2880\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext49 Code Example 8;}
+{\s49\li3240\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid \sbasedon0 \snext49 Code Example 9;}
+{\s50\li0\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext51 List Continue 0;}
+{\s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext52 List Continue 1;}
+{\s52\li720\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext53 List Continue 2;}
+{\s53\li1080\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext54 List Continue 3;}
+{\s54\li1440\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext55 List Continue 4;}
+{\s55\li1800\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext56 List Continue 5;}
+{\s56\li2160\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext57 List Continue 6;}
+{\s57\li2520\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext58 List Continue 7;}
+{\s58\li2880\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext59 List Continue 8;}
+{\s59\li3240\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid \sbasedon0 \snext59 List Continue 9;}
+{\s60\li0\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext61 DescContinue 0;}
+{\s61\li360\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext62 DescContinue 1;}
+{\s62\li720\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext63 DescContinue 2;}
+{\s63\li1080\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext64 DescContinue 3;}
+{\s64\li1440\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext65 DescContinue 4;}
+{\s65\li1800\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext66 DescContinue 5;}
+{\s66\li2160\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext67 DescContinue 6;}
+{\s67\li2520\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext68 DescContinue 7;}
+{\s68\li2880\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext69 DescContinue 8;}
+{\s69\li3240\widctlpar\ql\adjustright \fs20\cgrid \sbasedon0 \snext69 DescContinue 9;}
+{\s70\li0\sa30\sb30\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext81 LatexTOC 0;}
+{\s71\li360\sa27\sb27\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext82 LatexTOC 1;}
+{\s72\li720\sa24\sb24\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext83 LatexTOC 2;}
+{\s73\li1080\sa21\sb21\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext84 LatexTOC 3;}
+{\s74\li1440\sa18\sb18\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext85 LatexTOC 4;}
+{\s75\li1800\sa15\sb15\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext86 LatexTOC 5;}
+{\s76\li2160\sa12\sb12\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext87 LatexTOC 6;}
+{\s77\li2520\sa9\sb9\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext88 LatexTOC 7;}
+{\s78\li2880\sa6\sb6\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext89 LatexTOC 8;}
+{\s79\li3240\sa3\sb3\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid \sbasedon0 \snext89 LatexTOC 9;}
+{\s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid \sbasedon0 \snext81 \sautoupd List Bullet 0;}
+{\s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid \sbasedon0 \snext82 \sautoupd List Bullet 1;}
+{\s82\fi-360\li1080\widctlpar\jclisttab\tx1080{\*\pn \pnlvlbody\ilvl0\ls3\pnrnot0\pndec }\ls3\adjustright \fs20\cgrid \sbasedon0 \snext83 \sautoupd List Bullet 2;}
+{\s83\fi-360\li1440\widctlpar\jclisttab\tx1440{\*\pn \pnlvlbody\ilvl0\ls4\pnrnot0\pndec }\ls4\adjustright \fs20\cgrid \sbasedon0 \snext84 \sautoupd List Bullet 3;}
+{\s84\fi-360\li1800\widctlpar\jclisttab\tx1800{\*\pn \pnlvlbody\ilvl0\ls5\pnrnot0\pndec }\ls5\adjustright \fs20\cgrid \sbasedon0 \snext85 \sautoupd List Bullet 4;}
+{\s85\fi-360\li2160\widctlpar\jclisttab\tx2160{\*\pn \pnlvlbody\ilvl0\ls6\pnrnot0\pndec }\ls6\adjustright \fs20\cgrid \sbasedon0 \snext86 \sautoupd List Bullet 5;}
+{\s86\fi-360\li2520\widctlpar\jclisttab\tx2520{\*\pn \pnlvlbody\ilvl0\ls7\pnrnot0\pndec }\ls7\adjustright \fs20\cgrid \sbasedon0 \snext87 \sautoupd List Bullet 6;}
+{\s87\fi-360\li2880\widctlpar\jclisttab\tx2880{\*\pn \pnlvlbody\ilvl0\ls8\pnrnot0\pndec }\ls8\adjustright \fs20\cgrid \sbasedon0 \snext88 \sautoupd List Bullet 7;}
+{\s88\fi-360\li3240\widctlpar\jclisttab\tx3240{\*\pn \pnlvlbody\ilvl0\ls9\pnrnot0\pndec }\ls9\adjustright \fs20\cgrid \sbasedon0 \snext89 \sautoupd List Bullet 8;}
+{\s89\fi-360\li3600\widctlpar\jclisttab\tx3600{\*\pn \pnlvlbody\ilvl0\ls10\pnrnot0\pndec }\ls10\adjustright \fs20\cgrid \sbasedon0 \snext89 \sautoupd List Bullet 9;}
+{\s90\fi-360\li360\widctlpar\fs20\cgrid \sbasedon0 \snext91 \sautoupd List Enum 0;}
+{\s91\fi-360\li720\widctlpar\fs20\cgrid \sbasedon0 \snext92 \sautoupd List Enum 1;}
+{\s92\fi-360\li1080\widctlpar\fs20\cgrid \sbasedon0 \snext93 \sautoupd List Enum 2;}
+{\s93\fi-360\li1440\widctlpar\fs20\cgrid \sbasedon0 \snext94 \sautoupd List Enum 3;}
+{\s94\fi-360\li1800\widctlpar\fs20\cgrid \sbasedon0 \snext95 \sautoupd List Enum 4;}
+{\s95\fi-360\li2160\widctlpar\fs20\cgrid \sbasedon0 \snext96 \sautoupd List Enum 5;}
+{\s96\fi-360\li2520\widctlpar\fs20\cgrid \sbasedon0 \snext96 \sautoupd List Enum 5;}
+{\s97\fi-360\li2880\widctlpar\fs20\cgrid \sbasedon0 \snext98 \sautoupd List Enum 7;}
+{\s98\fi-360\li3240\widctlpar\fs20\cgrid \sbasedon0 \snext99 \sautoupd List Enum 8;}
+{\s99\fi-360\li3600\widctlpar\fs20\cgrid \sbasedon0 \snext99 \sautoupd List Enum 9;}
+}
+{\comment begin body}
+{\info
+{\title {\comment QOpenCamWidget }QOpenCamWidget}
+{\comment Generated byDoxgyen. }
+{\creatim \yr2009\mo6\dy11\hr1\min49\sec57}
+}{\comment end of infoblock}
+\pard\plain
+\sectd\pgnlcrm
+{\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}}
+{\comment begin title page}
+\pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid
+\vertalc\qc\par\par\par\par\par\par\par
+\pard\plain \s15\qc\sb240\sa60\widctlpar\outlinelevel0\adjustright \b\f1\fs32\kerning28\cgrid
+{\field\fldedit {\*\fldinst TITLE \\*MERGEFORMAT}{\fldrslt TITLE}}\par
+\pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid
+\par
+\par\par\par\par\par\par\par\par\par\par\par\par
+\pard\plain \s16\qc\sa60\widctlpar\outlinelevel1\adjustright \f1\cgrid
+{\field\fldedit {\*\fldinst AUTHOR \\*MERGEFORMAT}{\fldrslt AUTHOR}}\par
+Version \par{\field\fldedit {\*\fldinst CREATEDATE \\*MERGEFORMAT}{\fldrslt CREATEDATE}}\par
+\page\page{\comment End title page}
+{\comment Table of contents}
+\vertalt
+\pard\plain
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Table of Contents\par
+\pard\plain \par
+{\field\fldedit {\*\fldinst TOC \\f \\*MERGEFORMAT}{\fldrslt Table of contents}}\par
+\pard\plain
+{\comment Beginning Body of RTF Document}
+\sect \sbkpage \pgndec \pgnrestart
+\sect \sectd \sbknone
+{\footer \s29\widctlpar\tqc\tx4320\tqr\tx8640\qr\adjustright \fs20\cgrid {\chpgn}}
+
+{\comment BeginRTFChapter}
+\pard\plain \sect\sbkpage
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid
+Class Index\par \pard\plain
+{\tc \v Class Index}
+{\comment begin include annotated.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+Class List{\comment endTitleHead}
+\par \pard\plain
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid Here are the classes, structs, unions and interfaces with brief descriptions:{\comment endTextBlock}
+}
+{\comment (startIndexList)}
+{
+\par
+\pard\plain \s71\li360\sa27\sb27\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid
+{\comment (startIndexKey)}
+{\b {\b QOpenCamWidget}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAG \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (startIndexKey)}
+{\b {\b View}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAH \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (endIndexList)}
+\par}{\comment endFile}
+{\comment end include annotated.rtf}
+
+{\comment BeginRTFChapter}
+\pard\plain \sect\sbkpage
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid
+File Index\par \pard\plain
+{\tc \v File Index}
+{\comment begin include files.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+File List{\comment endTitleHead}
+\par \pard\plain
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid Here is a list of all files with brief descriptions:{\comment endTextBlock}
+}
+{\comment (startIndexList)}
+{
+\par
+\pard\plain \s71\li360\sa27\sb27\widctlpar\tqr\tldot\tx8640\adjustright \fs20\cgrid
+{\comment (startIndexKey)}
+{\b {\b main.cpp}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAA \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (startIndexKey)}
+{\b {\b qopencamwidget.cpp}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAC \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (startIndexKey)}
+{\b {\b qopencamwidget.h}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAD \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (startIndexKey)}
+{\b {\b view.cpp}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAE \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (startIndexKey)}
+{\b {\b view.h}{\comment (endIndexKey)}
+{\comment (startIndexValue)}
+ {\comment (endIndexValue)}
+} \tab {\field\fldedit {\*\fldinst PAGEREF AAAAAAAAAF \\*MERGEFORMAT}{\fldrslt pagenum}}
+{\comment (newParagraph)}
+\par
+{\comment (endIndexList)}
+\par}{\comment endFile}
+{\comment end include files.rtf}
+
+{\comment BeginRTFChapter}
+\pard\plain \sect\sbkpage
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid
+Class Documentation{\tc \v Class Documentation}
+\par \pard\plain
+{\comment begin include classQOpenCamWidget.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+QOpenCamWidget Class Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v QOpenCamWidget}
+{\xe \v QOpenCamWidget}
+{\comment writeAnchor (classQOpenCamWidget)}
+{\bkmkstart AAAAAAAAAG}
+{\bkmkend AAAAAAAAAG}
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\f2 #include <qopencamwidget.h>}{\comment (newParagraph)}
+\par
+{\comment (newParagraph)}
+\par
+{\comment endTextBlock}
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Public Slots{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b grabFrame} (void){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Grabs a frame and causes an update() when triggered. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b startSnap} (){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Trigger this slot to save a frame from the widget. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment (endMemberList) }
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Signals{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b imageReady} (QImage snapshot){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Public Member Functions{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+{\b QOpenCamWidget} (QWidget *parent=0){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Consctructs a QWidget based widget for displaying video coming from an OpenCV capture source. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+{\b ~QOpenCamWidget} (void){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b paintEvent} (QPaintEvent *event){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+A paint event is a request to repaint all or part of a widget. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b setSnapshotVisible} (bool visible){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Changes the visibility of the optional built-in "Take snapshot" button. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+bool {\b grabCapture} (int source){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Grabs an OpenCV video capture source. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b startCapture} (void){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Starts up grabbing of video frames. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+QImage * {\b Ipl2QImage} (const IplImage *img){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (startMemberDescription)}
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid {\i {\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Converts from the OpenCV IplImage data structure to a QImage. \par
+}{\comment (endMemberDescription)}
+}}
+{\comment (endMemberList) }
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Private Attributes{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+CvCapture * {\b capture}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+QTimer * {\b frametimer}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+QImage * {\b nextFrame}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+QLabel * {\b canvas}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+QVBoxLayout * {\b layout}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+QPushButton * {\b trigger}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+bool {\b trigger_active}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Detailed Description{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\comment startParagraph}
+{
+Definition at line 29 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment endTextBlock}
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Constructor & Destructor Documentation{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v QOpenCamWidget\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:QOpenCamWidget}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QOpenCamWidget::QOpenCamWidget ({\comment (startParameterList)}
+QWidget * {\i parent} = {\f2 0}){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAI}
+{\bkmkend AAAAAAAAAI}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Consctructs a QWidget based widget for displaying video coming from an OpenCV capture source. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Including webcam data in a Qt application can be problematic, at least as long as Phonon does not support webcams, and the Phonon GStreamer backend only supports simple pipelines.\par
+This class solves the complexity of adding a webcam view, by using the cross-platform available OpenCV library.\par
+Limitations, i.e. reasons to read this code and reimplement, are: saving or streaming video is not really available (unless you do repeated timer-triggered connections to the startSnap slot), the widget size is identical to the video source dimensions (it resizes the wodget using setMinimuSize to the video dimensions, and does not handle resizing to sizes above this dimension.\par
+A brief summary of how to use this class: {
+\par
+\pard\plain \s41\li360\widctlpar\adjustright \shading1000\cbpat8 \f2\fs16\cgrid QOpenCamWidget *cw = new QOpenCamWidget(this);{\comment (lineBreak)}
+\par
+ if ( cw->grabCapture(-1) ) \{{\comment (lineBreak)}
+\par
+ cw->setSnapshotVisible(true);{\comment (lineBreak)}
+\par
+ cw->startCapture();{\comment (lineBreak)}
+\par
+ \}{\comment (lineBreak)}
+\par
+ connect( cw, SIGNAL(imageReady(QImage)), this, SLOT(saveImage(QImage)));{\comment (lineBreak)}
+\par
+}
+\par
+{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
+Parameters:\par}
+\pard\plain \s62\li720\widctlpar\ql\adjustright \fs20\cgrid {\i *parent} The parent widget containing this widget, defaults to NULL. \par
+}
+}{\comment startParagraph}
+{
+Definition at line 60 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References canvas, frametimer, layout, nextFrame, trigger, and trigger_active.{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v ~QOpenCamWidget\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:~QOpenCamWidget}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QOpenCamWidget::~QOpenCamWidget ({\comment (startParameterList)}
+void){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAJ}
+{\bkmkend AAAAAAAAAJ}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 88 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References canvas, capture, and trigger.{\comment endParagraph}
+}\par
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Member Function Documentation{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v paintEvent\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:paintEvent}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void QOpenCamWidget::paintEvent ({\comment (startParameterList)}
+QPaintEvent * {\i event}){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAK}
+{\bkmkend AAAAAAAAAK}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+A paint event is a request to repaint all or part of a widget. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+It can happen for one of the following reasons:\par
+{
+\par\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+repaint() or update() was invoked, \par\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+the widget was obscured and has now been uncovered, or \par\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+many other reasons.\par
+}
+{\b QOpenCamWidget} uses the paintEvent to draw each frame onto the screen. The paintEvent itself is regularily triggered by explicit update() calls in {\b QOpenCamWidget::grabFrame()}. \par
+}{\comment startParagraph}
+{
+Definition at line 144 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References canvas, and nextFrame.{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v setSnapshotVisible\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:setSnapshotVisible}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void QOpenCamWidget::setSnapshotVisible ({\comment (startParameterList)}
+bool {\i visible}){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAL}
+{\bkmkend AAAAAAAAAL}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Changes the visibility of the optional built-in "Take snapshot" button. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+The widget contains a push-button that optionally can be displayed. When visible, this button is located at the bottom of the widget, and causes the SLOT {\b QOpenCamWidget::startSnap} to be triggered when clicked.\par
+{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
+Parameters:\par}
+\pard\plain \s62\li720\widctlpar\ql\adjustright \fs20\cgrid {\i visible} True makes the button display, and trigger, false turns the feature off. False, i.e. no button, is default. \par
+}
+}{\comment startParagraph}
+{
+Definition at line 110 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References layout, startSnap(), trigger, and trigger_active.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by View::View().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v grabCapture\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:grabCapture}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+bool QOpenCamWidget::grabCapture ({\comment (startParameterList)}
+int {\i source}){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAM}
+{\bkmkend AAAAAAAAAM}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Grabs an OpenCV video capture source. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+By grabbing a source, it is meant to open the capture source, and have it ready to start streaming/capturing frames. Returns true on success, false on error. The grabCapture is separated from the constructor and/or frame-grabbing, so that you may do the error-checking you really should do before proceeding.\par
+{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
+Parameters:\par}
+\pard\plain \s62\li720\widctlpar\ql\adjustright \fs20\cgrid {\i source} The OpenCV capture source enumeration index to open \par
+}
+}{\comment startParagraph}
+{
+Definition at line 183 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References canvas, and capture.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by View::View().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v startCapture\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:startCapture}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void QOpenCamWidget::startCapture ({\comment (startParameterList)}
+void){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAN}
+{\bkmkend AAAAAAAAAN}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Starts up grabbing of video frames. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+The actual grabbing and displaying of video frames is performed by a QTimer triggering the SLOT {\b QOpenCamWidget::grabFrame()}. {\b startCapture()} sets up the timer running this captureFrame loop.\par
+The SLOT {\b QOpenCamWidget::startSnap()} is used to get image frames out from the widget for other uses, like saving or processing. This function relies on the timer created and configured by {\b startCapture()}, and as such, this function is the only permitted way to start the actual capture/streaming of video from the source. \par
+}{\comment startParagraph}
+{
+Definition at line 217 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References frametimer, grabFrame(), and trigger.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by View::View().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v Ipl2QImage\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:Ipl2QImage}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QImage * QOpenCamWidget::Ipl2QImage ({\comment (startParameterList)}
+const IplImage * {\i img}){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAO}
+{\bkmkend AAAAAAAAAO}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Converts from the OpenCV IplImage data structure to a QImage. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+OpenCV uses a data strcuture calles IplImage, optimized for computer vision image processing tasks. This code was adapted from kcamwidget.cpp, part of the KDE SVN at playground/multimedia/kcam/kcamwidget.cpp\par
+In regard that the IplImage can be forced into a format that aligns well with a RBG888-format, the conversion becomes one of the shortes, simples IplImage->QImage I've seen.\par
+{{\s5\sb90\sa30\keepn\widctlpar\adjustright \b\f1\fs20\cgrid
+Parameters:\par}
+\pard\plain \s62\li720\widctlpar\ql\adjustright \fs20\cgrid {\i *img} The IplImage to be converted to a QImage. \par
+}
+}{\comment startParagraph}
+{
+Definition at line 241 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by grabFrame().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v grabFrame\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:grabFrame}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void QOpenCamWidget::grabFrame ({\comment (startParameterList)}
+void){\f2 [slot]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAP}
+{\bkmkend AAAAAAAAAP}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Grabs a frame and causes an update() when triggered. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+This is the SLOT that actually reads the video source and causes the widget to display live video. Preferably this slot will never be called my any other signal that a timeout() on the frametimer, which is controlled by {\b QOpenCamWidget::startCapture()} \par
+}{\comment startParagraph}
+{
+Definition at line 266 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References capture, Ipl2QImage(), and nextFrame.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by startCapture().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v startSnap\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:startSnap}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void QOpenCamWidget::startSnap ({\comment (startParameterList)}
+void){\f2 [slot]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAQ}
+{\bkmkend AAAAAAAAAQ}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+Trigger this slot to save a frame from the widget. \par
+}{\s17\sa60\sb30\widctlpar\qj \fs22\cgrid
+When this slot is triggered, the widgets capture loop is temporarily stopped, and the last displayed frame is "captured", and made available through the emitting of the class imageReady SIGNAL.\par
+With the "Take snapshot" button visible (setSnapshotVisible(true)), this SLOT is triggered when the user clicks on the trigger button. If you do not wish to use the internal trigger button, you will have to add a different mechanism to trigger this SLOT.\par
+It is possible, though I would not recommend, to use repeated triggering of this slot to do repeated frame-capture, and thus make a form of "Animation" or "Video" capture. \par
+}{\comment startParagraph}
+{
+Definition at line 306 of file qopencamwidget.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References frametimer, imageReady(), and nextFrame.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by setSnapshotVisible().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v imageReady\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:imageReady}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void QOpenCamWidget::imageReady ({\comment (startParameterList)}
+QImage {\i snapshot}){\f2 [signal]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAR}
+{\bkmkend AAAAAAAAAR}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Referenced by startSnap().{\comment endParagraph}
+}\par
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Member Data Documentation{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v capture\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:capture}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+CvCapture* {\b QOpenCamWidget::capture}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAS}
+{\bkmkend AAAAAAAAAS}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 35 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by grabCapture(), grabFrame(), and ~QOpenCamWidget().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v frametimer\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:frametimer}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QTimer* {\b QOpenCamWidget::frametimer}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAT}
+{\bkmkend AAAAAAAAAT}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 36 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by QOpenCamWidget(), startCapture(), and startSnap().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v nextFrame\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:nextFrame}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QImage* {\b QOpenCamWidget::nextFrame}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAU}
+{\bkmkend AAAAAAAAAU}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 37 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by grabFrame(), paintEvent(), QOpenCamWidget(), and startSnap().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v canvas\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:canvas}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QLabel* {\b QOpenCamWidget::canvas}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAV}
+{\bkmkend AAAAAAAAAV}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 39 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by grabCapture(), paintEvent(), QOpenCamWidget(), and ~QOpenCamWidget().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v layout\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:layout}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QVBoxLayout* {\b QOpenCamWidget::layout}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAW}
+{\bkmkend AAAAAAAAAW}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 40 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by QOpenCamWidget(), and setSnapshotVisible().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v trigger\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:trigger}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+QPushButton* {\b QOpenCamWidget::trigger}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAX}
+{\bkmkend AAAAAAAAAX}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 41 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by QOpenCamWidget(), setSnapshotVisible(), startCapture(), and ~QOpenCamWidget().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v trigger_active\:QOpenCamWidget}
+{\xe \v QOpenCamWidget\:trigger_active}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+bool {\b QOpenCamWidget::trigger_active}{\f2 [private]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAY}
+{\bkmkend AAAAAAAAAY}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 42 of file qopencamwidget.h.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by QOpenCamWidget(), and setSnapshotVisible().{\comment endParagraph}
+}\par
+}
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+The documentation for this class was generated from the following files:{\comment (startItemList level=0) }
+{{\comment (writeListItem)}
+{\comment (newParagraph)}
+\par
+\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+{\b qopencamwidget.h}{\comment (writeListItem)}
+{\comment (newParagraph)}
+\par
+\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+{\b qopencamwidget.cpp}{\comment (newParagraph)}
+\par
+{\comment (endItemList level=1)}
+}{\comment endTextBlock}
+}
+{\comment endFile}
+{\comment end include classQOpenCamWidget.rtf}
+\par \pard\plain
+
+{\comment BeginRTFSection}
+\pard\plain \sect\sbkpage
+\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+{\comment begin include classView.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+View Class Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v View}
+{\xe \v View}
+{\comment writeAnchor (classView)}
+{\bkmkstart AAAAAAAAAH}
+{\bkmkend AAAAAAAAAH}
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\f2 #include <view.h>}{\comment (newParagraph)}
+\par
+{\comment (newParagraph)}
+\par
+{\comment endTextBlock}
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Public Slots{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+void {\b saveImage} (QImage image){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Public Member Functions{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+{\b View} (QWidget *parent=0){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+{\b ~View} (void){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Detailed Description{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\comment startParagraph}
+{
+Definition at line 5 of file view.h.{\comment endParagraph}
+}\par
+{\comment endTextBlock}
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Constructor & Destructor Documentation{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v View\:View}
+{\xe \v View\:View}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+View::View ({\comment (startParameterList)}
+QWidget * {\i parent} = {\f2 0}){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAZ}
+{\bkmkend AAAAAAAAAZ}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 32 of file view.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+References QOpenCamWidget::grabCapture(), saveImage(), QOpenCamWidget::setSnapshotVisible(), and QOpenCamWidget::startCapture().{\comment endParagraph}
+}\par
+}
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v ~View\:View}
+{\xe \v View\:~View}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+View::~View ({\comment (startParameterList)}
+void){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAABA}
+{\bkmkend AAAAAAAABA}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 74 of file view.cpp.{\comment endParagraph}
+}\par
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Member Function Documentation{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v saveImage\:View}
+{\xe \v View\:saveImage}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+void View::saveImage ({\comment (startParameterList)}
+QImage {\i image}){\f2 [slot]}{\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAABB}
+{\bkmkend AAAAAAAABB}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 78 of file view.cpp.{\comment endParagraph}
+}\par
+{\comment startParagraph}
+{
+Referenced by View().{\comment endParagraph}
+}\par
+}
+{\comment startTextBlock}
+{
+\pard\plain \s17\sa60\sb30\widctlpar\qj \fs22\cgrid {\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+The documentation for this class was generated from the following files:{\comment (startItemList level=0) }
+{{\comment (writeListItem)}
+{\comment (newParagraph)}
+\par
+\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+{\b view.h}{\comment (writeListItem)}
+{\comment (newParagraph)}
+\par
+\pard\plain \s81\fi-360\li720\widctlpar\jclisttab\tx720{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\ls2\adjustright \fs20\cgrid
+{\b view.cpp}{\comment (newParagraph)}
+\par
+{\comment (endItemList level=1)}
+}{\comment endTextBlock}
+}
+{\comment endFile}
+{\comment end include classView.rtf}
+
+{\comment BeginRTFChapter}
+\pard\plain \sect\sbkpage
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid
+File Documentation{\tc \v File Documentation}
+\par \pard\plain
+{\comment begin include main_8cpp.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+main.cpp File Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v main.cpp}
+{\xe \v main.cpp}
+{\comment writeAnchor (main_8cpp)}
+{\bkmkstart AAAAAAAAAA}
+{\bkmkend AAAAAAAAAA}
+{\comment startTextBlock}
+{
+\pard\plain \s18\widctlpar\fs22\cgrid {\f2 #include <QtGui/QApplication>}{\comment (lineBreak)}
+\par
+{\f2 #include "view.h"}{\comment (lineBreak)}
+\par
+{\comment endTextBlock}
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Functions{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+int {\b main} (int argc, char *argv[]){\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment (rtfwriteRuler_thin)}
+{\pard\widctlpar\brdrb\brdrs\brdrw5\brsp20 \adjustright \par}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Function Documentation{\comment endGroupHeader}
+\par
+\pard\plain
+{\comment startDoxyAnchor}
+{\comment startMemberDoc}
+{\xe \v main\:main.cpp}
+{\xe \v main.cpp\:main}
+\pard\plain \s4\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs20\cgrid {
+{\b
+int main ({\comment (startParameterList)}
+int {\i argc}, {\comment (startParameterList)}
+ char * {\i argv}[]){\comment endMemberDoc}
+}
+}{\comment (newParagraph)}
+\par
+{\comment endDoxyAnchor}
+{\bkmkstart AAAAAAAAAB}
+{\bkmkend AAAAAAAAAB}
+{\comment (startIndent) }
+{
+\pard\plain \s51\li360\sa60\sb30\qj\widctlpar\qj\adjustright \fs20\cgrid
+{\comment startParagraph}
+{\comment (newParagraph)}
+\par
+{
+Definition at line 28 of file main.cpp.{\comment endParagraph}
+}\par
+}
+{\comment endFile}
+{\comment end include main_8cpp.rtf}
+\par \pard\plain
+
+{\comment BeginRTFSection}
+\pard\plain \sect\sbkpage
+\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+{\comment begin include qopencamwidget_8cpp.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+qopencamwidget.cpp File Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v qopencamwidget.cpp}
+{\xe \v qopencamwidget.cpp}
+{\comment writeAnchor (qopencamwidget_8cpp)}
+{\bkmkstart AAAAAAAAAC}
+{\bkmkend AAAAAAAAAC}
+{\comment startTextBlock}
+{
+\pard\plain \s18\widctlpar\fs22\cgrid {\f2 #include "qopencamwidget.h"}{\comment (lineBreak)}
+\par
+{\comment endTextBlock}
+}
+{\comment endFile}
+{\comment end include qopencamwidget_8cpp.rtf}
+\par \pard\plain
+
+{\comment BeginRTFSection}
+\pard\plain \sect\sbkpage
+\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+{\comment begin include qopencamwidget_8h.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+qopencamwidget.h File Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v qopencamwidget.h}
+{\xe \v qopencamwidget.h}
+{\comment writeAnchor (qopencamwidget_8h)}
+{\bkmkstart AAAAAAAAAD}
+{\bkmkend AAAAAAAAAD}
+{\comment startTextBlock}
+{
+\pard\plain \s18\widctlpar\fs22\cgrid {\f2 #include <QtGui>}{\comment (lineBreak)}
+\par
+{\f2 #include <opencv/cv.h>}{\comment (lineBreak)}
+\par
+{\f2 #include <opencv/highgui.h>}{\comment (lineBreak)}
+\par
+{\comment endTextBlock}
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Classes{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+class {\b QOpenCamWidget}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment endFile}
+{\comment end include qopencamwidget_8h.rtf}
+\par \pard\plain
+
+{\comment BeginRTFSection}
+\pard\plain \sect\sbkpage
+\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+{\comment begin include view_8cpp.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+view.cpp File Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v view.cpp}
+{\xe \v view.cpp}
+{\comment writeAnchor (view_8cpp)}
+{\bkmkstart AAAAAAAAAE}
+{\bkmkend AAAAAAAAAE}
+{\comment startTextBlock}
+{
+\pard\plain \s18\widctlpar\fs22\cgrid {\f2 #include "view.h"}{\comment (lineBreak)}
+\par
+{\f2 #include "qopencamwidget.h"}{\comment (lineBreak)}
+\par
+{\comment endTextBlock}
+}
+{\comment endFile}
+{\comment end include view_8cpp.rtf}
+\par \pard\plain
+
+{\comment BeginRTFSection}
+\pard\plain \sect\sbkpage
+\s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+{\comment begin include view_8h.rtf}
+{\comment startTitleHead}
+\pard\plain \s2\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\kerning28\cgrid
+view.h File Reference{\comment endTitleHead}
+\par \pard\plain
+{\tc\tcl2 \v view.h}
+{\xe \v view.h}
+{\comment writeAnchor (view_8h)}
+{\bkmkstart AAAAAAAAAF}
+{\bkmkend AAAAAAAAAF}
+{\comment startTextBlock}
+{
+\pard\plain \s18\widctlpar\fs22\cgrid {\f2 #include <QtGui>}{\comment (lineBreak)}
+\par
+{\comment endTextBlock}
+}
+{\comment startGroupHeader}
+\pard\plain \s3\sb240\sa60\keepn\widctlpar\adjustright \b\f1\cgrid
+Classes{\comment endGroupHeader}
+\par
+\pard\plain
+
+{\comment (startMemberList) }
+{
+{\comment startMemberItem }
+\pard\plain \s80\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlbody\ilvl0\ls1\pnrnot0\pndec }\ls1\adjustright \fs20\cgrid
+class {\b View}{\comment endMemberItem }
+{\comment (newParagraph)}
+\par
+{\comment (endMemberList) }
+}
+{\comment endFile}
+{\comment end include view_8h.rtf}
+
+{\comment BeginRTFChapter}
+\pard\plain \sect\sbkpage
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid
+\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs36\kerning36\cgrid Index\par
+\pard\plain
+{\tc \v Index}
+{\field\fldedit {\*\fldinst INDEX \\c2 \\*MERGEFORMAT}{\fldrslt INDEX}}
+{\comment endFile}
+}
\ No newline at end of file
--- /dev/null
+/*
+ QOpenCamWidget demo application main code stup (main.c)
+ This file is part of a demonstration application, illustrating
+ how to use the QOpenCamWidget, a Qt 4 widget that displays
+ video input from a webcam, along with a snapshot button.
+
+ Copyright (C) 2009 Jon Langseth
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation in its version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <QtGui/QApplication>
+#include "view.h"
+
+// The contents of this file is simply a Qt Main app stub.
+int main (int argc, char*argv[])
+{
+ QApplication app(argc, argv);
+ app.setApplicationName("QOpenCamWidget testapp");
+ View v;
+ v.show();
+ return app.exec();
+}
+
--- /dev/null
+/*
+ * http://dridk.blogspot.com/2009/05/webcam-for-kde-new-way-for-gluon-games.html
+ * http://websvn.kde.org/trunk/playground/multimedia/kcam/kcamwidget.cpp?view=markup&pathrev=971995
+
+ * http://websvn.kde.org/trunk/playground/multimedia/kcam/kcamwidget.h?view=markup
+ * http://websvn.kde.org/trunk/playground/multimedia/kcam/kcam.cpp?view=markup
+ */
--- /dev/null
+TEMPLATE = app
+TARGET = qcv
+DEPENDPATH += .
+LIBS += -lcv -lhighgui
+
+SOURCES += main.cpp qopencamwidget.cpp view.cpp
+HEADERS += qopencamwidget.h view.h
+
+
--- /dev/null
+/*
+ This file is one part of two, that together make
+ QOpenCamWidget, a Qt 4 widget that displays video input
+ from a webcam, along with an optional snapshot button.
+
+ Copyright (C) 2009 Jon Langseth
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation in its version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "qopencamwidget.h"
+
+// ------------------------------------------------------------- //
+// Constructor and Destructor
+// ------------------------------------------------------------- //
+
+/*!
+ * \brief Consctructs a QWidget based widget for displaying video
+ * coming from an OpenCV capture source
+ *
+ * Including webcam data in a Qt application can be problematic,
+ * at least as long as Phonon does not support webcams, and the
+ * Phonon GStreamer backend only supports simple pipelines.
+ *
+ * This class solves the complexity of adding a webcam view,
+ * by using the cross-platform available OpenCV library.
+ *
+ * Limitations, i.e. reasons to read this code and reimplement,
+ * are: saving or streaming video is not really available (unless
+ * you do repeated timer-triggered connections to the startSnap slot),
+ * the widget size is identical to the video source dimensions (it
+ * resizes the wodget using setMinimuSize to the video dimensions,
+ * and does not handle resizing to sizes above this dimension.
+ *
+ * A brief summary of how to use this class:
+ * \code
+ * QOpenCamWidget *cw = new QOpenCamWidget(this);
+ * if ( cw->grabCapture(-1) ) {
+ * cw->setSnapshotVisible(true);
+ * cw->startCapture();
+ * }
+ * connect( cw, SIGNAL(imageReady(QImage)), this, SLOT(saveImage(QImage)));
+ * \endcode
+ *
+ * \param *parent The parent widget containing this widget, defaults to NULL.
+ *
+ **/
+QOpenCamWidget::QOpenCamWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ // private CvCapture *nextFrame from class definition
+ nextFrame = NULL;
+ // private QTimer *frametimer from class definition
+ frametimer = NULL;
+ // private QVBoxLayout *layout from class definition
+ layout = new QVBoxLayout(this);
+
+ // private QLabel *canvas from class definition
+ canvas = new QLabel(this);
+ canvas->setMinimumSize(200, 100);
+ canvas->setAlignment(Qt::AlignCenter);
+
+ // private QPushButton *trigger from class definition
+ trigger = new QPushButton(this);
+ trigger->setText("Take picture");
+ trigger->setEnabled(false);
+ trigger->hide();
+
+ // private bool trigger_active from class definition
+ trigger_active = false;
+
+ layout->addWidget(canvas);
+ this->setLayout(layout);
+}
+
+QOpenCamWidget::~QOpenCamWidget(void)
+{
+ cvReleaseCapture( &capture );
+ delete canvas;
+ delete trigger;
+}
+// ------------------------------------------------------------- //
+// Public methods (not signals/slots)
+// ------------------------------------------------------------- //
+
+/*!
+ * \brief Changes the visibility of the optional built-in "Take snapshot" button.
+ *
+ * The widget contains a push-button that optionally can be displayed. When
+ * visible, this button is located at the bottom of the widget, and causes
+ * the SLOT QOpenCamWidget::startSnap to be triggered when clicked.
+ *
+ * \param visible True makes the button display, and trigger,
+ * false turns the feature off. False, i.e. no button, is default.
+ *
+ **/
+void
+QOpenCamWidget::setSnapshotVisible(bool visible)
+{
+ // Checking both parameter and private "sanity" variable,
+ // as a sanity- and error-control
+ if ( visible && !trigger_active )
+ {
+ connect( trigger, SIGNAL(clicked()), this, SLOT(startSnap()));
+ layout->addWidget(trigger);
+ trigger->show();
+ trigger_active = true;
+ }
+ if ( !visible && trigger_active )
+ {
+ layout->removeWidget(trigger);
+ disconnect( trigger, SIGNAL(clicked()), 0, 0 );
+ trigger->hide();
+ trigger_active = false;
+ }
+}
+/*!
+ * \brief A paint event is a request to repaint all or part of a widget.
+ *
+ * It can happen for one of the following reasons:
+ *
+ * \li repaint() or update() was invoked,
+ * \li the widget was obscured and has now been uncovered, or
+ * \li many other reasons.
+ *
+ * QOpenCamWidget uses the paintEvent to draw each frame onto the screen.
+ * The paintEvent itself is regularily triggered by explicit update()
+ * calls in QOpenCamWidget::grabFrame().
+ *
+ **/
+void
+QOpenCamWidget::paintEvent ( QPaintEvent * event )
+{
+ QPainter * paint = new QPainter;
+ paint->begin(this);
+
+ if ( nextFrame )
+ {
+ // Using this objects painter to draw the image
+ // causes a cute, but not desired effect..
+ //paint->drawImage(event->rect(), *nextFrame);
+
+ // Until I find a better solution on how to do the
+ // redraw of the image, setPixmap on the canvas
+ // does do the job. This may cause a performance
+ // penalty though, and is considered a FIXME
+ // Another drawback is that the widget does not resize..
+ canvas->setPixmap( QPixmap::fromImage(*nextFrame) );
+ }
+ else
+ {
+ canvas->setText("No data, check/test camera");
+ }
+ paint->end();
+}
+
+
+/*!
+ * \brief Grabs an OpenCV video capture source
+ *
+ * By grabbing a source, it is meant to open the capture source,
+ * and have it ready to start streaming/capturing frames.
+ * Returns true on success, false on error. The grabCapture
+ * is separated from the constructor and/or frame-grabbing, so that you
+ * may do the error-checking you really should do before proceeding.
+ *
+ * \param source The OpenCV capture source enumeration index to open
+ *
+ **/
+bool
+QOpenCamWidget::grabCapture(int source)
+{
+ capture = cvCaptureFromCAM(0);
+ if (!capture)
+ {
+ qDebug() << "QOpenCamWidget::grabCapture(" << source << ") failed";
+ return false;
+ }
+ cvGrabFrame(capture); // Grab a single frame, do resizing based on it.
+ IplImage *image = cvRetrieveFrame(capture);
+ QSize t_size = QSize(image->width,image->height);
+
+ qDebug() << "Device image format: " << image->width << "x" << image->height;
+ canvas->setMinimumSize(t_size);
+ canvas->setMaximumSize(t_size);
+
+ return true;
+}
+
+/*!
+ * \brief Starts up grabbing of video frames
+ *
+ * The actual grabbing and displaying of video frames is performed by
+ * a QTimer triggering the SLOT QOpenCamWidget::grabFrame().
+ * startCapture() sets up the timer running this captureFrame loop.
+ *
+ * The SLOT QOpenCamWidget::startSnap() is used to get image frames
+ * out from the widget for other uses, like saving or processing.
+ * This function relies on the timer created and configured by
+ * startCapture(), and as such, this function is the only permitted
+ * way to start the actual capture/streaming of video from the source.
+ *
+ **/
+void
+QOpenCamWidget::startCapture(void)
+{
+ frametimer = new QTimer(this);
+ frametimer->start(70);
+ connect(frametimer,SIGNAL(timeout()), this,SLOT(grabFrame()));
+ trigger->setEnabled(true);
+}
+
+/*!
+ * \brief Converts from the OpenCV IplImage data structure to a QImage
+ *
+ * OpenCV uses a data strcuture calles IplImage, optimized for
+ * computer vision image processing tasks. This code was adapted
+ * from kcamwidget.cpp, part of the KDE SVN at
+ * playground/multimedia/kcam/kcamwidget.cpp
+ *
+ * In regard that the IplImage can be forced into a format
+ * that aligns well with a RBG888-format, the conversion
+ * becomes one of the shortes, simples IplImage->QImage I've seen.
+ *
+ * \param *img The IplImage to be converted to a QImage.
+ *
+ **/
+QImage*
+QOpenCamWidget::Ipl2QImage(const IplImage *img)
+{
+ IplImage *tmp=cvCloneImage(img);
+ cvConvertImage(img,tmp, CV_CVTIMG_SWAP_RB );
+ QImage * qimage = new QImage(reinterpret_cast<uchar*>(tmp->imageData),
+ tmp->width,
+ tmp->height,
+ 3* tmp->width,
+ QImage::Format_RGB888);
+ return qimage;
+
+}
+// ------------------------------------------------------------- //
+// Public SLOTS
+// ------------------------------------------------------------- //
+
+/*!
+ * \brief Grabs a frame and causes an update() when triggered.
+ *
+ * This is the SLOT that actually reads the video source and
+ * causes the widget to display live video. Preferably this
+ * slot will never be called my any other signal that a timeout()
+ * on the frametimer, which is controlled by QOpenCamWidget::startCapture()
+ *
+ **/
+void QOpenCamWidget::grabFrame(void)
+{
+ if ( !capture )
+ {
+ qDebug() << "Capture device not ready!";
+ return;
+ }
+
+ cvGrabFrame(capture);
+
+ IplImage *iplimage = cvRetrieveFrame(capture);
+
+ if (iplimage)
+ {
+ nextFrame = Ipl2QImage(iplimage);
+ }
+ else
+ {
+ nextFrame = NULL;
+ }
+ update();
+}
+
+/*!
+ * \brief Trigger this slot to save a frame from the widget.
+ *
+ * When this slot is triggered, the widgets capture loop is temporarily
+ * stopped, and the last displayed frame is "captured", and made
+ * available through the emitting of the class imageReady SIGNAL.
+ *
+ * With the "Take snapshot" button visible (setSnapshotVisible(true)),
+ * this SLOT is triggered when the user clicks on the trigger button.
+ * If you do not wish to use the internal trigger button, you
+ * will have to add a different mechanism to trigger this SLOT.
+ *
+ * It is possible, though I would not recommend, to use repeated
+ * triggering of this slot to do repeated frame-capture, and thus
+ * make a form of "Animation" or "Video" capture.
+ *
+ **/
+void QOpenCamWidget::startSnap(void)
+{
+ if ( frametimer ) {
+ if (frametimer->isActive())
+ {
+ frametimer->stop();
+ qDebug() << "SNAP!";
+
+ emit imageReady(QImage(*nextFrame));
+ frametimer->start();
+ }
+ }
+}
+
--- /dev/null
+/*
+ This file is one part of two, that together make
+ QOpenCamWidget, a Qt 4 widget that displays video input
+ from a webcam, along with an optional snapshot button.
+
+ Copyright (C) 2009 Jon Langseth
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation in its version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef QOPENCVWIDGET_H
+#define QOPENCVWIDGET_H
+#include <QtGui>
+#include <opencv/cv.h>
+#include <opencv/highgui.h>
+
+class QOpenCamWidget
+ : public QWidget
+{
+ Q_OBJECT
+
+ private:
+ CvCapture *capture;
+ QTimer *frametimer;
+ QImage *nextFrame;
+ //QImage *snapshot;
+ QLabel *canvas;
+ QVBoxLayout *layout;
+ QPushButton *trigger;
+ bool trigger_active;
+
+ public:
+ // Defaults, standard elements ;)
+ QOpenCamWidget(QWidget *parent = 0);
+ ~QOpenCamWidget(void);
+
+ // Overides, reimplementation of abstract
+ void paintEvent ( QPaintEvent * event );
+
+ // Public methods specific to this class
+ void setSnapshotVisible( bool visible );
+ bool grabCapture(int source);
+ void startCapture(void);
+ QImage* Ipl2QImage(const IplImage *img);
+
+ public slots:
+ void grabFrame(void);
+ void startSnap();
+ signals:
+ void imageReady(QImage snapshot);
+};
+
+#endif
+
--- /dev/null
+/*
+ QOpenCamWidget demo application main window (view.c)
+ This file is part of a demonstration application, illustrating
+ how to use the QOpenCamWidget, a Qt 4 widget that displays
+ video input from a webcam, along with a snapshot button.
+
+ Copyright (C) 2009 Jon Langseth
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation in its version 2
+ of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "view.h"
+#include "qopencamwidget.h"
+
+// The View class is a QMainWindow, used to display our QOpenCamWidget
+// The constructor of the View takes care of setting up the Widget,
+// and handles the result of a user clicking (or activating) the widget's
+// "Take snapshot" button.
+
+View::View( QWidget *parent)
+ : QMainWindow(parent)
+{
+
+ // Create the widget, setting the Main window (this) as its parent.
+ QOpenCamWidget *cw = new QOpenCamWidget(this);
+
+ // bool QOpenCamWidget::grabCapture(int source) tries to get a
+ // video capture handle from OpenCV, using the source number
+ // as the device to open. Here I use -1 as the number, meaning
+ // "give me any supported and available video devica you can find".
+ if ( cw->grabCapture(-1) )
+ {
+ // grabCapture() returns true on success. This means that
+ // we have a capture device available, and can start streaming
+ // video from the device to display on the widget.
+
+ // TODO: Document this feature..
+ cw->setSnapshotVisible(true);
+
+ // Video output does not start until QOpenCamWidget::startCapture()
+ // is explicitly called.
+ cw->startCapture();
+ }
+
+ // The QOpenCamWidget does not provide a video stream for further
+ // processing, but it does provide a snapshot of the stream if
+ // the SLOT void QOpenCamWidget::startSnap(void) is triggered.
+ // In this demo app, the slot is connected to the widgets
+ // internal "Take snapshot" trigger button, but the SLOT is
+ // public, and may easily be triggered from "outside".
+ //
+ // When startSnap() is triggered, it will use a SIGNAL to return
+ // its image, if the aquisition was successful. The image
+ // will be available through QOpenCamWidget::imageReady(Qimage);
+ // In this sample, I hook that signal up to a slot on this QMainWindow,
+ // that saves the image, and exits the application.
+ connect( cw, SIGNAL(imageReady(QImage)), this, SLOT(saveImage(QImage)));
+
+ this->setCentralWidget(cw);
+}
+
+View::~View(void)
+{
+}
+
+void View::saveImage(QImage image)
+{
+ // This is the SLOT that recieves QOpenCamWidget::imageReady(QImage) SIGNAL.
+ // To keep the example as simple as possible, I do as little as possible..
+ qDebug() << "Recieved an image of size "
+ << image.width() << "x" << image.height();
+ image.save("snapshot.png");
+
+ QApplication::exit();
+}
--- /dev/null
+#ifndef VIEW_H
+#define VIEW_H
+#include <QtGui>
+
+class View
+ : public QMainWindow
+{
+ Q_OBJECT
+
+ public:
+ View(QWidget *parent = 0);
+ ~View(void);
+
+ public slots:
+ void saveImage(QImage image);
+};
+
+#endif