Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QDirectPainter class provides direct access to the video hardware. More...
#include <QDirectPainter>
Inherits QObject.
The QDirectPainter class provides direct access to the video hardware.
When the hardware is known and well defined, as is often the case with software for embedded devices, it may be useful to manipulate the underlying video hardware directly. Note that this functionality is only available in Qtopia Core.
Access to the video hardware is provided by the frameBuffer() function which returns a pointer to the beginning of the display memory. In order to access the video hardware in a way that is co-operative with other applications, a region of the screen must be reserved for the application, QDirectPainter provides the necessary functionality: The reserveRegion() function attempts to reserve the given region and returns the region actually reserved. The reserved region can also be retrieved using the region() function.
Depending on the hardware, it might be necessary to lock the video hardware for exclusive use while writing to it. This is possible using the lock() and unlock() functions. Note that calling lock() will prevent all other applications from working until unlock() is called.
In addition, QDirectPainter provides several functions returning information about the framebuffer as well as the screen: the linestep() function returns the length (in bytes) of each scanline of the framebuffer while the screenDepth(), screenWidth() and screenHeight() function return the screen metrics.
See also QScreen and QDecoration.
Returns a pointer to the beginning of the display memory.
Note that it is the applications responsibility to limit itself to modifying only the reserved region.
See also region() and linestep().
Returns the length (in bytes) of each scanline of the framebuffer.
See also frameBuffer().
Locks access to the video hardware.
Note that calling this function will prevent all other applications from working until unlock() is called.
See also unlock().
Returns the reserved region.
See also reserveRegion() and frameBuffer().
Attempts to reserve the given region, and returns the region that is actually reserved.
This function also releases the previously reserved region if any. If not released explicitly, the region will be released on application exit.
See also region().
Returns the bit depth of the display.
See also screenHeight() and screenWidth().
Returns the height of the display in pixels.
See also screenWidth() and screenDepth().
Returns the width of the display in pixels.
See also screenHeight() and screenDepth().
Unlocks the lock on the video hardware (set by the lock() function), allowing other applications to access the screen.
See also lock().
Copyright © 2006 Trolltech | Trademarks | Qt 4.1.3 |