HomeHome

Classes - Annotated - Tree - Functions - Home - Structure Qte

QScreen Class Reference


The QScreen class abstracts the interface to the framebuffer. More...

#include <qgfx_qws.h>

List of all member functions.

Public Members


Detailed Description

The QScreen class abstracts the interface to the framebuffer.

Descendants of QScreen manage the framebuffer and palette and act as factories for the screen cursor and QGfx's. QLinuxFbScreen manages a Linux framebuffer; accelerated drivers subclass QLinuxFbScreen. There can only be one screen in a Qt/Embedded application.


Member Function Documentation

QScreen::QScreen ( int display_id )

Create a screen; the display_id is the number of the Qt/Embedded server to connect to.

QScreen::~QScreen () [virtual]

Destroys a QScreen.

int QScreen::alloc ( unsigned int r,unsigned int g,unsigned int b ) [virtual]

Given an RGB value, return an index which is the closest match to it in the screen's palette. Used in paletted modes only.

int QScreen::initCursor ( void * end_of_location, bool init=FALSE ) [virtual]

This is used to initialise the software cursor - end_of_location points to the address after the area where the cursor image can be stored. init is true for the first application this method is called from (the Qt/Embedded server), false otherwise.

bool QScreen::onCard ( unsigned char * p ) const [virtual]

Returns true if the buffer pointed to by p is within graphics card memory, false if it's in main RAM.

bool QScreen::onCard ( unsigned char * p, ulong & offset ) const [virtual]

This checks whether the buffer specified by p is on the card (as per the other version of onCard) and returns an offset in bytes from the start of graphics card memory in offset if it is.

int QScreen::pixelType () const

Returns an integer (taking the same values as QGfx::PixelType) that specifies the pixel storage format of the screen.

void QScreen::restore () [virtual]

Restore the state of the graphics card from a previous save().

void QScreen::save () [virtual]

Saves the state of the graphics card - used so that, for instance, the palette can be restored when switching between linux virtual consoles. Hardware QScreen descendants should save register state here if necessary if switching between virtual consoles (for example to/from X) is to be permitted.

QGfx * QScreen::screenGfx () [virtual]

Returns a QGfx (normally a QGfxRaster) initialised to point to the screen, with an origin at 0,0 and a clip region covering the whole screen.

void QScreen::set ( unsigned int, unsigned int, unsigned int, unsigned int ) [virtual]

Set an entry in the colour palette. A noop in this class, implemented in QLinuxFbScreen.

void QScreen::shutdownDevice () [virtual]

Called by the Qt/Embedded server on shutdown; never called by a Qt/Embedded client. This is intended to support graphics card specific shutdown; the unaccelerated implementation simply hides the mouse cursor.

bool QScreen::supportsDepth ( int d ) const [virtual]

Returns true if the screen supports a particular color depth. Possible values are 1,4,8,16 and 32.


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2005 Trolltech, all rights reserved.


Copyright © 2005 TrolltechTrademarks
Qt version 2.3.10