diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /src/k9glwidget.cpp | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k9glwidget.cpp')
-rw-r--r-- | src/k9glwidget.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/k9glwidget.cpp b/src/k9glwidget.cpp index 444d823..9594e62 100644 --- a/src/k9glwidget.cpp +++ b/src/k9glwidget.cpp @@ -13,20 +13,20 @@ #include "k9glwidget.h" #ifdef HAVE_OPENGL -#include <qsize.h> -#include <qapplication.h> -#include <qdatetime.h> +#include <tqsize.h> +#include <tqapplication.h> +#include <tqdatetime.h> #include <cstdlib> #include "ac.h" #include <X11/Xlib.h> -k9GLWidget::k9GLWidget(QWidget *parent, const char *name):QGLWidget(parent, name) { +k9GLWidget::k9GLWidget(TQWidget *tqparent, const char *name):TQGLWidget(tqparent, name) { XMapRaised(x11Display(),winId()); m_buffer=NULL; m_height=0; m_width=0; - library=new QLibrary("GL.so.1"); + library=new TQLibrary("GL.so.1"); glClear = (glClear_t) library->resolve( "glClear" ); glRasterPos2i= (glRasterPos2i_t)library->resolve("glRasterPos2i"); @@ -45,9 +45,9 @@ k9GLWidget::k9GLWidget(QWidget *parent, const char *name):QGLWidget(parent, name glGetString=(glGetString_t)library->resolve("glGetString"); } -k9GLWidget* k9GLWidget::createWidget(QWidget *parent , const char *name ) { +k9GLWidget* k9GLWidget::createWidget(TQWidget *tqparent , const char *name ) { //XInitThreads(); - return new k9GLWidget(parent,name); + return new k9GLWidget(tqparent,name); } k9GLWidget::~k9GLWidget() { @@ -61,9 +61,9 @@ void k9GLWidget::paintGL() { } void k9GLWidget::setImage(uchar *_buffer,int _width,int _height,int _len) { - if (qApp==NULL) + if (tqApp==NULL) return; - if (qApp->tryLock() ) { + if (tqApp->tryLock() ) { uchar *buffer=_buffer; m_width=_width; m_height=_height; @@ -74,8 +74,8 @@ void k9GLWidget::setImage(uchar *_buffer,int _width,int _height,int _len) { //m_stack.push(buffer); m_mutex.unlock(); update(); - if (qApp !=NULL) - qApp->unlock(); + if (tqApp !=NULL) + tqApp->unlock(); } else { free(_buffer); } |