Qt 4.8
Public Functions | Protected Functions | Protected Variables | List of all members
QVGEGLWindowSurfacePrivate Class Referenceabstract

#include <qwindowsurface_vgegl_p.h>

Inheritance diagram for QVGEGLWindowSurfacePrivate:
QVGEGLWindowSurfaceDirect

Public Functions

virtual void beginPaint (QWidget *widget)=0
 
virtual void endPaint (QWidget *widget, const QRegion &region, QImage *image=0)=0
 
virtual QEglContextensureContext (QWidget *widget)=0
 
QVGPaintEnginepaintEngine ()
 
 QVGEGLWindowSurfacePrivate (QWindowSurface *win)
 
virtual bool scroll (QWidget *, const QRegion &, int, int)
 
virtual bool supportsStaticContents () const
 
virtual VGImage surfaceImage () const
 
virtual QSize surfaceSize () const =0
 
virtual ~QVGEGLWindowSurfacePrivate ()
 

Protected Functions

void destroyPaintEngine ()
 
QSize windowSurfaceSize (QWidget *widget) const
 

Protected Variables

QVGPaintEngineengine
 
QWindowSurfacewinSurface
 

Detailed Description

Definition at line 67 of file qwindowsurface_vgegl_p.h.

Constructors and Destructors

◆ QVGEGLWindowSurfacePrivate()

QVGEGLWindowSurfacePrivate::QVGEGLWindowSurfacePrivate ( QWindowSurface win)

Definition at line 430 of file qwindowsurface_vgegl.cpp.

431 {
432  winSurface = win;
433  engine = 0;
434 }

◆ ~QVGEGLWindowSurfacePrivate()

QVGEGLWindowSurfacePrivate::~QVGEGLWindowSurfacePrivate ( )
virtual

Definition at line 436 of file qwindowsurface_vgegl.cpp.

437 {
438  // Destroy the paint engine if it hasn't been destroyed already.
440 }

Functions

◆ beginPaint()

virtual void QVGEGLWindowSurfacePrivate::beginPaint ( QWidget widget)
pure virtual

◆ destroyPaintEngine()

void QVGEGLWindowSurfacePrivate::destroyPaintEngine ( )
protected

Definition at line 454 of file qwindowsurface_vgegl.cpp.

Referenced by QVGEGLWindowSurfaceDirect::~QVGEGLWindowSurfaceDirect().

455 {
456  if (engine) {
458  engine = 0;
459  }
460 }
void qt_vg_destroy_paint_engine(QVGPaintEngine *engine)

◆ endPaint()

virtual void QVGEGLWindowSurfacePrivate::endPaint ( QWidget widget,
const QRegion region,
QImage image = 0 
)
pure virtual

Implemented in QVGEGLWindowSurfaceDirect.

Referenced by QVGWindowSurface::flush().

◆ ensureContext()

virtual QEglContext* QVGEGLWindowSurfacePrivate::ensureContext ( QWidget widget)
pure virtual

Implemented in QVGEGLWindowSurfaceDirect.

◆ paintEngine()

QVGPaintEngine * QVGEGLWindowSurfacePrivate::paintEngine ( )

Definition at line 442 of file qwindowsurface_vgegl.cpp.

Referenced by QVGWindowSurface::beginPaint(), and QVGWindowSurface::paintEngine().

443 {
444  if (!engine)
446  return engine;
447 }
QVGPaintEngine * qt_vg_create_paint_engine(void)

◆ scroll()

virtual bool QVGEGLWindowSurfacePrivate::scroll ( QWidget ,
const QRegion ,
int  ,
int   
)
inlinevirtual

Reimplemented in QVGEGLWindowSurfaceDirect.

Definition at line 81 of file qwindowsurface_vgegl_p.h.

Referenced by QVGWindowSurface::scroll(), and QVGEGLWindowSurfaceDirect::surfaceSize().

81 { return false; }

◆ supportsStaticContents()

virtual bool QVGEGLWindowSurfacePrivate::supportsStaticContents ( ) const
inlinevirtual

◆ surfaceImage()

VGImage QVGEGLWindowSurfacePrivate::surfaceImage ( ) const
virtual

Definition at line 449 of file qwindowsurface_vgegl.cpp.

450 {
451  return VG_INVALID_HANDLE;
452 }

◆ surfaceSize()

virtual QSize QVGEGLWindowSurfacePrivate::surfaceSize ( ) const
pure virtual

◆ windowSurfaceSize()

QSize QVGEGLWindowSurfacePrivate::windowSurfaceSize ( QWidget widget) const
protected

Definition at line 462 of file qwindowsurface_vgegl.cpp.

Referenced by QVGEGLWindowSurfaceDirect::ensureContext().

463 {
464  Q_UNUSED(widget);
465 
466  QRect rect = winSurface->geometry();
467  QSize newSize = rect.size();
468 
469 #if defined(Q_WS_QWS)
470  // Account for the widget mask, if any.
471  if (widget && !widget->mask().isEmpty()) {
472  const QRegion region = widget->mask()
473  & rect.translated(-widget->geometry().topLeft());
474  newSize = region.boundingRect().size();
475  }
476 #endif
477 
478  return newSize;
479 }
QRect geometry() const
Returns the currently allocated area on the screen.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
Definition: qrect.h:328
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
Definition: qregion.cpp:4098
QSize size() const
Returns the size of the rectangle.
Definition: qrect.h:309
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
QRegion mask() const
Returns the mask currently set on a widget.
Definition: qwidget.cpp:10058
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
QRect geometry
the geometry of the widget relative to its parent and excluding the window frame
Definition: qwidget.h:158
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

Properties

◆ engine

QVGPaintEngine* QVGEGLWindowSurfacePrivate::engine
protected

Definition at line 84 of file qwindowsurface_vgegl_p.h.

◆ winSurface

QWindowSurface* QVGEGLWindowSurfacePrivate::winSurface
protected

Definition at line 85 of file qwindowsurface_vgegl_p.h.


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