Camstream: CamStream API documentation

Main Page Class Hierarchy Compound List File List Compound Members File Members

# CamStreamApp.h

Go to the documentation of this file.

    00001 #ifndef CAMSTREAMAPP_HPP
    00002 #define CAMSTREAMAPP_HPP
    00003
    00004 #ifdef HAVE_CONFIG_H
    00005 #incude <config.h>
    00006 #endif
    00007
    00008 #include <qapplication.h>
    00009 #include <qcolor.h>
    00010 #include <qdict.h>
    00011 #include <qdom.h>
    00012 #include <qfile.h>
    00013 #include <qfont.h>
    00014 #include <qstring.h>
    00015
    00016 #include "VideoOptions.h"
    00017 #include "VideoCollector.h"
    00018
    00031 enum FileTypeEnum
    00032 {
    00033    file_jpeg,
    00034    file_png,
    00035    file_ppm,
    00036    file_bmp,
    00037
    00038    file_MAX
    00039 };
    00040
    00041
    00042 class CCamStreamApp: public QApplication
    00043 {
    00044 private:
    00045    QFile ConfigFile;
    00046    QString UploadDir;
    00047
    00048    int snap_bitmask;    /* possible file formats */
    00049
    00050    QList<SVideoOptions> VOpts;
    00051
    00052    QDict<QString> VisiblePanels;
    00053
    00054    void InitFileTypes();
    00055
    00056    void ReadConfigFile();
    00057    void SaveConfigFile();
    00058
    00059 public:
    00060    CVideoCollector *VideoDevices;
    00061    struct {
    00062      QDomDocument Root;
    00063      QDomElement Defaults;
    00064      QDomElement VideoDevices;
    00065    } Configuration;
    00066
    00067    CCamStreamApp(int argc, char *argv[]);
    00068    ~CCamStreamApp();
    00069
    00070    QString GetUploadTmpDir() const;
    00071
    00072    /* File name and type for saved images */
    00073    int GetNumberOfFileTypes() const;
    00074    int GetFileTypeMask() const;
    00075    QString GetFileTypeExtension(int n) const;
    00076    QString GetFileTypeFormatStr(int n) const;
    00077    int FormatStrToEnum(const QString &) const;
    00078    QString FormatStrToExtension(const QString &) const;
    00079
    00080    SVideoOptions *FindVideoOptions(const QString &name, const QString &node, bool create = FALSE);
    00081 };
    00082
    00084 extern CCamStreamApp *CamApp;
    00085
    00086 #endif
    00087