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.h | |
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.h')
-rw-r--r-- | src/k9glwidget.h | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/src/k9glwidget.h b/src/k9glwidget.h index c26237c..e032ed8 100644 --- a/src/k9glwidget.h +++ b/src/k9glwidget.h @@ -14,12 +14,16 @@ #include "k9common.h" +#ifdef Q_MOC_RUN +#define HAVE_OPENGL +#endif // Q_MOC_RUN + #ifdef HAVE_OPENGL -#include <qimage.h> -#include <qlibrary.h> -#include <qgl.h> -#include <qmutex.h> +#include <tqimage.h> +#include <tqlibrary.h> +#include <tqgl.h> +#include <tqmutex.h> typedef void (*glClear_t) (GLbitfield); typedef void (*glRasterPos2i_t) ( GLint , GLint ); @@ -39,12 +43,13 @@ typedef const GLubyte * (*glGetString_t)( GLenum ); /** @author Jean-Michel PETIT <[email protected]> */ -class k9GLWidget : public QGLWidget +class k9GLWidget : public TQGLWidget { Q_OBJECT + TQ_OBJECT public: void setImage(uchar *_buffer,int _width,int _height,int _len); - static k9GLWidget * createWidget(QWidget *parent = 0, const char *name = 0); + static k9GLWidget * createWidget(TQWidget *tqparent = 0, const char *name = 0); ~k9GLWidget(); protected: void draw(); @@ -52,12 +57,12 @@ protected: void initializeGL(); void paintGL(); private: - k9GLWidget(QWidget *parent = 0, const char *name = 0); - QImage m_image; - QMutex m_mutex; + k9GLWidget(TQWidget *tqparent = 0, const char *name = 0); + TQImage m_image; + TQMutex m_mutex; int m_width,m_height; uchar *m_buffer; - QLibrary * library; + TQLibrary * library; glClear_t glClear; glRasterPos2i_t glRasterPos2i; @@ -78,18 +83,18 @@ private: #else -#include <qwidget.h> -#include <qimage.h> +#include <tqwidget.h> +#include <tqimage.h> -class k9GLWidget:public QWidget +class k9GLWidget:public TQWidget { public: - static k9GLWidget * createWidget(QWidget *parent = 0, const char *name = 0) { - return new k9GLWidget(parent,name); + static k9GLWidget * createWidget(TQWidget *tqparent = 0, const char *name = 0) { + return new k9GLWidget(tqparent,name); } void setImage(uchar *_buffer,int _width,int _height,int _len){}; private: - k9GLWidget(QWidget *parent = 0, const char *name = 0){}; + k9GLWidget(TQWidget *tqparent = 0, const char *name = 0){}; }; |