Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Classes  ·  Annotées  ·  Hiérarchie  ·  Fonctions  ·  Structure  · 

QScreen Class Reference


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

#include <qgfx_qws.h>

List of all member functions.

Public Members

  • QScreen ( int display_id ) 
  • virtual ~QScreen () 
  • virtual bool initDevice () 
  • virtual bool connect ( const QString & displaySpec ) 
  • virtual void disconnect () 
  • virtual int initCursor ( void *, bool=FALSE ) 
  • virtual void shutdownDevice () 
  • virtual void setMode ( int, int, int ) 
  • virtual bool supportsDepth ( int ) const
  • virtual QGfx* createGfx ( unsigned char *, int, int, int, int ) 
  • virtual QGfx* screenGfx () 
  • virtual void save () 
  • virtual void restore () 
  • virtual void blank ( bool on ) 
  • virtual int pixmapOffsetAlignment () 
  • virtual int pixmapLinestepAlignment () 
  • virtual bool onCard ( unsigned char * ) const
  • virtual bool onCard ( unsigned char *, ulong & out_offset ) const
  • virtual void set ( unsigned int, unsigned int, unsigned int, unsigned int ) 
  • virtual int alloc ( unsigned int, unsigned int, unsigned int ) 
  • int width () const
  • int height () const
  • int depth () const
  • virtual int pixmapDepth () const
  • int pixelType () const
  • int linestep () const
  • int deviceWidth () const
  • int deviceHeight () const
  • uchar* base () const
  • virtual uchar* cache ( int, int ) 
  • virtual void uncache ( uchar * ) 
  • int screenSize () const
  • int totalSize () const
  • QRgb* clut () 
  • int numCols () 
  • virtual QSize mapToDevice ( const QSize & ) const
  • virtual QSize mapFromDevice ( const QSize & ) const
  • virtual QPoint mapToDevice ( const QPoint &, const QSize & ) const
  • virtual QPoint mapFromDevice ( const QPoint &, const QSize & ) const
  • virtual QRect mapToDevice ( const QRect &, const QSize & ) const
  • virtual QRect mapFromDevice ( const QRect &, const QSize & ) const
  • virtual QImage mapToDevice ( const QImage & ) const
  • virtual QImage mapFromDevice ( const QImage & ) const
  • virtual QRegion mapToDevice ( const QRegion &, const QSize & ) const
  • virtual QRegion mapFromDevice ( const QRegion &, const QSize & ) const
  • virtual int transformOrientation () const
  • virtual bool isTransformed () const
  • virtual bool isInterlaced () const

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.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 65
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Applications mobiles modernes avec Qt et QML

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 2.3
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web