diff options
Diffstat (limited to 'kopete/libkopete/avdevice/qvideostream.cpp')
-rw-r--r-- | kopete/libkopete/avdevice/qvideostream.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kopete/libkopete/avdevice/qvideostream.cpp b/kopete/libkopete/avdevice/qvideostream.cpp index 18773946..05bbf209 100644 --- a/kopete/libkopete/avdevice/qvideostream.cpp +++ b/kopete/libkopete/avdevice/qvideostream.cpp @@ -20,9 +20,9 @@ */ #include "qvideostream.h" -#include <qevent.h> -#include <qimage.h> -#include <qtimer.h> +#include <tqevent.h> +#include <tqimage.h> +#include <tqtimer.h> #include <kdebug.h> #include "kxv.h" @@ -43,30 +43,30 @@ extern "C" { class QVideoStreamGLWidget : public QGLWidget { public: - QVideoStreamGLWidget(QWidget* parent = 0, const char* name = 0); + QVideoStreamGLWidget(TQWidget* parent = 0, const char* name = 0); virtual ~QVideoStreamGLWidget(); - void setInputSize(const QSize& sz); + void setInputSize(const TQSize& sz); void display(const unsigned char *const img, int x, int y, int sw, int sh); private: virtual void resizeGL(int w, int h); void initializeGL(); - virtual bool eventFilter( QObject *o, QEvent *e ); - void calc(QPoint& p, QPoint& v); + virtual bool eventFilter( TQObject *o, TQEvent *e ); + void calc(TQPoint& p, TQPoint& v); - QSize _inputSize; + TQSize _inputSize; GLuint _tex; int _tw, _th; - QWidget* _w; + TQWidget* _w; int _maxGL; - QSize _sz; + TQSize _sz; bool _glfun; - QPoint _ul, _ur, _ll, _lr; - QPoint _vul, _vur, _vll, _vlr; - QTimer* _glfunTimer; + TQPoint _ul, _ur, _ll, _lr; + TQPoint _vul, _vur, _vll, _vlr; + TQTimer* _glfunTimer; }; #endif @@ -98,8 +98,8 @@ QVideoStreamPrivate::~QVideoStreamPrivate() delete xvHandle; } -QVideoStream::QVideoStream(QWidget *widget, const char* name) - : QObject(widget, name), +QVideoStream::QVideoStream(TQWidget *widget, const char* name) + : TQObject(widget, name), d(new QVideoStreamPrivate), _w(widget), _methods(METHOD_NONE), @@ -127,7 +127,7 @@ QVideoStream::QVideoStream(QWidget *widget, const char* name) } #ifdef HAVE_GL - if (QGLFormat::hasOpenGL()) { + if (TQGLFormat::hasOpenGL()) { _methods = (VideoMethod)(_methods | METHOD_GL); } #endif @@ -309,7 +309,7 @@ QVideo::VideoMethod QVideoStream::setMethod(VideoMethod method) return _method; } -QSize QVideoStream::maxSize() const +TQSize QVideoStream::maxSize() const { return _size; } @@ -324,7 +324,7 @@ int QVideoStream::maxHeight() const return _size.height(); } -QSize QVideoStream::size() const +TQSize QVideoStream::size() const { return _size; } @@ -339,7 +339,7 @@ int QVideoStream::height() const return _size.height(); } -QSize QVideoStream::setSize(const QSize& sz) +TQSize QVideoStream::setSize(const TQSize& sz) { _size = sz; return _size; @@ -365,7 +365,7 @@ int QVideoStream::setHeight(int height) return _size.height(); } -QSize QVideoStream::inputSize() const +TQSize QVideoStream::inputSize() const { return _inputSize; } @@ -380,7 +380,7 @@ int QVideoStream::inputHeight() const return _inputSize.height(); } -QSize QVideoStream::setInputSize(const QSize& sz) +TQSize QVideoStream::setInputSize(const TQSize& sz) { if (sz == _inputSize) return _inputSize; @@ -532,19 +532,19 @@ QVideoStream& QVideoStream::operator<<(const unsigned char *const img) // --------------------------------------------------------------------------------------- #ifdef HAVE_GL -QVideoStreamGLWidget::QVideoStreamGLWidget(QWidget* parent, const char* name) - : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::Rgba | QGL::DirectRendering), parent, name), +QVideoStreamGLWidget::QVideoStreamGLWidget(TQWidget* parent, const char* name) + : TQGLWidget(TQGLFormat(TQGL::DoubleBuffer | TQGL::Rgba | TQGL::DirectRendering), parent, name), _tex(0), _w(parent), _glfun(false) { kdDebug() << "QVideoStreamGLWidget::QVideoStreamGLWidget()" << endl; - connect(_w, SIGNAL(resized(int, int)), - this, SLOT(resize(int, int))); + connect(_w, TQT_SIGNAL(resized(int, int)), + this, TQT_SLOT(resize(int, int))); topLevelWidget()->installEventFilter(this); - _glfunTimer = new QTimer(); + _glfunTimer = new TQTimer(); } QVideoStreamGLWidget::~QVideoStreamGLWidget() @@ -558,12 +558,12 @@ QVideoStreamGLWidget::~QVideoStreamGLWidget() } } -bool QVideoStreamGLWidget::eventFilter(QObject*, QEvent* e) +bool QVideoStreamGLWidget::eventFilter(TQObject*, TQEvent* e) { - // For some reason, KeyPress does not work (yields 2), QEvent::KeyPress is unknown... What the f...???? + // For some reason, KeyPress does not work (yields 2), TQEvent::KeyPress is unknown... What the f...???? // I am too lazy to scan the header files for the reason. if(e->type() == 6) { - QKeyEvent* ke = static_cast<QKeyEvent*>(e); + TQKeyEvent* ke = static_cast<TQKeyEvent*>(e); if(ke->key() == Qt::Key_Pause) { _glfunTimer->start(500, true); } else if (_glfunTimer->isActive() && (ke->key() == Qt::Key_Escape)) { @@ -578,7 +578,7 @@ void QVideoStreamGLWidget::initializeGL() kdDebug() << "QVideoStreamGLWidget::initializeGL()" << endl; setAutoBufferSwap(false); - QGLFormat f = format(); + TQGLFormat f = format(); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_maxGL); kdDebug() << "OpenGL capabilities (* = required):" << endl; kdDebug() << " Valid context*: " << isValid() << endl; @@ -598,15 +598,15 @@ void QVideoStreamGLWidget::initializeGL() glShadeModel(GL_FLAT); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - _vul = QPoint( 4, 10); - _vur = QPoint(-8, 4); - _vll = QPoint(10, -4); - _vlr = QPoint(-8, -10); + _vul = TQPoint( 4, 10); + _vur = TQPoint(-8, 4); + _vll = TQPoint(10, -4); + _vlr = TQPoint(-8, -10); } void QVideoStreamGLWidget::resizeGL(int w, int h) { - _sz = QSize(w, h); + _sz = TQSize(w, h); glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); @@ -615,13 +615,13 @@ void QVideoStreamGLWidget::resizeGL(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - _ul = QPoint(0, 0); - _ur = QPoint(w, 0); - _ll = QPoint(0, h); - _lr = QPoint(w, h); + _ul = TQPoint(0, 0); + _ur = TQPoint(w, 0); + _ll = TQPoint(0, h); + _lr = TQPoint(w, h); } -void QVideoStreamGLWidget::setInputSize(const QSize& sz) +void QVideoStreamGLWidget::setInputSize(const TQSize& sz) { makeCurrent(); @@ -705,7 +705,7 @@ void QVideoStreamGLWidget::display(const unsigned char *const img, int x, int y, glDisable(GL_TEXTURE_2D); } -void QVideoStreamGLWidget::calc(QPoint& p, QPoint& v) +void QVideoStreamGLWidget::calc(TQPoint& p, TQPoint& v) { p += v; |