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

#include <qvfbwindowsurface.h>

Inheritance diagram for QVFbWindowSurface:
QWindowSurface

Public Functions

void flush (QWidget *widget, const QRegion &region, const QPoint &offset)
 Flushes the given region from the specified widget onto the screen. More...
 
QPaintDevicepaintDevice ()
 Implement this function to return the appropriate paint device. More...
 
 QVFbWindowSurface (QVFbScreen *screen, QWidget *window)
 
void resize (const QSize &size)
 
 ~QVFbWindowSurface ()
 
- Public Functions inherited from QWindowSurface
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
 
QRect geometry () const
 Returns the currently allocated area on 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...
 
bool hasFeature (WindowSurfaceFeature feature) const
 
virtual QPoint offset (const QWidget *widget) const
 Returns the offset of widget in the coordinates of this window surface. More...
 
 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...
 
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...
 
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...
 

Properties

QVFbScreenmScreen
 

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 53 of file qvfbwindowsurface.h.

Constructors and Destructors

◆ QVFbWindowSurface()

QVFbWindowSurface::QVFbWindowSurface ( QVFbScreen screen,
QWidget window 
)

Definition at line 51 of file qvfbwindowsurface.cpp.

53  : QWindowSurface(window),
54  mScreen(screen)
55 {
56 }
QVFbScreen * mScreen
QWindowSurface(QWidget *window, bool setDefaultSurface=true)
Constructs an empty surface for the given top-level window.

◆ ~QVFbWindowSurface()

QVFbWindowSurface::~QVFbWindowSurface ( )

Definition at line 58 of file qvfbwindowsurface.cpp.

59 {
60 }

Functions

◆ flush()

void QVFbWindowSurface::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 67 of file qvfbwindowsurface.cpp.

68 {
69  Q_UNUSED(widget);
70  Q_UNUSED(offset);
71 
72 // QRect rect = geometry();
73 // QPoint topLeft = rect.topLeft();
74 
75  mScreen->setDirty(region.boundingRect());
76 }
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
QVFbScreen * mScreen
virtual void setDirty(const QRect &r)
Reimplemented Function
#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

◆ paintDevice()

QPaintDevice * QVFbWindowSurface::paintDevice ( )
virtual

Implement this function to return the appropriate paint device.

Implements QWindowSurface.

Definition at line 62 of file qvfbwindowsurface.cpp.

63 {
64  return mScreen->screenImage();
65 }
QImage * screenImage()
QVFbScreen * mScreen

◆ resize()

void QVFbWindowSurface::resize ( const QSize size)

Definition at line 78 of file qvfbwindowsurface.cpp.

79 {
80 
81 // any size you like as long as it's full-screen...
82 
84  QWindowSurface::resize(rect.size());
85 }
QRect rect(const QWidget *widget) const
Returns the rectangle for widget in the coordinates of this window surface.
virtual QRect availableGeometry() const
Reimplement in subclass to return the pixel geometry of the available space This normally is the desk...
QSize size() const
Returns the size of the rectangle.
Definition: qrect.h:309
QVFbScreen * mScreen
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58

Properties

◆ mScreen

QVFbScreen* QVFbWindowSurface::mScreen
private

Definition at line 64 of file qvfbwindowsurface.h.

Referenced by flush(), paintDevice(), and resize().


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