11 #ifndef __RE_GLDRAWABLE_H_INCLUDED__
12 #define __RE_GLDRAWABLE_H_INCLUDED__
20 #include <QtGui/QOpenGLContext>
21 #include <QtWidgets/QWidget>
23 #if defined(EXPERIMENTAL_VOLT_STYLE)
24 #include <UI/UI_Look.h>
26 #include <QtGui/QPainter>
36 #define RE_GL_DRAWABLE_OBJ_NAME "RE_GLDrawable"
37 #define RE_GL_DRAWABLE_SURFACE_OBJ_NAME RE_GL_DRAWABLE_OBJ_NAME "Window"
39 #define RE_GL_DRAWABLE_WRAPPER_OBJ_NAME RE_GL_DRAWABLE_OBJ_NAME "Wrapper"
69 const QSurfaceFormat &format, QWidget *parent,
70 QOpenGLContext *sharedContext);
75 QPaintEngine *
paintEngine()
const override {
return nullptr; };
88 #if defined(EXPERIMENTAL_VOLT_STYLE)
89 void updatePixmap(UI_Look *look, QPixmap pixmap)
91 for (
int i = 0; i < myPixmapBuffer.size(); i++)
93 if (myPixmapBuffer[i].
first == look)
95 myPixmapBuffer.removeIndex(i);
99 myPixmapBuffer.append(std::make_pair(look, pixmap));
104 void paintEvent(QPaintEvent *
event)
override;
105 void resizeEvent(QResizeEvent *
event)
override;
106 void mousePressEvent(QMouseEvent *
event)
override;
113 #if defined(EXPERIMENTAL_VOLT_STYLE)
122 #endif // __RE_GLDRAWABLE_H_INCLUDED__
void setDrawable(RE_GLDrawable *drawable)
static const char * drawableSurfaceTag()
static const char * widgetWrapperTag()
#define RE_GL_DRAWABLE_SURFACE_OBJ_NAME
GLint GLint GLsizei GLint GLenum format
static const char * widgetTag()
RE_GLDrawable * drawable() const
#define RE_GL_DRAWABLE_OBJ_NAME
QPaintEngine * paintEngine() const override
#define RE_GL_DRAWABLE_WRAPPER_OBJ_NAME