<html> <head> <title>Camstream: CamStream API documentation</title> <link rel="stylesheet" href="../../tech.css" type="text/css"> </head> <body> <!-- Generated by Doxygen 1.2.6 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>CCamStreamApp Class Reference</h1>The CamStream main application class. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="camstreamapp_h-source.html">CamStreamApp.h</a>></code> <p> <p>Inheritance diagram for CCamStreamApp:: <p><center><img src="class_ccamstreamapp.gif" usemap="#CCamStreamApp_map" border="0"></center> <map name="CCamStreamApp_map"> <area href="class_qapplication.html" alt="QApplication" shape="rect" coords="0,0,108,24"> </map> <a href="class_ccamstreamapp-members.html">List of all members.</a><h2>Public Methods</h2> <ul> <li><a class="el" href="class_ccamstreamapp.html#a0">CCamStreamApp</a> (int argc, char *argv[]) <li><a class="el" href="class_ccamstreamapp.html#a1">~CCamStreamApp</a> () <li>QString <a class="el" href="class_ccamstreamapp.html#a2">GetUploadTmpDir</a> () const <li>int <a class="el" href="class_ccamstreamapp.html#a3">GetNumberOfFileTypes</a> () const <li>int <a class="el" href="class_ccamstreamapp.html#a4">GetFileTypeMask</a> () const <li>QString <a class="el" href="class_ccamstreamapp.html#a5">GetFileTypeExtension</a> (int n) const <li>QString <a class="el" href="class_ccamstreamapp.html#a6">GetFileTypeFormatStr</a> (int n) const <li>int <a class="el" href="class_ccamstreamapp.html#a7">FormatStrToEnum</a> (const QString &) const <li>QString <a class="el" href="class_ccamstreamapp.html#a8">FormatStrToExtension</a> (const QString &) const <li><a class="el" href="struct_svideooptions.html">SVideoOptions</a>* <a class="el" href="class_ccamstreamapp.html#a9">FindVideoOptions</a> (const QString &name, const QString &node, bool create=FALSE) </ul> <h2>Public Attributes</h2> <ul> <li><a class="el" href="class_cvideocollector.html">CVideoCollector</a>* <a class="el" href="class_ccamstreamapp.html#m0">VideoDevices</a> <li>struct { <ul> <li> QDomDocument <a class="el" href="class_ccamstreamapp.html#m1">Root</a> <li> QDomElement <a class="el" href="class_ccamstreamapp.html#m2">Defaults</a> <li> QDomElement <a class="el" href="class_ccamstreamapp.html#m3">VideoDevices</a> </ul> <li>} <a class="el" href="class_ccamstreamapp.html#m4">Configuration</a> </ul> <hr><a name="_details"></a><h2>Detailed Description</h2> The CamStream main application class. <p> <p> This class is the main object for the CamStream application. It does the following:<ul> <li>creates the canvas, loads widgets;<li>determines available image file formats;<li>stores and retrieves user settings;</ul> The configuration is stored as an XML document. The structure still has to be defined fully, and is partially defined by sub-elements. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="CCamStreamApp::CCamStreamApp"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> CCamStreamApp::CCamStreamApp ( </b></td> <td valign="bottom"><b> int <em>argc</em>, </b></td> </tr> <tr> <td></td> <td><b> char * <em>argv</em>[] ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Constructor. <p> <p> Takes the <b>argc</b> and <b>argv</b> arguments from <a class="el" href="caminfo_cc.html#a0">main</a>(). </td> </tr> </table> <a name="a1" doxytag="CCamStreamApp::~CCamStreamApp"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> CCamStreamApp::~CCamStreamApp ( </b></td> <td valign="bottom"><b> ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Destructor. <p> <p> End of program; saves user settings (image formats, etc) </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a9" doxytag="CCamStreamApp::FindVideoOptions"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> struct <a class="el" href="struct_svideooptions.html">SVideoOptions</a> * CCamStreamApp::FindVideoOptions ( </b></td> <td valign="bottom"><b> const QString & <em>name</em>, </b></td> </tr> <tr> <td></td> <td><b> const QString & <em>node</em>, </b></td> </tr> <tr> <td></td> <td><b> bool <em>create</em> = FALSE ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Find the options of a videodevice, matching by name or device node. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>name</em> </td><td> The name from the device, e.g. "CPiA webcam" </td></tr> <tr><td valign=top><em>node</em> </td><td> The device nodename, e.g. /dev/video1 </td></tr> <tr><td valign=top><em>create</em> </td><td> If TRUE, will create a new structure which is added to the internal tree </td></tr> </table> </dl><dl compact><dt> <b>Returns: </b><dd> a <a class="el" href="struct_svideooptions.html">SVideoOptions</a> structure, or NULL if nothing was found and create was FALSE <p> </dl>This function tries to find a matching <a class="el" href="struct_svideooptions.html">SVideoOptions</a> struct for a device. It first searches the list looking for the 'name' (which is a symbolic name returned by the device), if that fails it uses the device nodename. <p> By setting <b>create</b> to TRUE, a <a class="el" href="struct_svideooptions.html">SVideoOptions</a> structure will be created when it wasn't found in the current list, and will be appended to the known configurations. </td> </tr> </table> <a name="a7" doxytag="CCamStreamApp::FormatStrToEnum"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> int CCamStreamApp::FormatStrToEnum ( </b></td> <td valign="bottom"><b> const QString & <em>format</em> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Find enumeration belonging to file format. <p> <dl compact><dt> <b>Returns: </b><dd> A positive integer on a match, -1 when nothing was found <p> </dl>This function returns a number from <a class="el" href="camstreamapp_h.html#a6">FileTypeEnum</a> that matches the string given in <em><a class="el" href="camstreamapp_cc.html#a3">format</a></em>. See <a class="el" href="class_ccamstreamapp.html#a6">GetFileTypeFormatStr</a> </td> </tr> </table> <a name="a8" doxytag="CCamStreamApp::FormatStrToExtension"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QString CCamStreamApp::FormatStrToExtension ( </b></td> <td valign="bottom"><b> const QString & ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a5" doxytag="CCamStreamApp::GetFileTypeExtension"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QString CCamStreamApp::GetFileTypeExtension ( </b></td> <td valign="bottom"><b> int <em>n</em> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get string with the proper filename extension. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>n</em> </td><td> One of <a class="el" href="camstreamapp_h.html#a6">FileTypeEnum</a> <p> </td></tr> </table> </dl>Return the proper filename extension for the given file format. For example, for JPEG files, it will return "jpg". </td> </tr> </table> <a name="a6" doxytag="CCamStreamApp::GetFileTypeFormatStr"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QString CCamStreamApp::GetFileTypeFormatStr ( </b></td> <td valign="bottom"><b> int <em>n</em> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get string with format for saving files. <p> <p> Return proper handler string for current file format (which is different from the file extension). See <b>QImage::save(...)</b> </td> </tr> </table> <a name="a4" doxytag="CCamStreamApp::GetFileTypeMask"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> int CCamStreamApp::GetFileTypeMask ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return bitmak of available file formats. <p> <p> This function returns a bitmask of available formats. Every enumerated fileformat is represented by its corresponding bit (use 1 << <em>n</em> to mask out a bit). The number of fileformats is thus limited to 32. </td> </tr> </table> <a name="a3" doxytag="CCamStreamApp::GetNumberOfFileTypes"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> int CCamStreamApp::GetNumberOfFileTypes ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return number of file formats. <p> <p> This function returns the number of programmed file formats, including the formats that are currently not supported by Qt. The supported formats are determined at run time, see <a class="el" href="class_ccamstreamapp.html#a4">GetFileTypeMask</a>. </td> </tr> </table> <a name="a2" doxytag="CCamStreamApp::GetUploadTmpDir"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QString CCamStreamApp::GetUploadTmpDir ( </b></td> <td valign="bottom"><b> ) const </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="m4" doxytag="CCamStreamApp::Configuration"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> struct { ... } CCamStreamApp::Configuration </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="m2" doxytag="CCamStreamApp::Defaults"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QDomElement CCamStreamApp::Defaults </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="m1" doxytag="CCamStreamApp::Root"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QDomDocument CCamStreamApp::Root </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="m3" doxytag="CCamStreamApp::VideoDevices"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> QDomElement CCamStreamApp::VideoDevices </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="m0" doxytag="CCamStreamApp::VideoDevices"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> <a class="el" href="class_cvideocollector.html">CVideoCollector</a>* CCamStreamApp::VideoDevices </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="camstreamapp_cc.html">CamStreamApp.cc</a><li><a class="el" href="camstreamapp_h-source.html">CamStreamApp.h</a></ul> <hr><address><small>Generated at Sat May 18 02:56:55 2002 for Camstream by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.6 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2001</small></address> </body> </html>