QCursor Class Reference


This class provides a mouse cursor with arbitrary shape and color. (details) (complete member list)

#include <qcursor.h>

Public Members

Static Public Members

Related Functions

(Note that these are not member functions.)

Detailed Description

This class provides a mouse cursor with arbitrary shape and color.

The QCursor class represents the window system's mouse curor. There are a number of predefined cursor shapes:

arrowCursor
standard arrow cursor
upArrowCursor
upwards arrow
crossCursor
crosshair
hourGlassCursor
hourglass/watch
ibeamCursor
ibeam/text entry
sizeVerCursor
vertical resize
sizeHorCursor
horizontal resize
sizeBDiagCursor
diagonal resize (/)
sizeFDiagCursor
diagonal resize (\)
sizeAllCursor
all directions resize

It is also possible to define custom shapes.

Members are provided to change shape, get the cursor position and so on.


Member Function Documentation

QCursor::QCursor (const QBitmap &bitmap, const QBitmap &mask, int hotX=-1, int hotY=-1)

Constructs a custom bitmap cursor.

Arguments:

QCursor::QCursor (const QCursor &c)

Constructs a copy of the cursor c.

QCursor::~QCursor ()

Dereferences the cursor and destroys the cursor data if it was the last reference.

QCursor QCursor::copy () const

Returns a deep copy of the cursor.

To do:

Cursor QCursor::handle () const

Warning: System dependent! Do not use this unless you have to.

This function returns the window system's handle to the current cursor. Rather than use it, you should tell us what the portable functions lack.

The return type for each window system is specified in qcursor.h.

QCursor & QCursor::operator= (const QCursor &c)

Assigns c to this cursor and returns a reference to the cursor.


Related Functions

QDataStream & operator<< (QDataStream &s, const QCursor &c)

Writes the cursor to the stream.

QDataStream & operator>> (QDataStream &s, QCursor &c)

Reads the cursor from the stream.


This file is part of the Qt toolkit, copyright 1995 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 04:27, 1995/05/20 by the webmaster at Troll Tech