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  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QScreenCursor Class Reference
[QtGui module]

The QScreenCursor class is a base class for screen cursors in Qtopia Core. More...

 #include <QScreenCursor>

Public Functions

Static Public Members


Detailed Description

The QScreenCursor class is a base class for screen cursors in Qtopia Core.

Note that this class is non-portable, and that it is only available in Qtopia Core.

QScreenCursor implements a software cursor, but can be subclassed to support hardware cursors as well. When deriving from the QScreenCursor class it is important to maintain the cursor's image, position, hot spot (the point within the cursor's image that will be the position of the associated mouse events) and visibility as well as informing whether it is hardware accelerated or not.

Note that there may only be one screen cursor at a time. Use the static instance() function to retrieve a pointer to the current screen cursor. Typically, the cursor is constructed by the QScreen class or one of its descendants when it is initializing the device; the QScreenCursor class should never be instantiated explicitly.

Use the move() function to change the position of the cursor, and the set() function to alter its image or its hot spot. In addition, you can find out whether the cursor is accelerated or not, using the isAccelerated() function, and the boundingRect() function returns the cursor's bounding rectangle.

The cursor's appearance can be controlled using the isVisible(), hide() and show() functions; alternatively the QWSServer class provides some means of controlling the cursor's appearance using the QWSServer::isCursorVisible() and QWSServer::setCursorVisible() functions.

See also QScreen and QWSServer.


Member Function Documentation

QScreenCursor::QScreenCursor ()

Constructs a screen cursor

QScreenCursor::~QScreenCursor ()   [virtual]

Destroys the screen cursor.

QRect QScreenCursor::boundingRect () const

Returns the cursor's bounding rectangle.

void QScreenCursor::hide ()   [virtual]

Hides the cursor from the screen.

See also show().

QImage QScreenCursor::image () const

Returns the cursor's image.

void QScreenCursor::initSoftwareCursor ()   [static]

Initializes the screen cursor.

This function is typically called from the screen driver when initializing the device. Alternatively, the cursor can be set directly using the pointer returned by the static instance() function.

See also QScreen::initDevice().

QScreenCursor * QScreenCursor::instance ()   [static]

Returns a pointer to the application's unique screen cursor.

This function was introduced in Qt 4.2.

bool QScreenCursor::isAccelerated () const

Returns true if the cursor is accelerated; otherwise false.

bool QScreenCursor::isVisible () const

Returns true if the cursor is visible; otherwise false.

void QScreenCursor::move ( int x, int y )   [virtual]

Moves the mouse cursor to the given position, i.e., (x, y).

Note that the given position defines the top-left corner of the cursor's image, i.e., not the cursor's hot spot (the position of the associated mouse events).

See also set().

void QScreenCursor::set ( const QImage & image, int hotx, int hoty )   [virtual]

Sets the cursor's image to be the given image.

The hotx and hoty parameters define the cursor's hot spot, i.e., the point within the cursor's image that will be the position of the associated mouse events.

See also move().

void QScreenCursor::show ()   [virtual]

Shows the mouse cursor.

See also hide().

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 64
  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

Comment fermer une application

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 4.2
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