Qt 4.8
Public Functions | Public Variables | List of all members
QGLWidgetPrivate Class Reference

#include <qgl_p.h>

Inheritance diagram for QGLWidgetPrivate:
QWidgetPrivate QObjectPrivate QObjectData

Public Functions

void aboutToDestroy ()
 
void cleanupColormaps ()
 Free up any allocated colormaps. More...
 
void init (QGLContext *context, const QGLWidget *shareWidget)
 
 QGLWidgetPrivate ()
 
bool renderCxPm (QPixmap *pixmap)
 
void updateColormap ()
 
 ~QGLWidgetPrivate ()
 
void initContext (QGLContext *context, const QGLWidget *shareWidget)
 
- Public Functions inherited from QWidgetPrivate
void _q_showIfNotHidden ()
 
void activateChildLayoutsRecursively ()
 
QSize adjustedSize () const
 
void adjustQuitOnCloseAttribute ()
 
QInputContextassignedInputContext () const
 
QPainterbeginSharedPainter ()
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool, bool includeFrame=false) const
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void clipToEffectiveMask (QRegion &region) const
 
bool close_helper (CloseMode mode)
 
void create_sys (WId window, bool initializeWindow, bool destroyOldWindow)
 
QWindowSurfacecreateDefaultWindowSurface ()
 
QWindowSurfacecreateDefaultWindowSurface_sys ()
 
void createExtra ()
 Creates the widget extra data. More...
 
void createRecursively ()
 
void createSysExtra ()
 
void createTLExtra ()
 
void createTLSysExtra ()
 
void createWinId (WId id=0)
 
void deactivateWidgetCleanup ()
 
void deleteExtra ()
 Deletes the widget extra data. More...
 
void deleteSysExtra ()
 
void deleteTLSysExtra ()
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter=0, QWidgetBackingStore *backingStore=0)
 
QWidgeteffectiveFocusWidget ()
 
QRect effectiveRectFor (const QRect &rect) const
 
bool endSharedPainter ()
 
void enforceNativeChildren ()
 
QWExtraextraData () const
 
QRect frameStrut () const
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
const QRegiongetOpaqueChildren () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
virtual bool hasHeightForWidth () const
 
void hide_helper ()
 
void hide_sys ()
 Platform-specific part of QWidget::hide(). More...
 
void hideChildren (bool spontaneous)
 
void inheritStyle ()
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
QInputContextinputContext () const
 
void invalidateBuffer (const QRegion &)
 Invalidates the rgn (in widget's coordinates) of the backing store, i.e. More...
 
void invalidateBuffer (const QRect &)
 This function is equivalent to calling invalidateBuffer(QRegion(rect), ...), but is more efficient as it eliminates QRegion operations/allocations and can use the rect more precisely for additional cut-offs. More...
 
void invalidateBuffer_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the buffer when the widget is resized. More...
 
void invalidateGraphicsEffectsRecursively ()
 
bool isAboutToShow () const
 
bool isBackgroundInherited () const
 
bool isOverlapped (const QRect &) const
 
void lower_sys ()
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QWidgetBackingStoremaybeBackingStore () const
 
QTLWExtramaybeTopData () const
 
void moveRect (const QRect &, int dx, int dy)
 
bool nativeChildrenForced () const
 
QFont naturalWidgetFont (uint inheritedMask) const
 
QPalette naturalWidgetPalette (uint inheritedMask) const
 Returns the palette that the widget w inherits from its ancestors and QApplication::palette. More...
 
void paintBackground (QPainter *, const QRegion &, int flags=DrawAsRoot) const
 
bool paintOnScreen () const
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter, QWidgetBackingStore *backingStore)
 
bool pointInsideRectAndMask (const QPoint &) const
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void propagatePaletteChange ()
 Propagate this widget's palette to all children, except style sheet widgets, and windows that don't enable window propagation (palettes don't normally propagate to windows). More...
 
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
void raise_sys ()
 
QPaintDeviceredirected (QPoint *offset) const
 
void registerDropSite (bool)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags, bool readyToRender)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void repaint_sys (const QRegion &rgn)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void resolveFont ()
 Determine which font is implicitly imposed on this widget by its ancestors and QApplication::font, resolve this against its own font (attributes from the implicit font are copied over). More...
 
void resolveLayoutDirection ()
 
void resolveLocale ()
 
void resolvePalette ()
 Determine which palette is inherited from this widget's ancestors and QApplication::palette, resolve this against this widget's palette (attributes from the inherited palette are copied over this widget's palette). More...
 
void restoreRedirected ()
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void scrollChildren (int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void sendStartupMessage (const char *message) const
 Platform-specific part of QWidget::show(). More...
 
void setConstraints_sys ()
 
void setCursor_sys (const QCursor &cursor)
 
void setDirtyOpaqueRegion ()
 
void setEnabled_helper (bool)
 
void setFocus_sys ()
 
void setFont_helper (const QFont &font)
 
void setGeometry_sys (int, int, int, int, bool)
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=0)
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void setMask_sys (const QRegion &)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
void setModal_sys ()
 
void setNetWmWindowTypes ()
 
void setOpaque (bool opaque)
 
void setPalette_helper (const QPalette &)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
void setSharedPainter (QPainter *painter)
 
void setStyle_helper (QStyle *newStyle, bool propagate, bool metalHack=false)
 
void setUpdatesEnabled_helper (bool)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys (bool forceReset=false)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowOpacity_sys (qreal opacity)
 
void setWindowRole ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWinId (WId)
 
QPaintersharedPainter () const
 
void show_helper ()
 
void show_recursive ()
 Makes the widget visible in the isVisible() meaning of the word. More...
 
void show_sys ()
 Platform-specific part of QWidget::show(). More...
 
void showChildren (bool spontaneous)
 
void stackUnder_sys (QWidget *)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=0, bool alsoNonOpaque=false) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
QTLWExtratopData () const
 
void unsetCursor_sys ()
 
void updateFont (const QFont &)
 Assign font to this widget, and propagate it to all children, except style sheet widgets (handled differently) and windows that don't enable window propagation. More...
 
void updateFrameStrut ()
 Computes the frame rectangle when needed. More...
 
void updateGeometry_helper (bool forceUpdate)
 
void updateIsOpaque ()
 
void updateIsTranslucent ()
 
void updateSystemBackground ()
 
void updateX11AcceptFocus ()
 
void x11UpdateIsOpaque ()
 
 ~QWidgetPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

bool autoSwap
 
QGLColormap cmap
 
bool disable_clear_on_painter_begin
 
QMap< QString, int > displayListCache
 
QGLContextglcx
 
QGLWidgetGLPaintDevice glDevice
 
QGLContextolcx
 
- Public Variables inherited from QWidgetPrivate
QString accessibleDescription
 
QString accessibleName
 
QList< QAction * > actions
 
QPalette::ColorRole bg_role: 8
 
signed char bottomLayoutItemMargin
 
short bottommargin
 
QWidgetData data
 
QRegion dirty
 
uint dirtyOpaqueChildren: 1
 
QWExtraextra
 
QPaintEngineextraPaintEngine
 
QPalette::ColorRole fg_role: 8
 
QWidgetfocus_child
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
QGraphicsEffectgraphicsEffect
 
Qt::HANDLE hd
 
uint high_attributes [4]
 
QPointer< QInputContextic
 
Qt::InputMethodHints imHints
 
uint inDirtyList: 1
 
uint inheritedFontResolveMask
 
uint inheritedPaletteResolveMask
 
uint inheritsInputMethodHints: 1
 
uint inSetParent: 1
 
uint isGLWidget: 1
 
uint isMoved: 1
 
uint isOpaque: 1
 
uint isScrolled: 1
 
QLayoutlayout
 
signed char leftLayoutItemMargin
 
short leftmargin
 
QLocale locale
 
QRegionneedsFlush
 
QRegion opaqueChildren
 
Qt::HANDLE picture
 
const QMetaObjectpolished
 
QPaintDeviceredirectDev
 
QPoint redirectOffset
 
signed char rightLayoutItemMargin
 
short rightmargin
 
QSizePolicy size_policy
 
QString statusTip
 
QString toolTip
 
signed char topLayoutItemMargin
 
short topmargin
 
uint usesDoubleBufferedGLContext: 1
 
QString whatsThis
 
QWidgetItemV2widgetItem
 
QX11Info xinfo
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QWidgetPrivate
enum  CloseMode { CloseNoEvent, CloseWithEvent, CloseWithSpontaneousEvent }
 
enum  Direction { DirectionNorth = 0x01, DirectionEast = 0x10, DirectionSouth = 0x02, DirectionWest = 0x20 }
 
enum  DrawWidgetFlags {
  DrawAsRoot = 0x01, DrawPaintOnScreen = 0x02, DrawRecursive = 0x04, DrawInvisible = 0x08,
  DontSubtractOpaqueChildren = 0x10, DontSetCompositionMode = 0x20, DontDrawOpaqueChildren = 0x40, DontDrawNativeChildren = 0x80
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QWidgetPrivate
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=0)
 
static QGraphicsProxyWidgetnearestGraphicsProxyWidget (const QWidget *origin)
 Finds the nearest widget embedded in a graphics proxy widget along the chain formed by this widget and its ancestors. More...
 
static int pointToRect (const QPoint &p, const QRect &r)
 
static QRect screenGeometry (const QWidget *widget)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 
- Static Public Variables inherited from QWidgetPrivate
static QWidgetSetallWidgets = 0
 
static int instanceCounter = 0
 
static QWidgetkeyboardGrabber = 0
 
static QWidgetMappermapper = 0
 
static int maxInstances = 0
 
static QWidgetmouseGrabber = 0
 

Detailed Description

Definition at line 172 of file qgl_p.h.

Constructors and Destructors

◆ QGLWidgetPrivate()

QGLWidgetPrivate::QGLWidgetPrivate ( )
inline

Definition at line 176 of file qgl_p.h.

176  : QWidgetPrivate()
178 #if defined(Q_WS_QWS)
179  , wsurf(0)
180 #endif
181 #if defined(Q_WS_X11) && !defined(QT_NO_EGL)
182  , eglSurfaceWindowId(0)
183 #endif
184 #if defined(Q_OS_SYMBIAN)
185  , eglSurfaceWindowId(0)
186  , surfaceSizeInitialized(false)
187 #endif
188  {
189  isGLWidget = 1;
190 #if defined(Q_OS_SYMBIAN)
192  isGLGlobalShareWidget = 1;
193 #endif
194  }
bool disable_clear_on_painter_begin
Definition: qgl_p.h:216
bool qt_initializing_gl_share_widget()
QWidgetPrivate(int version=QObjectPrivateVersion)
Definition: qwidget.cpp:288

◆ ~QGLWidgetPrivate()

QGLWidgetPrivate::~QGLWidgetPrivate ( )
inline

Definition at line 196 of file qgl_p.h.

196 {}

Functions

◆ aboutToDestroy()

void QGLWidgetPrivate::aboutToDestroy ( )
inlinevirtual

Reimplemented from QWidgetPrivate.

Definition at line 202 of file qgl_p.h.

202  {
203  if (glcx)
204  glcx->reset();
205  }
void reset()
Resets the context and makes it invalid.
Definition: qgl_egl.cpp:191
QGLContext * glcx
Definition: qgl_p.h:207

◆ cleanupColormaps()

void QGLWidgetPrivate::cleanupColormaps ( )

Free up any allocated colormaps.

Warning
This function is not part of the public interface. This fn is only called for top-level widgets.

Definition at line 970 of file qgl_mac.mm.

Referenced by QGLOverlayWidget::paintGL(), qStoreColors(), qt_egl_create_surface(), and updateColormap().

971 {
972 }

◆ init()

void QGLWidgetPrivate::init ( QGLContext context,
const QGLWidget shareWidget 
)

Definition at line 950 of file qgl_mac.mm.

Referenced by QGLContext::choosePixelFormat(), QGLOverlayWidget::paintGL(), qDeleteQGLContext(), and qt_egl_create_surface().

951 {
952  Q_Q(QGLWidget);
953 
954  initContext(context, shareWidget);
955 
956  QWidget *current = q;
957  while (current) {
958  qt_widget_private(current)->glWidgets.append(QWidgetPrivate::GlWidgetInfo(q));
959  if (current->isWindow())
960  break;
961  current = current->parentWidget();
962  }
963 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
bool isWindow() const
Returns true if the widget is an independent window, otherwise returns false.
Definition: qwidget.h:945
void initContext(QGLContext *context, const QGLWidget *shareWidget)
Definition: qgl.cpp:5802
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
#define Q_Q(Class)
Definition: qglobal.h:2483
The QGLWidget class is a widget for rendering OpenGL graphics.
Definition: qgl.h:474
Q_GUI_EXPORT QWidgetPrivate * qt_widget_private(QWidget *widget)
Definition: qwidget.cpp:12920

◆ initContext()

void QGLWidgetPrivate::initContext ( QGLContext context,
const QGLWidget shareWidget 
)

Definition at line 5802 of file qgl.cpp.

5803 {
5804  Q_Q(QGLWidget);
5805 
5806  glDevice.setWidget(q);
5807 
5808  glcx = 0;
5809  autoSwap = true;
5810 
5811  if (context && !context->device())
5812  context->setDevice(q);
5813  q->setContext(context, shareWidget ? shareWidget->context() : 0);
5814 
5815  if (!glcx)
5817 }
void setWidget(QGLWidget *)
void setDevice(QPaintDevice *pDev)
Definition: qgl.cpp:3267
const QGLContext * context() const
Returns the context of this widget.
Definition: qgl.cpp:5303
#define Q_Q(Class)
Definition: qglobal.h:2483
The QGLContext class encapsulates an OpenGL rendering context.
Definition: qgl.h:310
QPaintDevice * device() const
Returns the paint device set for this context.
Definition: qgl.cpp:3507
The QGLWidget class is a widget for rendering OpenGL graphics.
Definition: qgl.h:474
static QGLFormat defaultFormat()
Definition: qgl.cpp:1518
bool autoSwap
Definition: qgl_p.h:209
QGLContext * glcx
Definition: qgl_p.h:207
QGLWidgetGLPaintDevice glDevice
Definition: qgl_p.h:208

◆ renderCxPm()

bool QGLWidgetPrivate::renderCxPm ( QPixmap pixmap)

Definition at line 384 of file qgl_egl.cpp.

Referenced by init(), QGLOverlayWidget::paintGL(), and updateColormap().

385 {
386  return false;
387 }

◆ updateColormap()

void QGLWidgetPrivate::updateColormap ( )

Definition at line 1441 of file qgl_win.cpp.

Referenced by qStoreColors().

1442 {
1443  Q_Q(QGLWidget);
1444  if (!cmap.handle())
1445  return;
1446  HDC hdc = GetDC(q->winId());
1447  SelectPalette(hdc, (HPALETTE) cmap.handle(), TRUE);
1448  qStoreColors((HPALETTE) cmap.handle(), cmap);
1449  RealizePalette(hdc);
1450  ReleaseDC(q->winId(), hdc);
1451 }
#define Q_Q(Class)
Definition: qglobal.h:2483
#define TRUE
Synonym for true.
Definition: qglobal.h:1018
The QGLWidget class is a widget for rendering OpenGL graphics.
Definition: qgl.h:474
static void qStoreColors(HPALETTE cmap, const QGLColormap &cols)
Definition: qgl_win.cpp:1425
Qt::HANDLE handle()
Returns the handle for this color map.
Definition: qglcolormap.h:76
QGLColormap cmap
Definition: qgl_p.h:211

Properties

◆ autoSwap

bool QGLWidgetPrivate::autoSwap

Definition at line 209 of file qgl_p.h.

◆ cmap

QGLColormap QGLWidgetPrivate::cmap

Definition at line 211 of file qgl_p.h.

◆ disable_clear_on_painter_begin

bool QGLWidgetPrivate::disable_clear_on_painter_begin

Definition at line 216 of file qgl_p.h.

◆ displayListCache

QMap<QString, int> QGLWidgetPrivate::displayListCache

Definition at line 213 of file qgl_p.h.

◆ glcx

QGLContext* QGLWidgetPrivate::glcx

Definition at line 207 of file qgl_p.h.

◆ glDevice

QGLWidgetGLPaintDevice QGLWidgetPrivate::glDevice

Definition at line 208 of file qgl_p.h.

◆ olcx

QGLContext* QGLWidgetPrivate::olcx

Definition at line 220 of file qgl_p.h.


The documentation for this class was generated from the following files: