00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00081
00082
00083 virtual int probeDevices() = 0;
00084
00085
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