00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GLUONPLAYER_GLFBOAPPLET_H
00022 #define GLUONPLAYER_GLFBOAPPLET_H
00023
00024 #include "player/gluon_player_export.h"
00025
00026 #include <plasma/applet.h>
00027
00028 #include <QtOpenGL/QGLWidget>
00029
00030 namespace GluonPlayer
00031 {
00032 class GLUON_PLAYER_EXPORT GLFBOApplet : public Plasma::Applet
00033 {
00034 Q_OBJECT
00035
00036 public:
00044 GLFBOApplet( QGraphicsItem* parent,
00045 const QString& serviceId,
00046 int appletId );
00047
00058 GLFBOApplet( QObject* parent, const QVariantList& args );
00059
00060 ~GLFBOApplet();
00061
00062 GLuint bindTexture( const QImage& image, GLenum target = GL_TEXTURE_2D );
00063 void deleteTexture( GLuint texture_id );
00064
00070 virtual void paintGLInterface( QPainter* painter,
00071 const QStyleOptionGraphicsItem* option );
00072 void makeCurrent();
00073
00074 private:
00075 virtual void paintInterface( QPainter* painter,
00076 const QStyleOptionGraphicsItem* option,
00077 const QRect& contentsRect );
00078 private:
00079 class GLFBOAppletPrivate;
00080 GLFBOAppletPrivate* const d;
00081 };
00082 }
00083
00084 #endif // GLUONPLAYER_GLFBOAPPLET_H