00001 #ifndef TFGLWIDGET_H 00002 #define TFGLWIDGET_H 00003 00004 #include <QGLWidget> 00005 00006 class tfGLWidget : public QGLWidget 00007 { 00008 Q_OBJECT 00009 00010 public: 00011 tfGLWidget(QWidget *parent = 0); 00012 ~tfGLWidget(); 00013 00014 QSize minimumSizeHint() const; 00015 QSize sizeHint() const; 00016 00017 public slots: 00018 void setTFID(GLuint tfid); 00019 void setTFImage(QImage &tfimg); 00020 00021 00022 00023 protected: 00024 void initializeGL(); 00025 void paintGL(); 00026 void resizeGL(int width, int height); 00027 00028 private: 00029 GLuint m_tfid; 00030 QPoint lastPos; 00031 QColor trolltechGreen; 00032 QColor trolltechPurple; 00033 QImage m_tfimg; 00034 unsigned char* m_tf_texture; 00035 }; 00036 00037 #endif