summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget_p.h')
-rw-r--r--src/widgets/kernel/qwidget_p.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 943b7057b5..bdfc57f7c3 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -60,6 +60,7 @@
#include "QtCore/qset.h"
#include "QtGui/qregion.h"
#include "QtGui/qinputmethod.h"
+#include "QtGui/qopengl.h"
#include "QtWidgets/qsizepolicy.h"
#include "QtWidgets/qstyle.h"
#include "QtWidgets/qapplication.h"
@@ -80,6 +81,7 @@ class QPixmap;
class QWidgetBackingStore;
class QGraphicsProxyWidget;
class QWidgetItemV2;
+class QOpenGLContext;
class QStyle;
@@ -216,6 +218,7 @@ struct QTLWExtra {
bool wasMaximized;
#endif
QWidgetWindow *window;
+ QOpenGLContext *shareContext;
quint32 screenIndex; // index in qplatformscreenlist
};
@@ -324,6 +327,8 @@ public:
explicit QWidgetPrivate(int version = QObjectPrivateVersion);
~QWidgetPrivate();
+ static QWidgetPrivate *get(QWidget *w) { return w->d_func(); }
+
QWExtra *extraData() const;
QTLWExtra *topData() const;
QTLWExtra *maybeTopData() const;
@@ -438,7 +443,7 @@ public:
void syncBackingStore(const QRegion &region);
// tells the input method about the widgets transform
- void updateWidgetTransform();
+ void updateWidgetTransform(QEvent *event);
void reparentFocusWidgets(QWidget *oldtlw);
@@ -489,6 +494,7 @@ public:
void setWindowTitle_helper(const QString &cap);
void setWindowFilePath_helper(const QString &filePath);
void setWindowModified_helper();
+ virtual void setWindowFlags(Qt::WindowFlags windowFlags);
bool setMinimumSize_helper(int &minw, int &minh);
bool setMaximumSize_helper(int &maxw, int &maxh);
@@ -537,6 +543,8 @@ public:
}
}
}
+#else
+ Q_UNUSED(widget);
#endif
return screen;
}
@@ -615,6 +623,27 @@ public:
inline QRect mapFromWS(const QRect &r) const
{ QRect rr(r); rr.translate(data.wrect.topLeft()); return rr; }
+ QOpenGLContext *shareContext() const;
+
+#ifndef QT_NO_OPENGL
+ virtual GLuint textureId() const { return 0; }
+
+ void setRenderToTexture() { renderToTexture = true; textureChildSeen = true; }
+ void setTextureChildSeen()
+ {
+ Q_Q(QWidget);
+ if (textureChildSeen)
+ return;
+ textureChildSeen = 1;
+
+ if (!q->isWindow()) {
+ QWidget *parent = q->parentWidget();
+ if (parent)
+ get(parent)->setTextureChildSeen();
+ }
+ }
+#endif
+
// Variables.
// Regular pointers (keep them together to avoid gaps on 64 bit architectures).
QWExtra *extra;
@@ -695,6 +724,8 @@ public:
uint isMoved : 1;
uint usesDoubleBufferedGLContext : 1;
uint mustHaveWindowHandle : 1;
+ uint renderToTexture : 1;
+ uint textureChildSeen : 1;
#ifndef QT_NO_IM
uint inheritsInputMethodHints : 1;
#endif