![]() |
Home · All Classes · Main Classes · Grouped Classes · Modules · Functions | ![]() |
The QDirectPainter class provides direct access to the video hardware. More...
#include <QDirectPainter>
This class is under development and is subject to change.
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 reservedRegion() 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.
Constructs a QDirectPainter with parent parent and flag flags.
Destroys the object.
The reserved region will be released.
Returns the region allocated to this QDirectPainter.
This function was introduced in Qt 4.2.
This function was introduced in Qt 4.2.
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 reservedRegion() and linestep().
Returns the bounding rect of the requested region.
This function was introduced in Qt 4.2.
See also setGeometry() and requestedRegion().
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().
This function was introduced in Qt 4.2.
This function was introduced in Qt 4.2.
This function is called whenever the allocated region changes.
This function was introduced in Qt 4.2.
Returns the region requested by this QDirectPainter.
This function was introduced in Qt 4.2.
See also setRegion() and allocatedRegion().
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 reservedRegion().
Returns the reserved region.
This function was introduced in Qt 4.2.
See also reserveRegion() and frameBuffer().
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().
Request to reserve the rectangle rect of the screen.
The requested rectangle will be the maximum available rectangle for this object. The actually allocated region may be less, for instance if the rectangle overlaps with another QDirectPainter.
This function was introduced in Qt 4.2.
See also geometry(), allocatedRegion(), and setRegion().
Request to reserve the region region of the screen.
The requested region will be the maximum available region for this object. The actually allocated region may be less, for instance if the region overlaps with another QDirectPainter.
This function was introduced in Qt 4.2.
See also region().
This function was introduced in Qt 4.2.
Unlocks the lock on the video hardware (set by the lock() function), allowing other applications to access the screen.
See also lock().
Returns the window system identifier of the widget.
This function was introduced in Qt 4.2.
Copyright © 2006 Trolltech | Trademarks | Qt 4.2.1 |