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

#include <qgraphicssystem_runtime_p.h>

Inheritance diagram for QRuntimeWindowSurface:
QWindowSurface

Public Functions

virtual void beginPaint (const QRegion &)
 This function is called before painting onto the surface begins, with the region in which the painting will occur. More...
 
virtual QImagebuffer (const QWidget *widget)
 Returns a QImage pointer which represents the actual buffer the widget is drawn into or 0 if this is unavailable. More...
 
virtual void endPaint (const QRegion &)
 This function is called after painting onto the surface has ended, with the region in which the painting was performed. More...
 
virtual WindowSurfaceFeatures features () const
 
virtual void flush (QWidget *widget, const QRegion &region, const QPoint &offset)
 Flushes the given region from the specified widget onto the screen. More...
 
virtual QPixmap grabWidget (const QWidget *widget, const QRect &rectangle=QRect()) const
 Returns a QPixmap generated from the part of the backing store corresponding to widget. More...
 
virtual QPoint offset (const QWidget *widget) const
 Returns the offset of widget in the coordinates of this window surface. More...
 
virtual QPaintDevicepaintDevice ()
 Implement this function to return the appropriate paint device. More...
 
 QRuntimeWindowSurface (const QRuntimeGraphicsSystem *gs, QWidget *window)
 
virtual bool scroll (const QRegion &area, int dx, int dy)
 Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative. More...
 
virtual void setGeometry (const QRect &rect)
 Sets the currently allocated area to be the given rect. More...
 
 ~QRuntimeWindowSurface ()
 
- Public Functions inherited from QWindowSurface
QRect geometry () const
 Returns the currently allocated area on the screen. More...
 
bool hasFeature (WindowSurfaceFeature feature) const
 
 QWindowSurface (QWidget *window, bool setDefaultSurface=true)
 Constructs an empty surface for the given top-level window. More...
 
QRect rect (const QWidget *widget) const
 Returns the rectangle for widget in the coordinates of this window surface. More...
 
void setStaticContents (const QRegion &region)
 
QRegion staticContents () const
 
QWidgetwindow () const
 Returns a pointer to the top-level window associated with this surface. More...
 
virtual ~QWindowSurface ()
 Destroys this surface. More...
 

Public Variables

QScopedPointer< QWindowSurfacem_pendingWindowSurface
 
QScopedPointer< QWindowSurfacem_windowSurface
 

Properties

const QRuntimeGraphicsSystemm_graphicsSystem
 

Additional Inherited Members

- Public Types inherited from QWindowSurface
enum  WindowSurfaceFeature { PartialUpdates = 0x00000001, PreservedContents = 0x00000002, StaticContents = 0x00000004, AllFeatures = 0xffffffff }
 
- Protected Functions inherited from QWindowSurface
bool hasStaticContents () const
 

Detailed Description

Definition at line 112 of file qgraphicssystem_runtime_p.h.

Constructors and Destructors

◆ QRuntimeWindowSurface()

QRuntimeWindowSurface::QRuntimeWindowSurface ( const QRuntimeGraphicsSystem gs,
QWidget window 
)

Definition at line 254 of file qgraphicssystem_runtime.cpp.

255  : QWindowSurface(window), m_graphicsSystem(gs)
256 {
257 
258 }
const QRuntimeGraphicsSystem * m_graphicsSystem
QWindowSurface(QWidget *window, bool setDefaultSurface=true)
Constructs an empty surface for the given top-level window.

◆ ~QRuntimeWindowSurface()

QRuntimeWindowSurface::~QRuntimeWindowSurface ( )

Definition at line 260 of file qgraphicssystem_runtime.cpp.

261 {
264 }
const QRuntimeGraphicsSystem * m_graphicsSystem
static QGraphicsSystem * graphics_system
void removeWindowSurface(QRuntimeWindowSurface *windowSurface) const

Functions

◆ beginPaint()

void QRuntimeWindowSurface::beginPaint ( const QRegion region)
virtual

This function is called before painting onto the surface begins, with the region in which the painting will occur.

See also
endPaint(), paintDevice()

Reimplemented from QWindowSurface.

Definition at line 297 of file qgraphicssystem_runtime.cpp.

298 {
300 }
virtual void beginPaint(const QRegion &)
This function is called before painting onto the surface begins, with the region in which the paintin...
QScopedPointer< QWindowSurface > m_windowSurface

◆ buffer()

QImage * QRuntimeWindowSurface::buffer ( const QWidget widget)
virtual

Returns a QImage pointer which represents the actual buffer the widget is drawn into or 0 if this is unavailable.

You must call beginPaint() before you call this function and the returned pointer is only valid until endPaint() is called.

Reimplemented from QWindowSurface.

Definition at line 307 of file qgraphicssystem_runtime.cpp.

308 {
309  return m_windowSurface->buffer(widget);
310 }
virtual QImage * buffer(const QWidget *widget)
Returns a QImage pointer which represents the actual buffer the widget is drawn into or 0 if this is ...
QScopedPointer< QWindowSurface > m_windowSurface

◆ endPaint()

void QRuntimeWindowSurface::endPaint ( const QRegion region)
virtual

This function is called after painting onto the surface has ended, with the region in which the painting was performed.

See also
beginPaint(), paintDevice()

Reimplemented from QWindowSurface.

Definition at line 302 of file qgraphicssystem_runtime.cpp.

303 {
305 }
virtual void endPaint(const QRegion &)
This function is called after painting onto the surface has ended, with the region in which the paint...
QScopedPointer< QWindowSurface > m_windowSurface

◆ features()

QWindowSurface::WindowSurfaceFeatures QRuntimeWindowSurface::features ( ) const
virtual

Reimplemented from QWindowSurface.

Definition at line 322 of file qgraphicssystem_runtime.cpp.

323 {
324  return m_windowSurface->features();
325 }
virtual WindowSurfaceFeatures features() const
QScopedPointer< QWindowSurface > m_windowSurface

◆ flush()

void QRuntimeWindowSurface::flush ( QWidget widget,
const QRegion region,
const QPoint offset 
)
virtual

Flushes the given region from the specified widget onto the screen.

Note that the offset parameter is currently unused.

Implements QWindowSurface.

Definition at line 271 of file qgraphicssystem_runtime.cpp.

273 {
274  m_windowSurface->flush(widget, region, offset);
275 
276  int destroyPolicy = m_graphicsSystem->windowSurfaceDestroyPolicy();
279 #ifdef QT_DEBUG
280  qDebug() << "QRuntimeWindowSurface::flush() - destroy pending window surface";
281 #endif
283  }
284 }
QScopedPointer< QWindowSurface > m_pendingWindowSurface
const QRuntimeGraphicsSystem * m_graphicsSystem
Q_CORE_EXPORT void qDebug(const char *,...)
virtual void flush(QWidget *widget, const QRegion &region, const QPoint &offset)=0
Flushes the given region from the specified widget onto the screen.
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
QScopedPointer< QWindowSurface > m_windowSurface

◆ grabWidget()

QPixmap QRuntimeWindowSurface::grabWidget ( const QWidget widget,
const QRect rectangle = QRect() 
) const
virtual

Returns a QPixmap generated from the part of the backing store corresponding to widget.

Returns a null QPixmap if an error occurs. The contents of the pixmap are only defined for the regions of widget that have received paint events since the last resize of the backing store.

If rectangle is a null rectangle (the default), the entire widget is grabbed. Otherwise, the grabbed area is limited to rectangle.

The default implementation uses QWindowSurface::buffer().

See also
QPixmap::grabWidget()

Reimplemented from QWindowSurface.

Definition at line 312 of file qgraphicssystem_runtime.cpp.

313 {
314  return m_windowSurface->grabWidget(widget, rectangle);
315 }
virtual QPixmap grabWidget(const QWidget *widget, const QRect &rectangle=QRect()) const
Returns a QPixmap generated from the part of the backing store corresponding to widget.
QScopedPointer< QWindowSurface > m_windowSurface

◆ offset()

QPoint QRuntimeWindowSurface::offset ( const QWidget widget) const
virtual

Returns the offset of widget in the coordinates of this window surface.

Reimplemented from QWindowSurface.

Definition at line 317 of file qgraphicssystem_runtime.cpp.

318 {
319  return m_windowSurface->offset(widget);
320 }
virtual QPoint offset(const QWidget *widget) const
Returns the offset of widget in the coordinates of this window surface.
QScopedPointer< QWindowSurface > m_windowSurface

◆ paintDevice()

QPaintDevice * QRuntimeWindowSurface::paintDevice ( )
virtual

Implement this function to return the appropriate paint device.

Implements QWindowSurface.

Definition at line 266 of file qgraphicssystem_runtime.cpp.

267 {
268  return m_windowSurface->paintDevice();
269 }
QScopedPointer< QWindowSurface > m_windowSurface
virtual QPaintDevice * paintDevice()=0
Implement this function to return the appropriate paint device.

◆ scroll()

bool QRuntimeWindowSurface::scroll ( const QRegion area,
int  dx,
int  dy 
)
virtual

Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.

Returns true if the area was scrolled successfully; false otherwise.

Reimplemented from QWindowSurface.

Definition at line 292 of file qgraphicssystem_runtime.cpp.

293 {
294  return m_windowSurface->scroll(area, dx, dy);
295 }
QScopedPointer< QWindowSurface > m_windowSurface
virtual bool scroll(const QRegion &area, int dx, int dy)
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative...

◆ setGeometry()

void QRuntimeWindowSurface::setGeometry ( const QRect rect)
virtual

Sets the currently allocated area to be the given rect.

This function is called whenever area covered by the top-level window changes.

See also
geometry()

Reimplemented from QWindowSurface.

Definition at line 286 of file qgraphicssystem_runtime.cpp.

287 {
290 }
virtual void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
QScopedPointer< QWindowSurface > m_windowSurface

Properties

◆ m_graphicsSystem

const QRuntimeGraphicsSystem* QRuntimeWindowSurface::m_graphicsSystem
private

Definition at line 138 of file qgraphicssystem_runtime_p.h.

Referenced by flush(), and ~QRuntimeWindowSurface().

◆ m_pendingWindowSurface

QScopedPointer<QWindowSurface> QRuntimeWindowSurface::m_pendingWindowSurface

◆ m_windowSurface

QScopedPointer<QWindowSurface> QRuntimeWindowSurface::m_windowSurface

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