Main Page   Class Hierarchy   Compound List   File List   Compound Members  

qvsrcplugin.h

00001 // -*- c++ -*-
00002 
00003 /*
00004  *
00005  * Copyright (C) 2002 George Staikos <staikos@kde.org>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public License
00018  * along with this library; see the file COPYING.LIB.  If not, write to
00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020  * Boston, MA 02111-1307, USA.
00021  */
00022 
00023 
00024 
00025 #ifndef __QVSRC_PLUGIN_H
00026 #define __QVSRC_PLUGIN_H
00027 
00028 #include <qobject.h>
00029 #include <qstring.h>
00030 #include <qstringlist.h>
00031 #include <qmap.h>
00032 #include <qcolor.h>
00033 #include "qvpluginbase.h"
00034 
00035 class QVSourcePluginPrivate;
00036 
00040 class QVSourcePlugin : public QVPluginBase
00041 {
00042     Q_OBJECT
00043 
00044 public:
00045     QVSourcePlugin(QtVision *qtv, const QString& cfgkey, QObject *parent = 0, const char* name = 0);
00046     virtual ~QVSourcePlugin();
00047 
00051     virtual int brightness() = 0;
00052     virtual int colour() = 0;
00053     virtual int hue() = 0;
00054     virtual int contrast() = 0;
00055     virtual int whiteness() = 0;
00056     virtual int frequency() = 0;
00057     virtual int signal() = 0;
00058     virtual bool muted() = 0;
00059     virtual int tunerMode() = 0;
00063     virtual bool isTuner() = 0;
00064     virtual QColor colourKey() = 0;
00065 
00066     virtual bool needsNorm() const;
00067     virtual int norm() const;
00068 
00073     bool isTuner(const QString &dev);
00074 
00075     virtual const QStringList& deviceList() const;
00076     virtual const QStringList& sourceList(const QString& dev) const;
00077     virtual QString device() const;
00078     virtual QString source() const;
00079 
00080     // return 0 on success.  This is called to indicate that you should probe
00081     // for devices and populate _devices, _sources, and _tuners.
00082     // It may be called more than once.
00083     virtual int probeDevices() = 0;
00084 
00085     // Set the widget that we display on
00086     void setWidget(QWidget *w);
00087 
00088     virtual bool videoPlaying() const = 0;
00089 
00090     virtual bool canVideoDesktop() const;
00091     virtual bool canGrabStill() const;
00092     virtual bool grabStill( QPixmap *pix );
00093 
00094 public slots:
00098     virtual int setDevice( const QString &dev ) = 0;
00099 
00103     virtual int setSource( const QString &src ) = 0;
00104 
00108     virtual void setFrequency( int freq ) = 0;
00109 
00113     virtual void setNorm(int norm);
00114 
00118     virtual void setMuted( bool muted ) = 0;
00119 
00120     virtual void setBrightness(int val) = 0;
00121     virtual void setColour(int val) = 0;
00122     virtual void setHue(int val) = 0;
00123     virtual void setContrast(int val) = 0;
00124     virtual void setWhiteness(int val) = 0;
00125 
00126 
00127     virtual int startVideo() = 0;
00128     virtual int stopVideo() = 0;
00129 
00130     virtual void viewResized(int w, int h) = 0;
00131     virtual void viewMoved(int x, int y);
00132 
00133     virtual int setVideoDesktop(bool on) = 0;
00134 
00135 protected:
00136     QStringList _devices;
00137     QMap<QString, QStringList> _sources;
00138     QMap<QString, bool> _tuners;
00139     QString _device, _source;
00140     QWidget *_widget;
00141     bool _isVideoDesktop, _isTuner;
00142 
00143 private:
00144     QVSourcePluginPrivate *d;
00145 };
00146 
00147 #endif
00148 

Generated at Thu Jan 30 02:56:02 2003 for QtVision by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001