Qt Toolkit - QScreenCursor Class

| Classes - Annotated - Tree - Functions - Home - Structure

# QScreenCursor Class Reference

The QScreenCursor class manages the onscreen mouse cursor in Qt/Embedded. It provides an implementation of a software mouse cursor and can be subclassed by hardware drivers which support a hardware mouse cursor. There may only be one QScreenCursor at a time; it is constructed by QScreen or one of its descendants. More...

`#include <qgfx_qws.h>`

List of all member functions.

## Public Members

- QScreenCursor ()
- virtual ~QScreenCursor ()
- virtual void init ( SWCursorData * da, bool init = FALSE )
- virtual void set ( const QImage & image, int hotx, int hoty )
- virtual void move ( int x, int y )
- virtual void show ()
- virtual void hide ()
- virtual bool restoreUnder ( const QRect & r, QGfxRasterBase * g = 0 )
- virtual void saveUnder ()
- virtual void drawCursor ()
- void draw ()
- virtual bool supportsAlphaCursor ()

## Static Public Members

- bool enabled ()

## Detailed Description

The QScreenCursor class manages the onscreen mouse cursor in Qt/Embedded. It provides an implementation of a software mouse cursor and can be subclassed by hardware drivers which support a hardware mouse cursor. There may only be one QScreenCursor at a time; it is constructed by QScreen or one of its descendants.

This class is non-portable. It is available only in Qt/Embedded. It is also internal - this documentation is intended for those subclassing it in hardware drivers, not for application developers.

## Member Function Documentation

### QScreenCursor::QScreenCursor ()

Constructs a screen cursor.

### QScreenCursor::~QScreenCursor () `[virtual]`

Destructs a screen cursor, deleting its gfxes, cursor image and under-cursor storage.

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

Move the mouse cursor to point x,y on the screen. This should be done in such a way that the hotspot of the cursor is at x,y - e.g. if the hotspot is at 5,5 within the image then the top left of the image should be at x-5,y-5.

### bool QScreenCursor::restoreUnder ( const QRect & r, QGfxRasterBase * g = 0 ) `[virtual]`

This is relevant to only the software mouse cursor and should be reimplemented as a null method in hardware cursor drivers. It redraws what was under the mouse cursor when the cursor is moved.

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

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