The QScreen 类是用于 Qt for Embedded Linux 屏幕驱动程序的基类。 更多...
| 头: | #include <QScreen> |
| 继承者: | QProxyScreen |
| enum | ClassId { LinuxFBClass, TransformedClass, VNCClass, MultiClass, ..., CustomClass } |
| enum | PixelType { NormalPixel, BGRPixel } |
| QScreen (int display_id , ClassId classId ) | |
| QScreen (int displayId ) | |
| virtual | ~QScreen () |
| virtual int | alloc (unsigned int red , unsigned int green , unsigned int blue ) |
| uchar * | base () const |
| virtual void | blank (bool on ) |
| virtual void | blit (const QImage & image , const QPoint & topLeft , const QRegion & region ) |
| ClassId | classId () const |
| QRgb * | clut () |
| int | colorCount () |
| virtual bool | connect (const QString & displaySpec ) = 0 |
| virtual QWSWindowSurface * | createSurface (const QString & key ) const |
| virtual QWSWindowSurface * | createSurface (QWidget * widget ) const |
| int | depth () const |
| int | deviceHeight () const |
| int | deviceWidth () const |
| virtual void | disconnect () = 0 |
| virtual void | exposeRegion (QRegion region , int windowIndex ) |
| int | height () const |
| virtual bool | initDevice () = 0 |
| virtual bool | isInterlaced () const |
| virtual bool | isTransformed () const |
| int | linestep () const |
| virtual QSize | mapFromDevice (const QSize & size ) const |
| virtual QPoint | mapFromDevice (const QPoint & point , const QSize & screenSize ) const |
| virtual QRect | mapFromDevice (const QRect & rectangle , const QSize & screenSize ) const |
| virtual QImage | mapFromDevice (const QImage & image ) const |
| virtual QRegion | mapFromDevice (const QRegion & region , const QSize & screenSize ) const |
| virtual QSize | mapToDevice (const QSize & size ) const |
| virtual QPoint | mapToDevice (const QPoint & point , const QSize & screenSize ) const |
| virtual QRect | mapToDevice (const QRect & rectangle , const QSize & screenSize ) const |
| virtual QImage | mapToDevice (const QImage & image ) const |
| virtual QRegion | mapToDevice (const QRegion & region , const QSize & screenSize ) const |
| QPoint | offset () const |
| virtual bool | onCard (const unsigned char * buffer ) const |
| virtual bool | onCard (const unsigned char * buffer , ulong & offset ) const |
| int | physicalHeight () const |
| int | physicalWidth () const |
| QImage::Format | pixelFormat () const |
| PixelType | pixelType () const |
| virtual int | pixmapDepth () const |
| virtual int | pixmapLinestepAlignment () |
| virtual int | pixmapOffsetAlignment () |
| virtual QRegion | region () const |
| virtual void | restore () |
| virtual void | save () |
| int | screenSize () const |
| virtual void | setDirty (const QRect & rectangle ) |
| virtual void | setMode (int width , int height , int depth ) = 0 |
| virtual void | shutdownDevice () |
| virtual void | solidFill (const QColor & color , const QRegion & region ) |
| int | subScreenIndexAt (const QPoint & position ) const |
| virtual QList<QScreen *> | subScreens () const |
| virtual bool | supportsDepth (int depth ) const |
| int | totalSize () const |
| virtual int | transformOrientation () const |
| int | width () const |
| QScreen * | instance () |
| void | setPixelFormat (QImage::Format format ) |
| int | d |
| uchar * | data |
| int | dh |
| int | dw |
| bool | grayscale |
| int | h |
| int | lstep |
| int | mapsize |
| int | physHeight |
| int | physWidth |
| PixelType | pixeltype |
| QRgb | screenclut [256] |
| int | screencols |
| int | size |
| int | w |
| void | setTransformation (int transformation , int screenNo = -1) |
The QScreen 类是用于 Qt for Embedded Linux 屏幕驱动程序的基类。
注意,此类只可用于 Qt for Embedded Linux .
Qt for Embedded Linux provides ready-made drivers for several screen protocols, see the display management documentation for details. Custom screen drivers can be implemented by subclassing the QScreen class and creating a screen driver plugin (derived from QScreenDriverPlugin ). The default implementation of the QScreenDriverFactory class will automatically detect the plugin, and load the driver into the server application at run-time using Qt's plugin system .
When rendering, the default behavior is for each client to render its widgets as well as its decorations into memory, while the server copies the memory content to the device's framebuffer using the screen driver. See the Qt for Embedded Linux 体系结构 overview for details (note that it is possible for the clients to manipulate and control the underlying hardware directly as well).
Starting with Qt 4.2, it is also possible to add an accelerated graphics driver to take advantage of available hardware resources. See the Adding an Accelerated Graphics Driver to Qt for Embedded Linux 文档编制了解细节。
当 Qt for Embedded Linux application starts running, it calls the screen driver's connect () function to map the framebuffer and the accelerated drivers that the graphics card control registers. The connect () function should then read out the parameters of the framebuffer and use them as required to set this class's protected variables.
The initDevice () function can be reimplemented to initialize the graphics card. Note, however, that connect () is called before the initDevice () function, so, for some hardware configurations, some of the initialization that would normally be done in the initDevice () function might have to be done in the connect () 函数。
Likewise, just before a Qt for Embedded Linux application exits, it calls the screen driver's disconnect () function. The server application will in addition call the shutdownDevice () function before it calls disconnect (). Note that the default implementation of the shutdownDevice () function only hides the mouse cursor.
QScreen 还提供 save () 和 restore () functions, making it possible to save and restore the state of the graphics card. Note that the default implementations do nothing. Hardware screen drivers should reimplement these functions to save (and restore) its registers, enabling switching between virtual consoles.
In addition, you can use the base () function to retrieve a pointer to the beginning of the framebuffer, and the region () function to retrieve the framebuffer's region. Use the onCard () function to determine whether the framebuffer is within the graphics card's memory, and the totalSize () function to determine the size of the available graphics card memory (including the screen). Finally, you can use the offset () function to retrieve the offset between the framebuffer's coordinates and the application's coordinate system.
QScreen provides several functions to retrieve information about the color palette: The clut () function returns a pointer to the color lookup table (i.e. its color palette). Use the colorCount () function to determine the number of entries in this table, and the alloc () function to retrieve the palette index of the color that is the closest match to a given RGB value.
To determine if the screen driver supports a given color depth, use the supportsDepth () function that returns true of the specified depth is supported.
When a screen update is required, the Qt for Embedded Linux server runs through all the top-level windows that intersect with the region that is about to be updated, and ensures that the associated clients have updated their memory buffer. Then the server calls the exposeRegion () function that composes the window surfaces and copies the content of memory to screen by calling the blit () 和 solidFill () 函数。
The blit () function copies a given region in a given image to a specified point using device coordinates, while the solidFill () function fills the given region of the screen with the specified color. Note that normally there is no need to call either of these functions explicitly.
此外, QScreen 提供 blank () function that can be reimplemented to prevent any contents from being displayed on the screen, and the setDirty () function that can be reimplemented to indicate that a given rectangle of the screen has been altered. Note that the default implementations of these functions do nothing.
重实现 mapFromDevice () 和 mapToDevice () functions to map objects from the framebuffer coordinate system to the coordinate space used by the application, and vice versa. Be aware that the default implementations simply return the given objects as they are.
| 特性 | 函数 |
|---|---|
| Size |
The size of the screen can be retrieved using the
screenSize
() function. The size is returned in bytes.
The framebuffer's logical width and height can be retrieved using width () 和 height (), respectively. These functions return values are given in pixels. Alternatively, the physicalWidth () 和 physicalHeight () function returns the same metrics in millimeters. QScreen 还提供 deviceWidth () 和 deviceHeight () functions returning the physical width and height of the device in pixels. Note that the latter metrics can differ from the ones used if the display is centered within the framebuffer. |
| Resolution |
重实现
setMode
() function to be able to set the framebuffer to a new resolution (width and height) and bit depth.
The current depth of the framebuffer can be always be retrieved using the depth () 函数。使用 pixmapDepth () function to obtain the preferred depth for pixmaps. |
| 像素图对齐 |
使用
pixmapOffsetAlignment
() function to retrieve the value to which the start address of pixmaps held in the graphics card's memory, should be aligned.
使用 pixmapLinestepAlignment () to retrieve the value to which the individual scanlines of pixmaps should be aligned. |
| 图像显示 | The isInterlaced () function tells whether the screen is displaying images progressively, and the isTransformed () function whether it is rotated. The transformOrientation () function can be reimplemented to return the current rotation. |
| 扫描线 | 使用 linestep () function to retrieve the length of each scanline of the framebuffer. |
| 像素类型 | The pixelType () function returns the screen's pixel storage format as described by the PixelType 枚举。 |
You need to set the following members when implementing a subclass of QScreen :
| 成员 | 初始值 |
|---|---|
| data | A pointer to the framebuffer if possible; 0 otherwise. |
| lstep | The number of bytes between each scanline in the framebuffer. |
| w | 逻辑屏幕宽度 (以像素为单位)。 |
| h | 逻辑屏幕高度 (以像素为单位)。 |
| dw | 真实屏幕宽度 (以像素为单位)。 |
| dh | 真实屏幕高度 (以像素为单位)。 |
| d | The number of bits per pixel. |
| physWidth | 屏幕宽度 (以毫米为单位)。 |
| physHeight | 屏幕高度 (以毫米为单位)。 |
The logical screen values are the same as the real screen values unless the screen is transformed in some way; e.g., rotated.
另请参阅 加速图形驱动程序范例 for an example that shows how to initialize these values.
另请参阅 QScreenDriverPlugin , QScreenDriverFactory ,和 Qt for Embedded Linux 显示管理 .
This enum defines the class identifiers for the known screen subclasses.
| 常量 | 值 | 描述 |
|---|---|---|
QScreen::LinuxFBClass
|
0
|
QLinuxFBScreen |
QScreen::TransformedClass
|
1
|
QTransformedScreen |
QScreen::VNCClass
|
2
|
QVNCScreen |
QScreen::MultiClass
|
3
|
QMultiScreen |
QScreen::VFbClass
|
4
|
QVFbScreen |
QScreen::DirectFBClass
|
5
|
QDirectFBScreen |
QScreen::SvgalibClass
|
6
|
QSvgalibScreen |
QScreen::ProxyClass
|
7
|
QProxyScreen |
QScreen::GLClass
|
8
|
QGLScreen |
QScreen::IntfbClass
|
9
|
QIntfbScreen |
QScreen::CustomClass
|
1024
|
未知 QScreen 子类 |
另请参阅 classId ().
This enum describes the pixel storage format of the screen, i.e. the order of the red (R), green (G) and blue (B) components of a pixel.
| 常量 | 值 | 描述 |
|---|---|---|
QScreen::NormalPixel
|
0
|
Red-green-blue (RGB) |
QScreen::BGRPixel
|
1
|
Blue-green-red (BGR) |
另请参阅 pixelType ().
Constructs a new screen driver.
The display_id identifies the Qt for Embedded Linux server to connect to. The classId specifies the class identifier.
该函数在 Qt 4.4 引入。
Constructs a new screen driver.
The displayId identifies the Qt for Embedded Linux server to connect to.
[虚拟]
QScreen::
~QScreen
()
Destroys this screen driver.
[虚拟]
int
QScreen::
alloc
(
unsigned
int
red
,
unsigned
int
green
,
unsigned
int
blue
)
Returns the index in the screen's palette which is the closest match to the given RGB value ( red , green , blue ).
Note that this function only apply in paletted modes like 8-bit, i.e. in modes where only the palette indexes (and not the actual color values) are stored in memory.
另请参阅 clut () 和 colorCount ().
Returns a pointer to the beginning of the framebuffer.
另请参阅 onCard (), region (),和 totalSize ().
[虚拟]
void
QScreen::
blank
(
bool
on
)
Prevents the screen driver form displaying any content on the screen.
Note that the default implementation does nothing.
Reimplement this function to prevent the screen driver from displaying any contents on the screen if on is true; otherwise the contents is expected to be shown.
另请参阅 blit ().
[虚拟]
void
QScreen::
blit
(const
QImage
&
image
, const
QPoint
&
topLeft
, const
QRegion
&
region
)
拷贝给定 region 以给定 image to the point specified by topLeft using device coordinates.
此函数被调用从 exposeRegion () function; it is not intended to be called explicitly.
Reimplement this function to make use of accelerated hardware . Note that this function must be reimplemented if the framebuffer format is not supported by Qt for Embedded Linux (See the Display Management 文档编制了解更多细节)。
另请参阅 exposeRegion (), solidFill (),和 blank ().
返回屏幕对象的类标识符。
该函数在 Qt 4.4 引入。
Returns a pointer to the screen's color lookup table (i.e. its color palette).
Note that this function only apply in paletted modes like 8-bit, i.e. in modes where only the palette indexes (and not the actual color values) are stored in memory.
另请参阅 alloc (), depth (),和 colorCount ().
Returns the number of entries in the screen's color lookup table (i.e. its color palette). A pointer to the color table can be retrieved using the clut () 函数。
该函数在 Qt 4.6 引入。
[pure virtual]
bool
QScreen::
connect
(const
QString
&
displaySpec
)
此函数被调用通过各 Qt for Embedded Linux application on startup, and must be implemented to map in the framebuffer and the accelerated drivers that the graphics card control registers. Note that connect must be called before the initDevice () 函数。
Ensure that true is returned if a connection to the screen device is made. Otherwise, return false. Upon making the connection, the function should read out the parameters of the framebuffer and use them as required to set this class's protected variables.
The displaySpec argument is passed by the QWS_DISPLAY environment variable or the -display command line parameter, and has the following syntax:
[screen driver][:driver specific options][:display number]
For example, to use the mach64 driver on fb1 as display 2:
Mach64:/dev/fb1:2
见 Qt for Embedded Linux 显示管理 了解更多细节。
另请参阅 disconnect (), initDevice (),和 Running Qt for Embedded Linux Applications .
[虚拟]
QWSWindowSurface
* QScreen::
createSurface
(const
QString
&
key
) const
Creates and returns a new window surface matching the given key .
The server application will call this function whenever it needs to create a server side representation of a window, e.g. when copying the content of memory to the screen using the screen driver.
Note that this function must be reimplemented when adding an accelerated graphics driver. See the Adding an Accelerated Graphics Driver 文档编制了解细节。
该函数在 Qt 4.2 引入。
另请参阅 Qt for Embedded Linux 体系结构 .
[虚拟]
QWSWindowSurface
* QScreen::
createSurface
(
QWidget
*
widget
) const
这是重载函数。
Creates and returns a new window surface for the given widget .
Returns the depth of the framebuffer, in bits per pixel.
Note that the returned depth is the number of bits each pixel fills rather than the number of significant bits, so 24bpp and 32bpp express the same range of colors (8 bits of red, green and blue).
另请参阅 clut () 和 pixmapDepth ().
Returns the full height of the framebuffer device in pixels.
Note that the returned height can differ from the height which Qt for Embedded Linux will actually use, that is if the display is centered within the framebuffer.
另请参阅 height (), physicalHeight (),和 deviceWidth ().
Returns the physical width of the framebuffer device in pixels.
Note that the returned width can differ from the width which Qt for Embedded Linux will actually use, that is if the display is centered within the framebuffer.
另请参阅 width (), physicalWidth (),和 deviceHeight ().
[pure virtual]
void
QScreen::
disconnect
()
此函数被调用通过各 Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer. Note that a server application will call the shutdownDevice () function prior to this function.
另请参阅 connect (), shutdownDevice (),和 Running Qt for Embedded Linux Applications .
[虚拟]
void
QScreen::
exposeRegion
(
QRegion
region
,
int
windowIndex
)
此函数被调用通过 Qt for Embedded Linux server whenever a screen update is required. region is the area on the screen that must be updated, and windowIndex is the index into QWSServer::clientWindows () of the window that required the update. QWSWindow::state () gives more information about the cause.
The default implementation composes the affected windows and paints the given region on screen by calling the blit () 和 solidFill () 函数
This function can be reimplemented to perform composition in hardware, or to perform transition effects. For simpler hardware acceleration, or to interface with this is typically done by reimplementing the blit () 和 solidFill () functions instead.
注意,不需要明确调用此函数。
另请参阅 blit (), solidFill (),和 blank ().
Returns the logical height of the framebuffer in pixels.
另请参阅 deviceHeight (), physicalHeight (),和 width ().
[pure virtual]
bool
QScreen::
initDevice
()
此函数被调用通过 Qt for Embedded Linux server to initialize the framebuffer. Note that a server application will call the connect () function prior to this function.
Implement this function to make accelerated drivers set up the graphics card. Return true to indicate success and false to indicate failure.
另请参阅 shutdownDevice () 和 connect ().
[static]
QScreen
* QScreen::
instance
()
返回指针指向应用程序的 QScreen 实例。
If this screen consists of several subscreens, operations to the returned instance will affect all its subscreens. Use the subscreens() function to retrieve access to a particular subscreen.
另请参阅 subScreens () 和 subScreenIndexAt ().
[虚拟]
bool
QScreen::
isInterlaced
() const
Returns true if the display is interlaced (i.e. is displaying images progressively like a television screen); otherwise returns false.
If the display is interlaced, the drawing is altered to look better.
另请参阅 isTransformed () 和 linestep ().
[虚拟]
bool
QScreen::
isTransformed
() const
Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false.
另请参阅 transformOrientation () 和 isInterlaced ().
Returns the length of each scanline of the framebuffer in bytes.
另请参阅 isInterlaced ().
[虚拟]
QSize
QScreen::
mapFromDevice
(const
QSize
&
size
) const
Maps the given size from the framebuffer coordinate system to the coordinate space used by the application. Note that the default implementation simply returns the given size as it is.
Reimplement this function to use the given device's coordinate system when mapping.
另请参阅 mapToDevice ().
[虚拟]
QPoint
QScreen::
mapFromDevice
(const
QPoint
&
point
, const
QSize
&
screenSize
) const
这是重载函数。
Maps the given point from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. Note that the default implementation simply returns the given point as it is.
[虚拟]
QRect
QScreen::
mapFromDevice
(const
QRect
&
rectangle
, const
QSize
&
screenSize
) const
这是重载函数。
Maps the given rectangle from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. Note that the default implementation simply returns the given rectangle as it is.
[虚拟]
QImage
QScreen::
mapFromDevice
(const
QImage
&
image
) const
这是重载函数。
Maps the given image from the framebuffer coordinate system to the coordinate space used by the application. Note that the default implementation simply returns the given image as it is.
[虚拟]
QRegion
QScreen::
mapFromDevice
(const
QRegion
&
region
, const
QSize
&
screenSize
) const
这是重载函数。
Maps the given region from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. Note that the default implementation simply returns the given region as it is.
[虚拟]
QSize
QScreen::
mapToDevice
(const
QSize
&
size
) const
Maps the given size from the coordinate space used by the application to the framebuffer coordinate system. Note that the default implementation simply returns the given size as it is.
Reimplement this function to use the given device's coordinate system when mapping.
另请参阅 mapFromDevice ().
[虚拟]
QPoint
QScreen::
mapToDevice
(const
QPoint
&
point
, const
QSize
&
screenSize
) const
这是重载函数。
Maps the given point from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. Note that the default implementation returns the given point as it is.
[虚拟]
QRect
QScreen::
mapToDevice
(const
QRect
&
rectangle
, const
QSize
&
screenSize
) const
这是重载函数。
Maps the given rectangle from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. Note that the default implementation returns the given rectangle as it is.
[虚拟]
QImage
QScreen::
mapToDevice
(const
QImage
&
image
) const
这是重载函数。
Maps the given image from the coordinate space used by the application to the framebuffer coordinate system. Note that the default implementation returns the given image as it is.
[虚拟]
QRegion
QScreen::
mapToDevice
(const
QRegion
&
region
, const
QSize
&
screenSize
) const
这是重载函数。
Maps the given region from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. Note that the default implementation returns the given region as it is.
Returns the logical offset of the screen, i.e., the offset between (0,0) in screen coordinates and the application coordinate system.
该函数在 Qt 4.2 引入。
[虚拟]
bool
QScreen::
onCard
(const
unsigned
char
*
buffer
) const
返回 true 若指定 buffer is within the graphics card's memory; otherwise returns false (i.e. if it's in main RAM).
[虚拟]
bool
QScreen::
onCard
(const
unsigned
char
*
buffer
,
ulong
&
offset
) const
这是重载函数。
若指定 buffer is within the graphics card's memory, this function stores the offset from the start of graphics card memory (in bytes), in the location specified by the offset 参数。
Returns the physical height of the screen in millimeters.
该函数在 Qt 4.2 引入。
另请参阅 height (), deviceHeight (),和 physicalWidth ().
Returns the physical width of the screen in millimeters.
该函数在 Qt 4.2 引入。
另请参阅 width (), deviceWidth (),和 physicalHeight ().
Returns the pixel format of the screen, or
QImage::Format_Invalid
if the pixel format is not a supported image format.
另请参阅 setPixelFormat ().
Returns the pixel storage format of the screen.
[虚拟]
int
QScreen::
pixmapDepth
() const
Returns the preferred depth for pixmaps, in bits per pixel.
另请参阅 depth ().
[虚拟]
int
QScreen::
pixmapLinestepAlignment
()
Returns the value (in bits) to which individual scanlines of pixmaps held in the graphics card's memory, should be aligned.
Note that the default implementation returns 64; reimplement this function to override the return value, e.g., when implementing an accelerated driver (see the Adding an Accelerated Graphics Driver documentation for details).
另请参阅 pixmapOffsetAlignment ().
[虚拟]
int
QScreen::
pixmapOffsetAlignment
()
Returns the value (in bits) to which the start address of pixmaps held in the graphics card's memory, should be aligned.
Note that the default implementation returns 64; reimplement this function to override the return value, e.g., when implementing an accelerated driver (see the Adding an Accelerated Graphics Driver documentation for details).
另请参阅 pixmapLinestepAlignment ().
[虚拟]
QRegion
QScreen::
region
() const
Returns the region covered by this screen driver.
该函数在 Qt 4.2 引入。
另请参阅 base () 和 screenSize ().
[虚拟]
void
QScreen::
restore
()
Restores the previously saved state of the graphics card.
For example, hardware screen drivers should reimplement the save () and restore() functions to save and restore its registers, enabling swintching between virtual consoles.
Note that the default implementation does nothing.
另请参阅 save ().
[虚拟]
void
QScreen::
save
()
Saves the current state of the graphics card.
For example, hardware screen drivers should reimplement the save() and restore () functions to save and restore its registers, enabling swintching between virtual consoles.
Note that the default implementation does nothing.
另请参阅 restore ().
Returns the size of the screen in bytes.
The screen size is always located at the beginning of framebuffer memory, i.e. it can also be retrieved using the base () 函数。
[虚拟]
void
QScreen::
setDirty
(const
QRect
&
rectangle
)
标记给定 rectangle as dirty.
Note that the default implementation does nothing; reimplement this function to indicate that the given rectangle has been altered.
[pure virtual]
void
QScreen::
setMode
(
int
width
,
int
height
,
int
depth
)
Implement this function to reset the framebuffer's resolution ( width and height ) and bit depth .
After the resolution has been set, existing paint engines will be invalid and the framebuffer should be completely redrawn. In a multiple-process situation, all other applications must be notified to reset their mode and update themselves accordingly.
[protected]
void
QScreen::
setPixelFormat
(
QImage::Format
format
)
Sets the screen's pixel format to format .
另请参阅 pixelFormat ().
[虚拟]
void
QScreen::
shutdownDevice
()
此函数被调用通过 Qt for Embedded Linux server before it calls the disconnect () function when exiting.
Note that the default implementation only hides the mouse cursor; reimplement this function to do the necessary graphics card specific cleanup.
另请参阅 initDevice () 和 disconnect ().
[虚拟]
void
QScreen::
solidFill
(const
QColor
&
color
, const
QRegion
&
region
)
填充给定 region of the screen with the specified color .
此函数被调用从 exposeRegion () function; it is not intended to be called explicitly.
Reimplement this function to make use of accelerated hardware . Note that this function must be reimplemented if the framebuffer format is not supported by Qt for Embedded Linux (See the Display Management 文档编制了解更多细节)。
另请参阅 exposeRegion (), blit (),和 blank ().
Returns the index of the subscreen at the given position ; returns -1 if no screen is found.
The index identifies the subscreen in the list of pointers returned by the subScreens () 函数。
该函数在 Qt 4.2 引入。
另请参阅 instance () 和 subScreens ().
[虚拟]
QList
<
QScreen
*> QScreen::
subScreens
() const
Returns a list of this screen's subscreens. Use the subScreenIndexAt () function to retrieve the index of a screen at a given position.
注意,若 this screen consists of several subscreens, operations to this instance will affect all subscreens by default.
该函数在 Qt 4.2 引入。
另请参阅 instance () 和 subScreenIndexAt ().
[虚拟]
bool
QScreen::
supportsDepth
(
int
depth
) const
Returns true if the screen supports the specified color depth ;否则返回 false。
另请参阅 clut ().
Returns the size of the available graphics card memory (including the screen) in bytes.
另请参阅 onCard ().
[虚拟]
int
QScreen::
transformOrientation
() const
Returns the current rotation as an integer value.
Note that the default implementation returns 0; reimplement this function to override this value.
另请参阅 isTransformed ().
Returns the logical width of the framebuffer in pixels.
另请参阅 deviceWidth (), physicalWidth (),和 height ().
This variable holds the pixel depth.
This is the number of significant bits used to set a pixel color. This variable must be initialized by a subclass.
This variable holds points to the first visible pixel in the frame buffer.
You must initialize this variable if you are using the default implementation of non-buffered painting Qt::WA_PaintOnScreen , QPixmap::grabWindow () 或 QDirectPainter::frameBuffer (). If you initialize this variable, you must also initialize QScreen::size and QScreen::mapsize .
另请参阅 QScreen::size and QScreen::mapsize .
This variable holds the device height.
This is the number of pixels in a column of the physical screen. It must be initialized by a subclass. Normally, it should be set to the logical height QScreen::h , but it might be different, e.g., if you are doing rotations in software.
另请参阅 QScreen::h .
This variable holds the device width.
This is the number of pixels in a row of the physical screen. It must be initialized by a subclass. Normally, it should be set to the logical width QScreen::w , but it might be different, e.g., if you are doing rotations in software.
另请参阅 QScreen::w .
This variable holds the gray scale screen mode flag.
Set this variable to true in a subclass, if you are using a grayscale screen mode. e.g., in an 8-bit mode where you don't want to use the palette, but you want to use the grayscales.
This variable holds the logical height of the screen.
This variable must be initialized by a subclass.
This variable holds the number of bytes representing a line in the frame buffer.
i.e.,
line step
.
data[lstep * 2]
is the address of the first visible pixel in the third line of the frame buffer.
另请参阅 data .
This variable holds the total number of bytes in the frame buffer.
This is the total number of bytes in the block pointed to by the QScreen::data pointer. You must initialize this variable if you initialize the QScreen::data 指针。
另请参阅 QScreen::data and QScreen::size .
This variable holds the physical height of the screen in millimeters.
Currently, this variable is used when calculating the screen DPI, which in turn is used when deciding the actual font size Qt is using.
This variable holds the physical width of the screen in millimeters.
Currently, this variable is used when calculating the screen DPI, which in turn is used when deciding the actual font size Qt is using.
This variable holds set to BGRPixel.
Set this variable to BGRPixel in a subclass, if the screen pixel format is a BGR type and you have used setPixelFormat () to set the pixel format to the corresponding RGB format. e.g., you have set the pixel format to QImage::Format_RGB555 , but your screen really uses BGR, not RGB.
This variable holds the color table.
Initialize this variable in a subclass using a paletted screen mode, and initialize its partner, QScreen::screencols .
另请参阅 screencols .
This variable holds the number of entries in the color table.
Initialize this variable in a subclass using a paletted screen mode, and initialize its partner, QScreen::screenclut .
另请参阅 screenclut .
This variable holds the number of bytes in the visible region of the frame buffer.
This is the number of bytes in the visible part of the block pointed to by the QScreen::data pointer. You must initialize this variable if you initialize the QScreen::data 指针。
另请参阅 QScreen::data and QScreen::mapsize .
This variable holds the logical width of the screen.
This variable must be initialized by a subclass.
[static]
void
QWSDisplay::
setTransformation
(
int
transformation
,
int
screenNo
= -1)
Here it is. transformation and screenNo